5 // 1. loads this page and it has a horizontal scrollbar
6 // 2. Navigates to a data URL and navigates back
9 var result = (innerHeight === document.documentElement.offsetHeight)
10 ? "FAIL: Scrollbar did not appear"
12 document.body.innerHTML = result;
13 if (window.layoutTestController)
14 layoutTestController.notifyDone();
17 function navigateAwayAndBack()
19 // Simulate a link click to create a history entry
20 var evt = document.createEvent("MouseEvents");
21 evt.initMouseEvent("click", true, true, window,
22 0, 0, 0, 0, 0, false, false, false, false, 0, null);
23 document.getElementById('anchor').dispatchEvent(evt);
26 function runTestStep()
28 if (window.layoutTestController) {
29 layoutTestController.dumpAsText();
30 layoutTestController.waitUntilDone();
31 layoutTestController.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
33 window.setTimeout("navigateAwayAndBack()", 200);
36 function onVerifyPage(evt)
38 // If pageshow is happening as result of navigation back then we proceed.
40 setTimeout("verifyPage()", 200);
43 window.onpageshow = onVerifyPage;
46 <style type="text/css">
59 <body onload='runTestStep()'>
60 <div id="content"> <a id='anchor' href='data:text/html,<body onload="history.back()"></body>'>Where is the scrollbar?</a></div>