check-layout.js should always dumpAsText
https://bugs.webkit.org/show_bug.cgi?id=98959

Reviewed by Tony Chang.

Every checkLayout test was already dumpAsText except for
css3/flexbox/flex-item-child-overflow.html, which is a reftest
and really doesn't need to be a checkLayout test.

* css3/flexbox/auto-height-dynamic.html:
* css3/flexbox/box-sizing-min-max-sizes.html:
* css3/flexbox/box-sizing.html:
* css3/flexbox/columns-auto-size.html:
* css3/flexbox/columns-height-set-via-top-bottom.html:
* css3/flexbox/flex-algorithm-min-max.html:
* css3/flexbox/flex-algorithm-with-margins.html:
* css3/flexbox/flex-algorithm.html:
* css3/flexbox/flex-align-column.html:
* css3/flexbox/flex-align-end.html:
* css3/flexbox/flex-align-max.html:
* css3/flexbox/flex-align-percent-height.html:
* css3/flexbox/flex-align-stretch.html:
* css3/flexbox/flex-align-vertical-writing-mode.html:
* css3/flexbox/flex-align.html:
* css3/flexbox/flex-flow-auto-margins.html:
* css3/flexbox/flex-flow-border.html:
* css3/flexbox/flex-flow-margins-auto-size.html:
* css3/flexbox/flex-flow-margins.html:
* css3/flexbox/flex-flow-orientations.html:
* css3/flexbox/flex-flow-overflow.html:
* css3/flexbox/flex-flow-padding.html:
* css3/flexbox/flex-flow.html:
* css3/flexbox/flex-item-child-overflow-expected.html:
* css3/flexbox/flex-item-child-overflow.html:
* css3/flexbox/flex-item-min-size.html:
* css3/flexbox/flex-justify-content.html:
* css3/flexbox/flex-no-flex.html:
* css3/flexbox/flex-rounding.html:
* css3/flexbox/flexitem-stretch-image.html:
* css3/flexbox/flexitem.html:
* css3/flexbox/floated-flexbox.html:
* css3/flexbox/inline-flex.html:
* css3/flexbox/line-wrapping.html:
* css3/flexbox/multiline-align-content-horizontal-column.html:
* css3/flexbox/multiline-align-content.html:
* css3/flexbox/multiline-align-self.html:
* css3/flexbox/multiline-column-auto.html:
* css3/flexbox/multiline-justify-content.html:
* css3/flexbox/multiline-reverse-wrap-overflow.html:
* css3/flexbox/multiline.html:
* css3/flexbox/nested-stretch.html:
* css3/flexbox/orthogonal-flex-directions.html:
* css3/flexbox/percent-margins.html:
* css3/flexbox/percentage-heights.html:
* css3/flexbox/percentage-sizes-quirks.html:
* css3/flexbox/percentage-sizes.html:
* css3/flexbox/perpendicular-writing-modes-inside-flex-item.html:
* css3/flexbox/position-absolute-child.html:
* css3/flexbox/position-absolute-children.html:
* css3/flexbox/preferred-widths-orthogonal.html:
* css3/flexbox/preferred-widths.html:
* css3/flexbox/relayout-image-load.html:
* css3/flexbox/style-change.html:
* css3/flexbox/true-centering.html:
* css3/flexbox/writing-modes.html:
* fast/block/margins-perpendicular-containing-block.html:
* fast/css-grid-layout/place-cell-by-index.html:
* fast/css/deprecated-flexbox-auto-min-size.html:
* fast/css/nested-percent-height-on-replaced.html:
* fast/css/percentage-height-auto-sized-body-quirks.html:
* fast/flexbox/flexing-overflow-scroll-item.html:
* fast/replaced/vertical-writing-mode-max-logical-width-replaced.html:
* fast/table/bad-replaced-sizing-preferred-logical-widths.html:
* fast/table/margins-flipped-text-direction.html:
* fast/table/margins-perpendicular-containing-block.html:
* fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks.html:
* fast/writing-mode/percentage-height-orthogonal-writing-modes.html:
* resources/check-layout.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130979 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 1b523f1..1d90b43e 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,84 @@
+2012-10-10  Ojan Vafai  <ojan@chromium.org>
+
+        check-layout.js should always dumpAsText
+        https://bugs.webkit.org/show_bug.cgi?id=98959
+
+        Reviewed by Tony Chang.
+
+        Every checkLayout test was already dumpAsText except for 
+        css3/flexbox/flex-item-child-overflow.html, which is a reftest
+        and really doesn't need to be a checkLayout test.
+
+        * css3/flexbox/auto-height-dynamic.html:
+        * css3/flexbox/box-sizing-min-max-sizes.html:
+        * css3/flexbox/box-sizing.html:
+        * css3/flexbox/columns-auto-size.html:
+        * css3/flexbox/columns-height-set-via-top-bottom.html:
+        * css3/flexbox/flex-algorithm-min-max.html:
+        * css3/flexbox/flex-algorithm-with-margins.html:
+        * css3/flexbox/flex-algorithm.html:
+        * css3/flexbox/flex-align-column.html:
+        * css3/flexbox/flex-align-end.html:
+        * css3/flexbox/flex-align-max.html:
+        * css3/flexbox/flex-align-percent-height.html:
+        * css3/flexbox/flex-align-stretch.html:
+        * css3/flexbox/flex-align-vertical-writing-mode.html:
+        * css3/flexbox/flex-align.html:
+        * css3/flexbox/flex-flow-auto-margins.html:
+        * css3/flexbox/flex-flow-border.html:
+        * css3/flexbox/flex-flow-margins-auto-size.html:
+        * css3/flexbox/flex-flow-margins.html:
+        * css3/flexbox/flex-flow-orientations.html:
+        * css3/flexbox/flex-flow-overflow.html:
+        * css3/flexbox/flex-flow-padding.html:
+        * css3/flexbox/flex-flow.html:
+        * css3/flexbox/flex-item-child-overflow-expected.html:
+        * css3/flexbox/flex-item-child-overflow.html:
+        * css3/flexbox/flex-item-min-size.html:
+        * css3/flexbox/flex-justify-content.html:
+        * css3/flexbox/flex-no-flex.html:
+        * css3/flexbox/flex-rounding.html:
+        * css3/flexbox/flexitem-stretch-image.html:
+        * css3/flexbox/flexitem.html:
+        * css3/flexbox/floated-flexbox.html:
+        * css3/flexbox/inline-flex.html:
+        * css3/flexbox/line-wrapping.html:
+        * css3/flexbox/multiline-align-content-horizontal-column.html:
+        * css3/flexbox/multiline-align-content.html:
+        * css3/flexbox/multiline-align-self.html:
+        * css3/flexbox/multiline-column-auto.html:
+        * css3/flexbox/multiline-justify-content.html:
+        * css3/flexbox/multiline-reverse-wrap-overflow.html:
+        * css3/flexbox/multiline.html:
+        * css3/flexbox/nested-stretch.html:
+        * css3/flexbox/orthogonal-flex-directions.html:
+        * css3/flexbox/percent-margins.html:
+        * css3/flexbox/percentage-heights.html:
+        * css3/flexbox/percentage-sizes-quirks.html:
+        * css3/flexbox/percentage-sizes.html:
+        * css3/flexbox/perpendicular-writing-modes-inside-flex-item.html:
+        * css3/flexbox/position-absolute-child.html:
+        * css3/flexbox/position-absolute-children.html:
+        * css3/flexbox/preferred-widths-orthogonal.html:
+        * css3/flexbox/preferred-widths.html:
+        * css3/flexbox/relayout-image-load.html:
+        * css3/flexbox/style-change.html:
+        * css3/flexbox/true-centering.html:
+        * css3/flexbox/writing-modes.html:
+        * fast/block/margins-perpendicular-containing-block.html:
+        * fast/css-grid-layout/place-cell-by-index.html:
+        * fast/css/deprecated-flexbox-auto-min-size.html:
+        * fast/css/nested-percent-height-on-replaced.html:
+        * fast/css/percentage-height-auto-sized-body-quirks.html:
+        * fast/flexbox/flexing-overflow-scroll-item.html:
+        * fast/replaced/vertical-writing-mode-max-logical-width-replaced.html:
+        * fast/table/bad-replaced-sizing-preferred-logical-widths.html:
+        * fast/table/margins-flipped-text-direction.html:
+        * fast/table/margins-perpendicular-containing-block.html:
+        * fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks.html:
+        * fast/writing-mode/percentage-height-orthogonal-writing-modes.html:
+        * resources/check-layout.js:
+
 2012-10-10  Jeffrey Pfau  <jpfau@apple.com>
 
         [Mac][WK2] Unreviewed, skipping fast/parser/document-open-in-unload.html
