Title: [120450] trunk/LayoutTests
Revision
120450
Author
rn...@webkit.org
Date
2012-06-15 07:07:22 -0700 (Fri, 15 Jun 2012)

Log Message

Use testRunner instead of layoutTestController in layout test resources
https://bugs.webkit.org/show_bug.cgi?id=89182

Reviewed by Kent Tamura.

* resources/dump-as-markup.js:
(Markup.waitUntilDone):
(Markup.notifyDone):
* resources/magnitude-perf.js:
(Magnitude._run):
(Magnitude._runIteration):
(Magnitude):
* resources/testharnessreport.js:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (120449 => 120450)


--- trunk/LayoutTests/ChangeLog	2012-06-15 13:58:42 UTC (rev 120449)
+++ trunk/LayoutTests/ChangeLog	2012-06-15 14:07:22 UTC (rev 120450)
@@ -1,3 +1,19 @@
+2012-06-15  Ryosuke Niwa  <rn...@webkit.org>
+
+        Use testRunner instead of layoutTestController in layout test resources
+        https://bugs.webkit.org/show_bug.cgi?id=89182
+
+        Reviewed by Kent Tamura.
+
+        * resources/dump-as-markup.js:
+        (Markup.waitUntilDone):
+        (Markup.notifyDone):
+        * resources/magnitude-perf.js:
+        (Magnitude._run):
+        (Magnitude._runIteration):
+        (Magnitude):
+        * resources/testharnessreport.js:
+
 2012-06-15  Zan Dobersek  <zandober...@gmail.com>
 
         Unreviewed GTK gardening, adding TEXT expectation for

Modified: trunk/LayoutTests/resources/dump-as-markup.js (120449 => 120450)


--- trunk/LayoutTests/resources/dump-as-markup.js	2012-06-15 13:58:42 UTC (rev 120449)
+++ trunk/LayoutTests/resources/dump-as-markup.js	2012-06-15 14:07:22 UTC (rev 120450)
@@ -14,8 +14,8 @@
  *    Optionally specify the node to dump and the description for each call of dump.
  */
 
-if (window.layoutTestController)
-    layoutTestController.dumpAsText();
+if (window.testRunner)
+    testRunner.dumpAsText();
 
 // Namespace
 // FIXME: Rename dump-as-markup.js to dump-dom.js and Markup to DOM.
@@ -61,7 +61,7 @@
         wrapper.insertBefore(document.createTextNode('\nDump of markup 1:\n'), wrapper.firstChild);
     }
 
-    // FIXME: Have this respect layoutTestController.dumpChildFramesAsText?
+    // FIXME: Have this respect testRunner.dumpChildFramesAsText?
     // FIXME: Should we care about framesets?
     // DocumentFragment doesn't have a getElementsByTagName method.
     if (node.getElementsByTagName) {
@@ -92,16 +92,16 @@
 
 Markup.waitUntilDone = function()
 {
-    if (window.layoutTestController)
-        layoutTestController.waitUntilDone();
+    if (window.testRunner)
+        testRunner.waitUntilDone();
     Markup.noAutoDump();
 }
 
 Markup.notifyDone = function()
 {
     // Need to waitUntilDone or some tests won't finish appending the markup before the text is dumped.
-    if (window.layoutTestController)
-        layoutTestController.waitUntilDone();
+    if (window.testRunner)
+        testRunner.waitUntilDone();
 
     // If dump has already been called, don't bother to dump again
     if (!Markup._dumpCalls)
@@ -110,13 +110,13 @@
     // In non-layout test mode, append the results in a pre so that we don't
     // clobber the test itself. But when in layout test mode, we don't want
     // side effects from the test to be included in the results.
-    if (window.layoutTestController)
+    if (window.testRunner)
         document.body.innerHTML = '';
 
     document.body.appendChild(Markup._container);
 
-    if (window.layoutTestController)
-        layoutTestController.notifyDone();
+    if (window.testRunner)
+        testRunner.notifyDone();
 }
 
 Markup.useHTML5libOutputFormat = function()

Modified: trunk/LayoutTests/resources/magnitude-perf.js (120449 => 120450)


--- trunk/LayoutTests/resources/magnitude-perf.js	2012-06-15 13:58:42 UTC (rev 120449)
+++ trunk/LayoutTests/resources/magnitude-perf.js	2012-06-15 14:07:22 UTC (rev 120450)
@@ -13,8 +13,8 @@
 // -test is the code whose runtime is being tests. It also takes a magnitude argument.
 // -expected is one of the run-time constants listed below (e.g. Magnitude.CONSTANT).
 
-if (window.layoutTestController)
-    layoutTestController.dumpAsText();
+if (window.testRunner)
+    testRunner.dumpAsText();
 
 // Namespace.
 var Magnitude = {};
@@ -100,7 +100,7 @@
 
         // By default don't log detailed information to layout test results to keep expected results
         // consistent from run to run.
-        if (!window.layoutTestController || bigO != expected)
+        if (!window.testRunner || bigO != expected)
             Magnitude._log(Magnitude._debugLog);
     } else {
         Magnitude._debug("numTriesLeft: " + numTriesLeft);
@@ -222,7 +222,7 @@
     var iterations = 0;
     if (window.chromium) {
       // FIXME: If using microseconds turns out to be less flaky, expose microseconds
-      // from JSC or layoutTestController and use them. Otherwise, get rid of this block.
+      // from JSC or testRunner and use them. Otherwise, get rid of this block.
       var microseconds = milliseconds * 1000;
       var interval = new chromium.Interval();
       interval.start();
@@ -249,7 +249,7 @@
 
 window.addEventListener('load', function() {
     // FIXME: Add Magnitude.waitUntilDone/notifyDone for tests that need to operate after the load event has fired.
-    if (window.layoutTestController)
+    if (window.testRunner)
         document.body.innerHTML = '';
     document.body.appendChild(Magnitude._container);
 }, false);

Modified: trunk/LayoutTests/resources/testharnessreport.js (120449 => 120450)


--- trunk/LayoutTests/resources/testharnessreport.js	2012-06-15 13:58:42 UTC (rev 120449)
+++ trunk/LayoutTests/resources/testharnessreport.js	2012-06-15 14:07:22 UTC (rev 120450)
@@ -13,8 +13,8 @@
  */
 
 // Setup for WebKit _javascript_ tests
-if (self.layoutTestController)
-    layoutTestController.dumpAsText();
+if (self.testRunner)
+    testRunner.dumpAsText();
 
 // Function used to convert the test status code into
 // the corresponding string
@@ -71,4 +71,4 @@
 
 	// Add results element to document
 	document.body.appendChild(results);
-});
\ No newline at end of file
+});
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to