| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/js-test.js"></script> | 2 <script src="../../../resources/js-test.js"></script> |
| 3 <style> | 3 <style> |
| 4 body { | 4 body { |
| 5 height: 2000px; | 5 height: 2000px; |
| 6 width: 2000px; | 6 width: 2000px; |
| 7 } | 7 } |
| 8 ::-webkit-scrollbar { |
| 9 width: 0px; |
| 10 height: 0px; |
| 11 } |
| 8 </style> | 12 </style> |
| 9 | 13 |
| 10 <script> | 14 <script> |
| 11 window.jsTestIsAsync = true; | 15 window.jsTestIsAsync = true; |
| 12 | 16 |
| 13 description("This test verifies the dimensions of the visual viewport \ | 17 description("This test verifies the dimensions of the visual viewport \ |
| 14 returned by the JS visual viewport API."); | 18 returned by the JS visual viewport API."); |
| 15 | 19 |
| 16 function runTest() { | 20 function runTest() { |
| 17 if (!window.eventSender || !window.internals) { | 21 if (!window.eventSender || !window.internals) { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 document.visualViewport.scrollTop = -20; | 56 document.visualViewport.scrollTop = -20; |
| 53 shouldBe("document.visualViewport.scrollTop", "0"); | 57 shouldBe("document.visualViewport.scrollTop", "0"); |
| 54 document.visualViewport.scrollTop = 20.5; | 58 document.visualViewport.scrollTop = 20.5; |
| 55 shouldBe("document.visualViewport.scrollTop", "20.5"); | 59 shouldBe("document.visualViewport.scrollTop", "20.5"); |
| 56 | 60 |
| 57 finishJSTest(); | 61 finishJSTest(); |
| 58 } | 62 } |
| 59 </script> | 63 </script> |
| 60 | 64 |
| 61 <body onload="runTest()"></body> | 65 <body onload="runTest()"></body> |
| OLD | NEW |