diff --git a/LayoutTests/css3/flexbox/auto-height-dynamic.html b/LayoutTests/css3/flexbox/auto-height-dynamic.html
index 583bd26..1770868 100644
--- a/LayoutTests/css3/flexbox/auto-height-dynamic.html
+++ b/LayoutTests/css3/flexbox/auto-height-dynamic.html
@@ -11,10 +11,6 @@
     background-color: blue;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/box-sizing-min-max-sizes.html b/LayoutTests/css3/flexbox/box-sizing-min-max-sizes.html
index 647680c..4940b2f 100644
--- a/LayoutTests/css3/flexbox/box-sizing-min-max-sizes.html
+++ b/LayoutTests/css3/flexbox/box-sizing-min-max-sizes.html
@@ -8,10 +8,6 @@
     box-sizing: border-box;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/box-sizing.html b/LayoutTests/css3/flexbox/box-sizing.html
index f6242da..11b9197 100644
--- a/LayoutTests/css3/flexbox/box-sizing.html
+++ b/LayoutTests/css3/flexbox/box-sizing.html
@@ -92,9 +92,6 @@
     }
     [].forEach.call(document.querySelectorAll(".flexbox > div"), addExpectedSizes);
     [].forEach.call(document.querySelectorAll(".border-box"), addExpectedSizes);
