OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <style> | 2 <style> |
3 body { | 3 body { |
4 height: 2000px; | 4 height: 2000px; |
5 width: 2000px; | 5 width: 2000px; |
6 } | 6 } |
7 </style> | 7 </style> |
8 | 8 |
9 <div id='console'></div> | 9 <div id='console'></div> |
10 <script src="../../resources/js-test.js"></script> | 10 <script src="../../resources/js-test.js"></script> |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 setTimeout(function() { | 51 setTimeout(function() { |
52 window.name = 'verification phase'; | 52 window.name = 'verification phase'; |
53 window.location.href = 'resources/empty-document-goes-back.html'; | 53 window.location.href = 'resources/empty-document-goes-back.html'; |
54 }, 0); | 54 }, 0); |
55 } else { | 55 } else { |
56 var key = location.hash, | 56 var key = location.hash, |
57 test = tests[key]; | 57 test = tests[key]; |
58 | 58 |
59 debug('verifying ' + key); | 59 debug('verifying ' + key); |
60 shouldBeEqualToString('history.state.key', '' + key); | 60 shouldBeEqualToString('history.state.key', '' + key); |
61 shouldBe('document.body.scrollLeft', test.expectedScroll[0].toString()); | 61 shouldBe('document.scrollingElement.scrollLeft', test.expectedScroll[0].toSt
ring()); |
62 shouldBe('document.body.scrollTop', test.expectedScroll[1].toString()); | 62 shouldBe('document.scrollingElement.scrollTop', test.expectedScroll[1].toStr
ing()); |
63 | 63 |
64 if (key !== '#1') { | 64 if (key !== '#1') { |
65 window.history.back(); | 65 window.history.back(); |
66 } else { | 66 } else { |
67 window.name = ''; | 67 window.name = ''; |
68 finishJSTest(); | 68 finishJSTest(); |
69 } | 69 } |
70 } | 70 } |
71 } | 71 } |
72 | 72 |
73 window.addEventListener('pageshow', handleNavigation); | 73 window.addEventListener('pageshow', handleNavigation); |
74 window.addEventListener('hashchange', handleNavigation); | 74 window.addEventListener('hashchange', handleNavigation); |
75 </script> | 75 </script> |
OLD | NEW |