Index: third_party/WebKit/LayoutTests/fast/dom/root-client-size-iframe.html |
diff --git a/third_party/WebKit/LayoutTests/fast/dom/root-client-size-iframe.html b/third_party/WebKit/LayoutTests/fast/dom/root-client-size-iframe.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..acca19817f523eaf9841bbb87bded5a472388d4f |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/dom/root-client-size-iframe.html |
@@ -0,0 +1,30 @@ |
+<!DOCTYPE html> |
+<script src="../../resources/js-test.js"></script> |
+<style> |
+ iframe { width: 100px; height: 100px; } |
+ iframe.wider { width: 200px; } |
+</style> |
+<iframe id="frame" src="data:text/html,<!DOCTYPE html>iframe" onload="runTests()"></iframe> |
+<script> |
+ description("Style recalc/layout when reading clientWidth of documentElement in iframe."); |
+ |
+ var jsTestIsAsync = true; |
+ |
+ shouldBeDefined(window.internals); |
+ |
+ var originalOverlayScrollbars = internals.runtimeFlags.overlayScrollbarsEnabled; |
+ internals.settings.setOverlayScrollbarsEnabled(true); |
+ |
+ function runTests() { |
+ clientWidthBefore = frame.contentDocument.documentElement.clientWidth; |
+ frame.className = "wider"; |
+ clientWidthAfter = frame.contentDocument.documentElement.clientWidth; |
+ |
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "0"); |
+ shouldBe("clientWidthBefore", "100"); |
+ shouldBe("clientWidthAfter", "200"); |
+ |
+ internals.settings.setOverlayScrollbarsEnabled(originalOverlayScrollbars); |
+ finishJSTest(); |
+ } |
+</script> |