-
-    if (window.testRunner)
-        testRunner.dumpAsText();
 </script>
 </body>
 </html>
diff --git a/LayoutTests/css3/flexbox/columns-auto-size.html b/LayoutTests/css3/flexbox/columns-auto-size.html
index 88defaf..38d9ed2 100644
--- a/LayoutTests/css3/flexbox/columns-auto-size.html
+++ b/LayoutTests/css3/flexbox/columns-auto-size.html
@@ -41,10 +41,6 @@
     background-color: yellow;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 <div class="flexbox column horizontal">
diff --git a/LayoutTests/css3/flexbox/columns-height-set-via-top-bottom.html b/LayoutTests/css3/flexbox/columns-height-set-via-top-bottom.html
index 7d3098d..c35b774 100644
--- a/LayoutTests/css3/flexbox/columns-height-set-via-top-bottom.html
+++ b/LayoutTests/css3/flexbox/columns-height-set-via-top-bottom.html
@@ -24,10 +24,6 @@
     background-color: lightgreen;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/flex-algorithm-min-max.html b/LayoutTests/css3/flexbox/flex-algorithm-min-max.html
index 9273b1d..15d5594 100644
--- a/LayoutTests/css3/flexbox/flex-algorithm-min-max.html
+++ b/LayoutTests/css3/flexbox/flex-algorithm-min-max.html
@@ -42,10 +42,6 @@
     -moz-flex: 1 0 0px;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 <div class="flexbox">
diff --git a/LayoutTests/css3/flexbox/flex-algorithm-with-margins.html b/LayoutTests/css3/flexbox/flex-algorithm-with-margins.html
index 93e8f02..819cadf 100644
--- a/LayoutTests/css3/flexbox/flex-algorithm-with-margins.html
+++ b/LayoutTests/css3/flexbox/flex-algorithm-with-margins.html
@@ -46,10 +46,6 @@
     -moz-flex: 2 0 0px;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 <div class="flexbox">
diff --git a/LayoutTests/css3/flexbox/flex-algorithm.html b/LayoutTests/css3/flexbox/flex-algorithm.html
index 31e93ae..8872d96 100644
--- a/LayoutTests/css3/flexbox/flex-algorithm.html
+++ b/LayoutTests/css3/flexbox/flex-algorithm.html
@@ -40,10 +40,6 @@
     -moz-flex: 1 0 0px;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/flex-align-column.html b/LayoutTests/css3/flexbox/flex-align-column.html
index d2975c2..4a7df64 100644
--- a/LayoutTests/css3/flexbox/flex-align-column.html
+++ b/LayoutTests/css3/flexbox/flex-align-column.html
@@ -37,10 +37,6 @@
     background-color: lime;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/flex-align-end.html b/LayoutTests/css3/flexbox/flex-align-end.html
index 1e175c6..524b08a 100644
--- a/LayoutTests/css3/flexbox/flex-align-end.html
+++ b/LayoutTests/css3/flexbox/flex-align-end.html
@@ -52,10 +52,6 @@
     -webkit-flex-flow: column-reverse;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/flex-align-max.html b/LayoutTests/css3/flexbox/flex-align-max.html
index 4714444..7033ddc 100644
--- a/LayoutTests/css3/flexbox/flex-align-max.html
+++ b/LayoutTests/css3/flexbox/flex-align-max.html
@@ -28,10 +28,6 @@
     background-color: red;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/flex-align-percent-height.html b/LayoutTests/css3/flexbox/flex-align-percent-height.html
index 1059574..bccc903 100644
--- a/LayoutTests/css3/flexbox/flex-align-percent-height.html
+++ b/LayoutTests/css3/flexbox/flex-align-percent-height.html
@@ -28,10 +28,6 @@
 }
 
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/flex-align-stretch.html b/LayoutTests/css3/flexbox/flex-align-stretch.html
index dcb9db2..f7b8ef2 100644
--- a/LayoutTests/css3/flexbox/flex-align-stretch.html
+++ b/LayoutTests/css3/flexbox/flex-align-stretch.html
@@ -30,10 +30,6 @@
   background-color: yellow !important;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 <div class="flexbox" style="width: 600px">
diff --git a/LayoutTests/css3/flexbox/flex-align-vertical-writing-mode.html b/LayoutTests/css3/flexbox/flex-align-vertical-writing-mode.html
index 694dde0..ed53135 100644
--- a/LayoutTests/css3/flexbox/flex-align-vertical-writing-mode.html
+++ b/LayoutTests/css3/flexbox/flex-align-vertical-writing-mode.html
@@ -49,10 +49,6 @@
     background-color: salmon;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/flex-align.html b/LayoutTests/css3/flexbox/flex-align.html
