Chromium Code Reviews| 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 <button id="b">Back</button> | |
|
Nate Chapin
2015/04/07 18:17:09
Nit: I don't think these buttons are needed any mo
Abhijeet Kandalkar Slow
2015/04/10 06:49:22
Done.
| |
| 7 <div id="log"></div> | |
| 8 <script> | |
| 9 if (window.testRunner) | |
| 10 testRunner.dumpAsText(); | |
| 11 | |
| 12 window.onload = function() { | |
| 13 window.scrollBy(0, 1000); | |
| 14 history.pushState({}, '', window.location.href.split("#")[0] + "#a"); | |
|
Nate Chapin
2015/04/07 18:17:09
Nit: You shouldn't need to parse the url, setting
Abhijeet Kandalkar Slow
2015/04/10 06:49:22
Done.
| |
| 15 history.pushState({}, '', window.location.href.split("#")[0] + "#a"); | |
| 16 scrollOffsetY = window.scrollY; | |
| 17 history.back(); | |
| 18 document.getElementById('log').innerHTML = 'scrollY should be ' + scrollOffs etY + ': ' + (window.scrollY==scrollOffsetY ? "PASS" : "FAIL"); | |
|
Nate Chapin
2015/04/07 18:17:09
Does this fail without your fix? I would expect th
Abhijeet Kandalkar Slow
2015/04/10 06:49:22
On windows sometime it fails while manual testing.
| |
| 19 }; | |
| 20 </script> | |
| 21 </body> | |
| OLD | NEW |