OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <body> | |
3 <script src="../../../resources/js-test.js"></script> | |
4 <div style="height: 1100px">scroll down...</div> | |
5 <button id="a">Push State</button> | |
6 <div id="log"></div> | |
7 <script> | |
8 if (window.testRunner) { | |
9 testRunner.dumpAsText(); | |
10 testRunner.waitUntilDone(); | |
11 } | |
12 | |
13 window.onload = function() { | |
14 window.scrollBy(0, 1000); | |
15 history.pushState({}, '', "#a"); | |
16 history.pushState({}, '', "#a"); | |
17 scrollOffsetY = window.scrollY; | |
18 history.back(); | |
19 setTimeout(function() { | |
20 document.getElementById('log').innerHTML = 'scrollY should be ' + scroll OffsetY + ': ' + (window.scrollY==scrollOffsetY ? "PASS" : "FAIL"); | |
vivekg
2015/04/10 09:00:52
Use shouldBe version instead of using getElementBy
Abhijeet Kandalkar Slow
2015/04/10 18:22:17
Done.
| |
21 testRunner.notifyDone(); | |
22 }, 100); | |
Nate Chapin
2015/04/10 17:32:31
100ms is way too long. Ideally this should be call
Abhijeet Kandalkar Slow
2015/04/10 18:22:17
Done.
| |
23 }; | |
24 </script> | |
25 </body> | |
OLD | NEW |