index b51eb49..f574d28 100644
--- a/LayoutTests/css3/flexbox/flex-align.html
+++ b/LayoutTests/css3/flexbox/flex-align.html
@@ -48,10 +48,6 @@
     background-color: salmon;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/flex-flow-auto-margins.html b/LayoutTests/css3/flexbox/flex-flow-auto-margins.html
index a564eed..423ab55 100644
--- a/LayoutTests/css3/flexbox/flex-flow-auto-margins.html
+++ b/LayoutTests/css3/flexbox/flex-flow-auto-margins.html
@@ -77,10 +77,6 @@
     background-color: red;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/flex-flow-border.html b/LayoutTests/css3/flexbox/flex-flow-border.html
index d8c93e3..2ecc0d8 100644
--- a/LayoutTests/css3/flexbox/flex-flow-border.html
+++ b/LayoutTests/css3/flexbox/flex-flow-border.html
@@ -79,10 +79,6 @@
     background-color: red;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/flex-flow-margins-auto-size.html b/LayoutTests/css3/flexbox/flex-flow-margins-auto-size.html
index f273223..f941b77 100644
--- a/LayoutTests/css3/flexbox/flex-flow-margins-auto-size.html
+++ b/LayoutTests/css3/flexbox/flex-flow-margins-auto-size.html
@@ -50,10 +50,6 @@
     background-color: blue;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/flex-flow-margins.html b/LayoutTests/css3/flexbox/flex-flow-margins.html
index 7ed4c9d..459cfdf 100644
--- a/LayoutTests/css3/flexbox/flex-flow-margins.html
+++ b/LayoutTests/css3/flexbox/flex-flow-margins.html
@@ -74,10 +74,6 @@
     background-color: red;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/flex-flow-orientations.html b/LayoutTests/css3/flexbox/flex-flow-orientations.html
index 6c28744..9d9eca0 100644
--- a/LayoutTests/css3/flexbox/flex-flow-orientations.html
+++ b/LayoutTests/css3/flexbox/flex-flow-orientations.html
@@ -59,10 +59,6 @@
     background-color: red;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/flex-flow-overflow.html b/LayoutTests/css3/flexbox/flex-flow-overflow.html
index 574f975..1d46865 100644
--- a/LayoutTests/css3/flexbox/flex-flow-overflow.html
+++ b/LayoutTests/css3/flexbox/flex-flow-overflow.html
@@ -50,10 +50,6 @@
     background-color: blue;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/flex-flow-padding.html b/LayoutTests/css3/flexbox/flex-flow-padding.html
index f9613ff..598bb80 100644
--- a/LayoutTests/css3/flexbox/flex-flow-padding.html
+++ b/LayoutTests/css3/flexbox/flex-flow-padding.html
@@ -71,10 +71,6 @@
     background-color: green;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/flex-flow.html b/LayoutTests/css3/flexbox/flex-flow.html
index c2d17a9..f8ed626 100644
--- a/LayoutTests/css3/flexbox/flex-flow.html
+++ b/LayoutTests/css3/flexbox/flex-flow.html
@@ -62,10 +62,6 @@
     height: 10px;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/flex-item-child-overflow-expected.html b/LayoutTests/css3/flexbox/flex-item-child-overflow-expected.html
deleted file mode 100644
index 87059c90..0000000
--- a/LayoutTests/css3/flexbox/flex-item-child-overflow-expected.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body style="margin: 0">
-<div style="background-color: blue; width: 20px; height: 20px; position: absolute; top: 0;"></div>
-<pre>PASS</pre>
-</body>
-</html>
diff --git a/LayoutTests/css3/flexbox/flex-item-child-overflow-expected.txt b/LayoutTests/css3/flexbox/flex-item-child-overflow-expected.txt
new file mode 100644
index 0000000..7ef22e9
--- /dev/null
+++ b/LayoutTests/css3/flexbox/flex-item-child-overflow-expected.txt
@@ -0,0 +1 @@
+PASS
diff --git a/LayoutTests/css3/flexbox/flex-item-child-overflow.html b/LayoutTests/css3/flexbox/flex-item-child-overflow.html
index a599269..f32cc2e 100644
--- a/LayoutTests/css3/flexbox/flex-item-child-overflow.html
+++ b/LayoutTests/css3/flexbox/flex-item-child-overflow.html
@@ -22,9 +22,9 @@
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
-<div data-expected-height=0 class="flexbox">
-    <div data-expected-height=0>
-        <div data-offset-y=0 data-expected-height=20></div>
+<div data-expected-height=0 data-offset-x=0 data-offset-y=0 class="flexbox">
+    <div data-expected-height=0 data-offset-x=0 data-offset-y=0>
+        <div data-expected-height=20 data-offset-x=0 data-offset-y=0></div>
     </div>
 </div>
 
diff --git a/LayoutTests/css3/flexbox/flex-item-min-size.html b/LayoutTests/css3/flexbox/flex-item-min-size.html
index 300b505..dcaeb75 100644
--- a/LayoutTests/css3/flexbox/flex-item-min-size.html
+++ b/LayoutTests/css3/flexbox/flex-item-min-size.html
@@ -39,11 +39,6 @@
     -webkit-writing-mode: horizontal-bt;
 }
 </style>
