| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <style> | 4 <style> |
| 5 #content { | 5 #content { |
| 6 width: 7500px; | 6 width: 7500px; |
| 7 height: 7500px; | 7 height: 7500px; |
| 8 background-color: blue; | 8 background-color: blue; |
| 9 } | 9 } |
| 10 </style> | 10 </style> |
| 11 <script src="../../resources/js-test.js"></script> | 11 <script src="../../resources/js-test.js"></script> |
| 12 <script> | 12 <script> |
| 13 onload = function() { | 13 onload = function() { |
| 14 description('Test that calling scroll methods on the body element does not
scroll the viewport in standards mode. Currently expected to fail: crbug.com/1
57855'); | 14 description('Test that calling scroll methods on the body element does not
scroll the viewport in standards mode.'); |
| 15 | |
| 16 | |
| 17 debug('Test that "scroll" on the body element does not scroll'); | 15 debug('Test that "scroll" on the body element does not scroll'); |
| 18 document.body.scroll(100, 100); | 16 document.body.scroll(100, 100); |
| 19 shouldBe("document.body.scrollTop", "0"); | 17 shouldBe("document.body.scrollTop", "0"); |
| 20 shouldBe("document.body.scrollLeft", "0"); | 18 shouldBe("document.body.scrollLeft", "0"); |
| 21 shouldBe("document.documentElement.scrollTop", "0"); | 19 shouldBe("document.documentElement.scrollTop", "0"); |
| 22 shouldBe("document.documentElement.scrollLeft", "0"); | 20 shouldBe("document.documentElement.scrollLeft", "0"); |
| 23 | 21 |
| 24 debug(''); | 22 debug(''); |
| 25 debug('Test that "scrollTo" on the body element does not scroll'); | 23 debug('Test that "scrollTo" on the body element does not scroll'); |
| 26 document.body.scrollTo(100, 100); | 24 document.body.scrollTo(100, 100); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 shouldBe("document.documentElement.scrollTop", "300"); | 59 shouldBe("document.documentElement.scrollTop", "300"); |
| 62 shouldBe("document.documentElement.scrollLeft", "750"); | 60 shouldBe("document.documentElement.scrollLeft", "750"); |
| 63 } | 61 } |
| 64 </script> | 62 </script> |
| 65 </head> | 63 </head> |
| 66 | 64 |
| 67 <body> | 65 <body> |
| 68 <div id="content"></div> | 66 <div id="content"></div> |
| 69 </body> | 67 </body> |
| 70 </html> | 68 </html> |
| OLD | NEW |