Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <body> | |
| 3 <script src="/js-test-resources/js-test.js"></script> | |
| 4 <div style="height: 1100px">scroll down...</div> | |
| 5 <button id="a">Push State</button> | |
|
Nate Chapin
2015/04/10 19:57:03
Nit: Remove this line.
Abhijeet Kandalkar Slow
2015/04/12 17:54:34
Done.
| |
| 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 shouldBeTrue('window.scrollY == scrollOffsetY'); | |
| 21 testRunner.notifyDone(); | |
|
Nate Chapin
2015/04/10 19:57:03
Nit: this should have an "if (window.testRunner)"
Abhijeet Kandalkar Slow
2015/04/12 17:54:33
Done.
| |
| 22 }, 0); | |
| 23 }; | |
| 24 </script> | |
| 25 </body> | |
| OLD | NEW |