-
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 
 <body onload="checkLayout('.flexbox')">
diff --git a/LayoutTests/css3/flexbox/flex-justify-content.html b/LayoutTests/css3/flexbox/flex-justify-content.html
index d8d1cb9..f25900b 100644
--- a/LayoutTests/css3/flexbox/flex-justify-content.html
+++ b/LayoutTests/css3/flexbox/flex-justify-content.html
@@ -26,10 +26,6 @@
     background-color: red;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 <div class="flexbox">
diff --git a/LayoutTests/css3/flexbox/flex-no-flex.html b/LayoutTests/css3/flexbox/flex-no-flex.html
index 16fbce7..c3885a6 100644
--- a/LayoutTests/css3/flexbox/flex-no-flex.html
+++ b/LayoutTests/css3/flexbox/flex-no-flex.html
@@ -43,9 +43,6 @@
 
 </style>
 <script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-
 function runTest()
 {
     document.body.className = "noflex";
diff --git a/LayoutTests/css3/flexbox/flex-rounding.html b/LayoutTests/css3/flexbox/flex-rounding.html
index 864520f..2f82318 100644
--- a/LayoutTests/css3/flexbox/flex-rounding.html
+++ b/LayoutTests/css3/flexbox/flex-rounding.html
@@ -37,10 +37,6 @@
     height: 200px;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/flexitem-stretch-image.html b/LayoutTests/css3/flexbox/flexitem-stretch-image.html
index 90a9801..547142e 100644
--- a/LayoutTests/css3/flexbox/flexitem-stretch-image.html
+++ b/LayoutTests/css3/flexbox/flexitem-stretch-image.html
@@ -15,10 +15,6 @@
     min-width: 0;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/flexitem.html b/LayoutTests/css3/flexbox/flexitem.html
index 50ddad6..2c7a1c0 100644
--- a/LayoutTests/css3/flexbox/flexitem.html
+++ b/LayoutTests/css3/flexbox/flexitem.html
@@ -20,10 +20,6 @@
     -webkit-flex-direction: column;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 <div class="flexbox" style="height:200px">
diff --git a/LayoutTests/css3/flexbox/floated-flexbox.html b/LayoutTests/css3/flexbox/floated-flexbox.html
index bce00a5..bc513ac 100644
--- a/LayoutTests/css3/flexbox/floated-flexbox.html
+++ b/LayoutTests/css3/flexbox/floated-flexbox.html
@@ -14,10 +14,6 @@
     background-color: lime;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/inline-flex.html b/LayoutTests/css3/flexbox/inline-flex.html
index 5c6545d..b7b01ff 100644
--- a/LayoutTests/css3/flexbox/inline-flex.html
+++ b/LayoutTests/css3/flexbox/inline-flex.html
@@ -7,16 +7,10 @@
     background-color: green;
     outline: 2px solid darkgreen;
 }
-
 #testcase > div > div {
     -webkit-flex: 1;
 }
-
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('#testcase')">
 <p>This test passes if the three green boxes are on the same horizontal line.</p>
diff --git a/LayoutTests/css3/flexbox/line-wrapping.html b/LayoutTests/css3/flexbox/line-wrapping.html
index a411087..fb65cf7 100644
--- a/LayoutTests/css3/flexbox/line-wrapping.html
+++ b/LayoutTests/css3/flexbox/line-wrapping.html
@@ -106,10 +106,6 @@
     background-color: orange;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/multiline-align-content-horizontal-column.html b/LayoutTests/css3/flexbox/multiline-align-content-horizontal-column.html
index 9b9fd0a..06393ef 100644
--- a/LayoutTests/css3/flexbox/multiline-align-content-horizontal-column.html
+++ b/LayoutTests/css3/flexbox/multiline-align-content-horizontal-column.html
@@ -60,10 +60,6 @@
     background-color: green;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/multiline-align-content.html b/LayoutTests/css3/flexbox/multiline-align-content.html
index 2deb423..5e1e9c1 100644
--- a/LayoutTests/css3/flexbox/multiline-align-content.html
+++ b/LayoutTests/css3/flexbox/multiline-align-content.html
@@ -64,10 +64,6 @@
     background-color: yellow;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 <p>Test to make sure that align-content works properly.</p>
diff --git a/LayoutTests/css3/flexbox/multiline-align-self.html b/LayoutTests/css3/flexbox/multiline-align-self.html
index 9856890..8f266ff 100644
--- a/LayoutTests/css3/flexbox/multiline-align-self.html
+++ b/LayoutTests/css3/flexbox/multiline-align-self.html
@@ -91,10 +91,6 @@
     background-color: #003;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/multiline-column-auto.html b/LayoutTests/css3/flexbox/multiline-column-auto.html
index cf82ae7..db30cef 100644
--- a/LayoutTests/css3/flexbox/multiline-column-auto.html
+++ b/LayoutTests/css3/flexbox/multiline-column-auto.html
@@ -27,10 +27,6 @@
     background-color: yellow;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 <p>Test to make sure that multiline columns break at the right places when auto sized.</p>
