OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/js-test.js"></script> |
| 3 <style> |
| 4 iframe { width: 100px; height: 100px; } |
| 5 iframe.wider { width: 200px; } |
| 6 </style> |
| 7 <iframe id="frame" src="data:text/html,<!DOCTYPE html>iframe" onload="runTests()
"></iframe> |
| 8 <script> |
| 9 description("Style recalc/layout when reading clientWidth of documentElement
in iframe."); |
| 10 |
| 11 var jsTestIsAsync = true; |
| 12 |
| 13 shouldBeDefined(window.internals); |
| 14 |
| 15 var originalOverlayScrollbars = internals.runtimeFlags.overlayScrollbarsEnab
led; |
| 16 internals.settings.setOverlayScrollbarsEnabled(true); |
| 17 |
| 18 function runTests() { |
| 19 clientWidthBefore = frame.contentDocument.documentElement.clientWidth; |
| 20 frame.className = "wider"; |
| 21 clientWidthAfter = frame.contentDocument.documentElement.clientWidth; |
| 22 |
| 23 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "0"); |
| 24 shouldBe("clientWidthBefore", "100"); |
| 25 shouldBe("clientWidthAfter", "200"); |
| 26 |
| 27 internals.settings.setOverlayScrollbarsEnabled(originalOverlayScrollbars
); |
| 28 finishJSTest(); |
| 29 } |
| 30 </script> |
OLD | NEW |