4 <script src=
"../../resources/js-test.js"></script>
6 description('Test ensures that scrollingElement.scrollTop/Left properties are available by the time DOMContentLoaded event fires.');
8 // 1- page gets first loaded and scrolled.
9 // 2- loaded page away and then 'back'.
10 // Test: ensure that by the time DOMContenLoaded fires (after a back navigation), scrollingElement.scrollTop/Left are set.
13 if (window
.name
== 'second/load') {
14 shouldBe('document.scrollingElement.scrollTop', '2000');
15 shouldBe('document.scrollingElement.scrollLeft', '1000');
18 if (window
.testRunner
)
21 window
.scrollTo(1000, 2000);
23 window
.name
= "second/load";
24 setTimeout('window.location = "data:text/html,<script>history.back();</scr" + "ipt>"', 0);
28 window
.addEventListener('DOMContentLoaded', init
, true);
29 window
.onunload = function() {} // prevent caching
31 var jsTestIsAsync
= true;
34 <div id=
"overflow" style='width:
9999px; height:
9999px; float:left;'
></div>