diff --git a/LayoutTests/css3/flexbox/multiline-justify-content.html b/LayoutTests/css3/flexbox/multiline-justify-content.html
index f3cfa63..6fe7f71 100644
--- a/LayoutTests/css3/flexbox/multiline-justify-content.html
+++ b/LayoutTests/css3/flexbox/multiline-justify-content.html
@@ -78,10 +78,6 @@
     background-color: #009;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/multiline-reverse-wrap-overflow.html b/LayoutTests/css3/flexbox/multiline-reverse-wrap-overflow.html
index 40a9f2b..9123fde 100644
--- a/LayoutTests/css3/flexbox/multiline-reverse-wrap-overflow.html
+++ b/LayoutTests/css3/flexbox/multiline-reverse-wrap-overflow.html
@@ -26,10 +26,6 @@
     background-color: yellow;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 <p>Test to make sure that wrap-reverse starts at the cross start edge if
diff --git a/LayoutTests/css3/flexbox/multiline.html b/LayoutTests/css3/flexbox/multiline.html
index bfd6b4a..957c74e 100644
--- a/LayoutTests/css3/flexbox/multiline.html
+++ b/LayoutTests/css3/flexbox/multiline.html
@@ -66,10 +66,6 @@
     background-color: #030;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/nested-stretch.html b/LayoutTests/css3/flexbox/nested-stretch.html
index 3dee657..6076d6a 100644
--- a/LayoutTests/css3/flexbox/nested-stretch.html
+++ b/LayoutTests/css3/flexbox/nested-stretch.html
@@ -26,10 +26,6 @@
   -webkit-flex: 1 0 auto;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 </head>
 <body onload="checkLayout('.flexbox')">
diff --git a/LayoutTests/css3/flexbox/orthogonal-flex-directions.html b/LayoutTests/css3/flexbox/orthogonal-flex-directions.html
index c443176..e4be844 100644
--- a/LayoutTests/css3/flexbox/orthogonal-flex-directions.html
+++ b/LayoutTests/css3/flexbox/orthogonal-flex-directions.html
@@ -65,10 +65,6 @@
     -webkit-align-self: flex-start;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/percent-margins.html b/LayoutTests/css3/flexbox/percent-margins.html
index a552a32..0719911 100644
--- a/LayoutTests/css3/flexbox/percent-margins.html
+++ b/LayoutTests/css3/flexbox/percent-margins.html
@@ -1,8 +1,4 @@
 <!DOCTYPE html>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/percentage-heights.html b/LayoutTests/css3/flexbox/percentage-heights.html
index 5d50acd..523bcb8 100644
--- a/LayoutTests/css3/flexbox/percentage-heights.html
+++ b/LayoutTests/css3/flexbox/percentage-heights.html
@@ -27,10 +27,6 @@
     -webkit-align-content: flex-start;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/percentage-sizes-quirks.html b/LayoutTests/css3/flexbox/percentage-sizes-quirks.html
index e27bdc5..13dafdc 100644
--- a/LayoutTests/css3/flexbox/percentage-sizes-quirks.html
+++ b/LayoutTests/css3/flexbox/percentage-sizes-quirks.html
@@ -31,10 +31,6 @@
     background-color: purple;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/percentage-sizes.html b/LayoutTests/css3/flexbox/percentage-sizes.html
index 3619d56..2ccbb7c 100644
--- a/LayoutTests/css3/flexbox/percentage-sizes.html
+++ b/LayoutTests/css3/flexbox/percentage-sizes.html
@@ -34,10 +34,6 @@
     background-color: purple;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/perpendicular-writing-modes-inside-flex-item.html b/LayoutTests/css3/flexbox/perpendicular-writing-modes-inside-flex-item.html
index 2f6c028..cf9592d 100644
--- a/LayoutTests/css3/flexbox/perpendicular-writing-modes-inside-flex-item.html
+++ b/LayoutTests/css3/flexbox/perpendicular-writing-modes-inside-flex-item.html
@@ -28,10 +28,6 @@
 }
 </style>
 
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 
 <body onload="checkLayout('.flexbox')">
diff --git a/LayoutTests/css3/flexbox/position-absolute-child.html b/LayoutTests/css3/flexbox/position-absolute-child.html
index 5f42f9c..86ed775 100644
--- a/LayoutTests/css3/flexbox/position-absolute-child.html
+++ b/LayoutTests/css3/flexbox/position-absolute-child.html
@@ -63,10 +63,6 @@
 }
 
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/position-absolute-children.html b/LayoutTests/css3/flexbox/position-absolute-children.html
index d976626..2f232ce 100644
--- a/LayoutTests/css3/flexbox/position-absolute-children.html
+++ b/LayoutTests/css3/flexbox/position-absolute-children.html
@@ -75,10 +75,6 @@
     -webkit-justify-content: space-around;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 <script>
