OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <html> |
| 3 <script src="../js/resources/js-test-pre.js"></script> |
| 4 <head> |
| 5 <style> |
| 6 ::-webkit-scrollbar { |
| 7 -webkit-appearance: none; |
| 8 width: 8px; |
| 9 } |
| 10 * { |
| 11 margin: 0; |
| 12 padding: 0; |
| 13 } |
| 14 |
| 15 #makespace { |
| 16 height: 5000px; |
| 17 } |
| 18 </style> |
| 19 <script> |
| 20 description('Test that partial layout works with non-overlay scrollbars.'); |
| 21 if (window.testRunner) |
| 22 testRunner.dumpAsText(); |
| 23 if (window.internals) |
| 24 window.internals.setUsesOverlayScrollbars(true); // We force non-overlay
scrollbars with CSS. |
| 25 |
| 26 function checkSize() { |
| 27 var measure = document.getElementById('measure'); |
| 28 var measureWidth = measure.offsetWidth; // Partial layout occurs here! |
| 29 |
| 30 shouldBe(measureWidth, "document.body.offsetWidth"); |
| 31 shouldBe(measureWidth, "window.innerWidth - 8"); |
| 32 finishJSTest(); |
| 33 } |
| 34 </script> |
| 35 </head> |
| 36 <body onload="checkSize()"> |
| 37 <div id="makespace"></div> |
| 38 <div id="measure"></div> |
| 39 <script src="../js/resources/js-test-post.js"></script> |
| 40 </body> |
| 41 </html> |
OLD | NEW |