diff --git a/LayoutTests/css3/flexbox/preferred-widths-orthogonal.html b/LayoutTests/css3/flexbox/preferred-widths-orthogonal.html
index 2d66de8..571b7e9 100644
--- a/LayoutTests/css3/flexbox/preferred-widths-orthogonal.html
+++ b/LayoutTests/css3/flexbox/preferred-widths-orthogonal.html
@@ -59,10 +59,6 @@
     clear: both;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/preferred-widths.html b/LayoutTests/css3/flexbox/preferred-widths.html
index 57f61f0..3d0f5be 100644
--- a/LayoutTests/css3/flexbox/preferred-widths.html
+++ b/LayoutTests/css3/flexbox/preferred-widths.html
@@ -49,10 +49,6 @@
     -webkit-flex-flow: column-reverse;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/relayout-image-load.html b/LayoutTests/css3/flexbox/relayout-image-load.html
index b9ae077..93c6c2c 100644
--- a/LayoutTests/css3/flexbox/relayout-image-load.html
+++ b/LayoutTests/css3/flexbox/relayout-image-load.html
@@ -16,10 +16,8 @@
     </div>
 </div>
 <script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
+if (window.testRunner)
     testRunner.waitUntilDone();
-}
 
 function changeImage()
 {
diff --git a/LayoutTests/css3/flexbox/style-change.html b/LayoutTests/css3/flexbox/style-change.html
index 4df6848..ea76ccd 100644
--- a/LayoutTests/css3/flexbox/style-change.html
+++ b/LayoutTests/css3/flexbox/style-change.html
@@ -24,10 +24,6 @@
   background-color: yellow !important;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body>
 
diff --git a/LayoutTests/css3/flexbox/true-centering.html b/LayoutTests/css3/flexbox/true-centering.html
index 3797201..4ba4ce0 100644
--- a/LayoutTests/css3/flexbox/true-centering.html
+++ b/LayoutTests/css3/flexbox/true-centering.html
@@ -51,10 +51,6 @@
     -webkit-flex-flow: column-reverse;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/css3/flexbox/writing-modes.html b/LayoutTests/css3/flexbox/writing-modes.html
index b41b71d..02628d0 100644
--- a/LayoutTests/css3/flexbox/writing-modes.html
+++ b/LayoutTests/css3/flexbox/writing-modes.html
@@ -48,10 +48,6 @@
     background-color: red;
 }
 </style>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/fast/block/margins-perpendicular-containing-block.html b/LayoutTests/fast/block/margins-perpendicular-containing-block.html
index cc20b32..0950c87 100644
--- a/LayoutTests/fast/block/margins-perpendicular-containing-block.html
+++ b/LayoutTests/fast/block/margins-perpendicular-containing-block.html
@@ -14,10 +14,6 @@
 }
 </style>
 <script src="../../resources/check-layout.js"></script>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 </head>
 
 <body onload="checkLayout('.check')">
diff --git a/LayoutTests/fast/css-grid-layout/place-cell-by-index.html b/LayoutTests/fast/css-grid-layout/place-cell-by-index.html
index dc3fb81..ecf4f47 100644
--- a/LayoutTests/fast/css-grid-layout/place-cell-by-index.html
+++ b/LayoutTests/fast/css-grid-layout/place-cell-by-index.html
@@ -1,10 +1,8 @@
 <!DOCTYPE html>
 <html>
 <script>
-if (window.testRunner) {
+if (window.testRunner)
     testRunner.overridePreference("WebKitCSSGridLayoutEnabled", 1);
-    testRunner.dumpAsText();
-}
 </script>
 <style>
 .grid {
diff --git a/LayoutTests/fast/css/deprecated-flexbox-auto-min-size.html b/LayoutTests/fast/css/deprecated-flexbox-auto-min-size.html
index d52129c..992b9ae 100644
--- a/LayoutTests/fast/css/deprecated-flexbox-auto-min-size.html
+++ b/LayoutTests/fast/css/deprecated-flexbox-auto-min-size.html
@@ -35,10 +35,6 @@
 }
 </style>
 
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 <script src="../../resources/check-layout.js"></script>
 <body onload="checkLayout('.flexbox')">
 
diff --git a/LayoutTests/fast/css/nested-percent-height-on-replaced.html b/LayoutTests/fast/css/nested-percent-height-on-replaced.html
index 2fa3f6f..3517b4b 100644
--- a/LayoutTests/fast/css/nested-percent-height-on-replaced.html
+++ b/LayoutTests/fast/css/nested-percent-height-on-replaced.html
@@ -19,9 +19,6 @@
 </div>
 
 <script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-
 var dummy = document.createElement('div');
 dummy.style.overflow = "scroll";
 document.body.appendChild(dummy);
diff --git a/LayoutTests/fast/css/percentage-height-auto-sized-body-quirks.html b/LayoutTests/fast/css/percentage-height-auto-sized-body-quirks.html
index a0f4dae..ed10339 100644
--- a/LayoutTests/fast/css/percentage-height-auto-sized-body-quirks.html
+++ b/LayoutTests/fast/css/percentage-height-auto-sized-body-quirks.html
@@ -1,10 +1,5 @@
 <html style="height: 600px; margin: 10px;">
 <script src="../../resources/check-layout.js"></script>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
-
 <body onload="checkLayout('#item')">
 
 <div style="height: 1000px"></div>
diff --git a/LayoutTests/fast/flexbox/flexing-overflow-scroll-item.html b/LayoutTests/fast/flexbox/flexing-overflow-scroll-item.html
index 01af92f..3f3aa4f 100644
--- a/LayoutTests/fast/flexbox/flexing-overflow-scroll-item.html
+++ b/LayoutTests/fast/flexbox/flexing-overflow-scroll-item.html
@@ -9,7 +9,5 @@
 
 <script src="../../resources/check-layout.js"></script>
 <script>
-if (window.testRunner)
-    testRunner.dumpAsText();
 checkLayout('#flexbox');
 </script>
\ No newline at end of file
diff --git a/LayoutTests/fast/replaced/vertical-writing-mode-max-logical-width-replaced.html b/LayoutTests/fast/replaced/vertical-writing-mode-max-logical-width-replaced.html
index e7fd861..493822f 100755
--- a/LayoutTests/fast/replaced/vertical-writing-mode-max-logical-width-replaced.html
+++ b/LayoutTests/fast/replaced/vertical-writing-mode-max-logical-width-replaced.html
@@ -1,10 +1,6 @@
 <!DOCTYPE html>
 <head>
 <script src="../../resources/check-layout.js"></script>
-<script>
-    if (window.testRunner)
-        testRunner.dumpAsText();
-</script>
 <style>
 div {
     line-height: 0px;
diff --git a/LayoutTests/fast/table/bad-replaced-sizing-preferred-logical-widths.html b/LayoutTests/fast/table/bad-replaced-sizing-preferred-logical-widths.html
index 7c056de..c6bb2e1 100755
--- a/LayoutTests/fast/table/bad-replaced-sizing-preferred-logical-widths.html
+++ b/LayoutTests/fast/table/bad-replaced-sizing-preferred-logical-widths.html
@@ -2,10 +2,6 @@
 <html>
 <head>
 <script src="../../resources/check-layout.js"></script>
-<script>
-    if (window.testRunner)
-        testRunner.dumpAsText();
-</script>
 <style>
 html {
     width: 800px;
diff --git a/LayoutTests/fast/table/margins-flipped-text-direction.html b/LayoutTests/fast/table/margins-flipped-text-direction.html
index 43b6ec3..10f6740 100644
--- a/LayoutTests/fast/table/margins-flipped-text-direction.html
+++ b/LayoutTests/fast/table/margins-flipped-text-direction.html
@@ -14,10 +14,6 @@
 }
 </style>
 <script src="../../resources/check-layout.js"></script>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 </head>
 
 <body onload="checkLayout('div')">
diff --git a/LayoutTests/fast/table/margins-perpendicular-containing-block.html b/LayoutTests/fast/table/margins-perpendicular-containing-block.html
index 3fac02e..d0c3e61 100644
--- a/LayoutTests/fast/table/margins-perpendicular-containing-block.html
+++ b/LayoutTests/fast/table/margins-perpendicular-containing-block.html
@@ -10,10 +10,6 @@
 }
 </style>
 <script src="../../resources/check-layout.js"></script>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
 </head>
 
 <body onload="checkLayout('div')">
diff --git a/LayoutTests/fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks.html b/LayoutTests/fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks.html
index c0db778..3528b21 100644
--- a/LayoutTests/fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks.html
+++ b/LayoutTests/fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks.html
@@ -20,8 +20,6 @@
 <body onload="checkLayout('.container')">
 
 <script>
-if (window.testRunner)
-    testRunner.dumpAsText();
 document.write("<div>compatMode: " + document.compatMode + "</div>");
 </script>
 
diff --git a/LayoutTests/fast/writing-mode/percentage-height-orthogonal-writing-modes.html b/LayoutTests/fast/writing-mode/percentage-height-orthogonal-writing-modes.html
index dc235e0..4f7f58f 100644
--- a/LayoutTests/fast/writing-mode/percentage-height-orthogonal-writing-modes.html
+++ b/LayoutTests/fast/writing-mode/percentage-height-orthogonal-writing-modes.html
@@ -1,11 +1,5 @@
 <!DOCTYPE html>
-
 <script src="../../resources/check-layout.js"></script>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
-
 <style>
 html {
     height: 600px;
diff --git a/LayoutTests/resources/check-layout.js b/LayoutTests/resources/check-layout.js
index c697046..f587647 100644
--- a/LayoutTests/resources/check-layout.js
+++ b/LayoutTests/resources/check-layout.js
@@ -1,3 +1,6 @@
+if (window.testRunner)
+    testRunner.dumpAsText();
+
 (function() {
 
 function insertAfter(nodeToAdd, referenceNode)