Use testRunner instead of layoutTestController in transforms, transitions, traversal, userscripts, webarchive, webaudio, and webintents tests
https://bugs.webkit.org/show_bug.cgi?id=89269

Reviewed by Adam Barth.

* transitions/:
* traversal/:
* userscripts/:
* webarchive/:
* webaudio/:
* webintents/web-intents-delivery.html:
* webintents/web-intents-failure.html:
* webintents/web-intents-reload.html:
* webintents/web-intents-reply.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120521 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 85af501..01bfb7c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,5 +1,22 @@
 2012-06-15  Ryosuke Niwa  <rniwa@webkit.org>
 
+        Use testRunner instead of layoutTestController in transforms, transitions, traversal, userscripts, webarchive, webaudio, and webintents tests
+        https://bugs.webkit.org/show_bug.cgi?id=89269
+
+        Reviewed by Adam Barth.
+
+        * transitions/:
+        * traversal/:
+        * userscripts/:
+        * webarchive/:
+        * webaudio/:
+        * webintents/web-intents-delivery.html:
+        * webintents/web-intents-failure.html:
+        * webintents/web-intents-reload.html:
+        * webintents/web-intents-reply.html:
+
+2012-06-15  Ryosuke Niwa  <rniwa@webkit.org>
+
         Use testRunner instead of layoutTestController in the rest of sputnik tests
         https://bugs.webkit.org/show_bug.cgi?id=89262
 
diff --git a/LayoutTests/transitions/3d/interrupted-transition.html b/LayoutTests/transitions/3d/interrupted-transition.html
index a965f35..5191b39 100644
--- a/LayoutTests/transitions/3d/interrupted-transition.html
+++ b/LayoutTests/transitions/3d/interrupted-transition.html
@@ -12,9 +12,9 @@
 </style>
 <script>
 
-if (window.layoutTestController) {
-    window.layoutTestController.dumpAsText();
-    window.layoutTestController.waitUntilDone();
+if (window.testRunner) {
+    window.testRunner.dumpAsText();
+    window.testRunner.waitUntilDone();
 }
 
 var NUMBER_OF_INTERRUPTIONS = 30;
@@ -34,8 +34,8 @@
     var results = document.getElementById("results");
     results.innerText = "The transition completed successfully.";
     
-    if (window.layoutTestController)
-        window.layoutTestController.notifyDone();
+    if (window.testRunner)
+        window.testRunner.notifyDone();
 }
 
 window.addEventListener("load", function () {
diff --git a/LayoutTests/transitions/bad-transition-shorthand-crash.html b/LayoutTests/transitions/bad-transition-shorthand-crash.html
index 3ac4a66..38ae79a 100644
--- a/LayoutTests/transitions/bad-transition-shorthand-crash.html
+++ b/LayoutTests/transitions/bad-transition-shorthand-crash.html
@@ -13,15 +13,15 @@
     }
   </style>
   <script>
-    if (window.layoutTestController) {
-      layoutTestController.dumpAsText();
-      layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+      testRunner.dumpAsText();
+      testRunner.waitUntilDone();
     }
     
     function finish()
     {
-        if (window.layoutTestController)
-            layoutTestController.notifyDone();
+        if (window.testRunner)
+            testRunner.notifyDone();
     }
     
     function returnToStart()
diff --git a/LayoutTests/transitions/cancel-transition.html b/LayoutTests/transitions/cancel-transition.html
index eab4f92..a5b08c6 100644
--- a/LayoutTests/transitions/cancel-transition.html
+++ b/LayoutTests/transitions/cancel-transition.html
@@ -38,9 +38,9 @@
         }
     </style>
     <script>
-        if (window.layoutTestController) {
-            layoutTestController.dumpAsText();
-            layoutTestController.waitUntilDone();
+        if (window.testRunner) {
+            testRunner.dumpAsText();
+            testRunner.waitUntilDone();
         }
 
         result = "<span style='color:red'>CHECK NOT COMPLETED</span>";
@@ -83,8 +83,8 @@
                 result += "<span style='color:green'>PASS</span>";
             
             document.getElementById('result').innerHTML = result;
-            if (window.layoutTestController)
-                layoutTestController.notifyDone();
+            if (window.testRunner)
+                testRunner.notifyDone();
         }
 
         function start()
diff --git a/LayoutTests/transitions/change-values-during-transition.html b/LayoutTests/transitions/change-values-during-transition.html
index fac607d..929a23a 100644
--- a/LayoutTests/transitions/change-values-during-transition.html
+++ b/LayoutTests/transitions/change-values-during-transition.html
@@ -13,9 +13,9 @@
     }
   </style>
   <script>
-    if (window.layoutTestController) {
-      layoutTestController.dumpAsText();
-      layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+      testRunner.dumpAsText();
+      testRunner.waitUntilDone();
     }
     
     var result = "PASS";
@@ -66,8 +66,8 @@
         }
         
         document.getElementById('result').innerText = result;
-        if (window.layoutTestController)
-            layoutTestController.notifyDone();
+        if (window.testRunner)
+            testRunner.notifyDone();
     }
     
     function goBack()
diff --git a/LayoutTests/transitions/equivalent-background-image-no-transition.html b/LayoutTests/transitions/equivalent-background-image-no-transition.html
index 458bad3..10798fd 100644
--- a/LayoutTests/transitions/equivalent-background-image-no-transition.html
+++ b/LayoutTests/transitions/equivalent-background-image-no-transition.html
@@ -15,9 +15,9 @@
     }
     </style>
     <script>
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     </script>
 </head>
@@ -31,13 +31,13 @@
     document.getElementById('foo').addEventListener('webkitTransitionEnd', function(evt) {
         if(evt.propertyName == "background-image" && !finished) {
             document.getElementById('result').innerHTML = ("FAIL: saw a background-image transition");
-            if (window.layoutTestController)
-                layoutTestController.notifyDone();
+            if (window.testRunner)
+                testRunner.notifyDone();
             finished = true;
         } else if(evt.propertyName == "top" && !finished) {
             document.getElementById('result').innerHTML = ("PASS: no background-image transition");
-            if (window.layoutTestController)
-                layoutTestController.notifyDone();
+            if (window.testRunner)
+                testRunner.notifyDone();
         }
     });
 
diff --git a/LayoutTests/transitions/extra-transition.html b/LayoutTests/transitions/extra-transition.html
index 8cfa7cd..c220197 100644
--- a/LayoutTests/transitions/extra-transition.html
+++ b/LayoutTests/transitions/extra-transition.html
@@ -58,9 +58,9 @@
   }
   </style>
   <script>
-  if (window.layoutTestController) {
-    layoutTestController.waitUntilDone();
-    layoutTestController.dumpAsText();
+  if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
   }
 
   function init()
@@ -83,8 +83,8 @@
         else
         log('transform="'+transform+'", expected "matrix(1, 0, 0, 1, 100, 0)": FAIL');
 
-      if (window.layoutTestController)
-        layoutTestController.notifyDone();
+      if (window.testRunner)
+        testRunner.notifyDone();
   }
   </script>
 </head>
diff --git a/LayoutTests/transitions/first-letter-color-transition.html b/LayoutTests/transitions/first-letter-color-transition.html
index f0c595c..ae7216c 100644
--- a/LayoutTests/transitions/first-letter-color-transition.html
+++ b/LayoutTests/transitions/first-letter-color-transition.html
@@ -21,9 +21,9 @@
 
 </style>
 <script  type="text/javascript" charset="utf-8">
-   if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+   if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
 
     var result = "";
@@ -35,8 +35,8 @@
            result += "FAIL";
 
         document.getElementById('result').innerHTML = result;
-        if (window.layoutTestController)
-            layoutTestController.notifyDone();
+        if (window.testRunner)
+            testRunner.notifyDone();
     }
 
     window.addEventListener('webkitTransitionEnd', transitionEnded, false);
diff --git a/LayoutTests/transitions/first-letter-transition.html b/LayoutTests/transitions/first-letter-transition.html
index becee08..4ea8262 100644
--- a/LayoutTests/transitions/first-letter-transition.html
+++ b/LayoutTests/transitions/first-letter-transition.html
@@ -40,9 +40,9 @@
 </style>
 <script src="resources/transition-test-helpers.js"></script>
 <script  type="text/javascript" charset="utf-8">
-   if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+   if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
 
     var result = "Transtions test result: <br><br>";
@@ -58,8 +58,8 @@
 
         if (transitions == 5) {
             document.getElementById('result').innerHTML = result;
-            if (window.layoutTestController)
-                layoutTestController.notifyDone();
+            if (window.testRunner)
+                testRunner.notifyDone();
         }
     }
 
diff --git a/LayoutTests/transitions/hang-with-bad-transition-list.html b/LayoutTests/transitions/hang-with-bad-transition-list.html
index 62ad4b2..ced6654 100644
--- a/LayoutTests/transitions/hang-with-bad-transition-list.html
+++ b/LayoutTests/transitions/hang-with-bad-transition-list.html
@@ -11,17 +11,17 @@
   <script>
     function checkRunning()
     {
-      var current = layoutTestController.numberOfActiveAnimations();
+      var current = testRunner.numberOfActiveAnimations();
       if (current == 0)
         document.getElementById('result').innerHTML = "Number of active animations before transition is (0) as expected";
       else
         document.getElementById('result').innerHTML = "Number of active transitions is (" + current + ") but was expecting (0)";
-      layoutTestController.notifyDone();
+      testRunner.notifyDone();
     }
     
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
         window.setTimeout(checkRunning, 300);            
     }
   </script>
diff --git a/LayoutTests/transitions/inherit-other-props.html b/LayoutTests/transitions/inherit-other-props.html
index 932ae54..5db968f 100644
--- a/LayoutTests/transitions/inherit-other-props.html
+++ b/LayoutTests/transitions/inherit-other-props.html
@@ -21,9 +21,9 @@
     }
   </style>
   <script>
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
 
     var kExpectedProp = [
@@ -75,8 +75,8 @@
 
       document.body.removeChild(document.getElementById('container'));
       document.getElementById('result').innerHTML = result;
-      if (window.layoutTestController)
-          layoutTestController.notifyDone();
+      if (window.testRunner)
+          testRunner.notifyDone();
     }
 
     window.addEventListener('load', testProperties, false);
diff --git a/LayoutTests/transitions/inherit.html b/LayoutTests/transitions/inherit.html
index d1dcb45..14c36ce 100644
--- a/LayoutTests/transitions/inherit.html
+++ b/LayoutTests/transitions/inherit.html
@@ -18,9 +18,9 @@
     }
   </style>
   <script>
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
 
     var kExpecteds = [
@@ -49,8 +49,8 @@
 
       document.body.removeChild(document.getElementById('container'));
       document.getElementById('result').innerHTML = result;
-      if (window.layoutTestController)
-          layoutTestController.notifyDone();
+      if (window.testRunner)
+          testRunner.notifyDone();
 
     }
 
diff --git a/LayoutTests/transitions/interrupt-transform-transition.html b/LayoutTests/transitions/interrupt-transform-transition.html
index b00602e..83a48d7 100644
--- a/LayoutTests/transitions/interrupt-transform-transition.html
+++ b/LayoutTests/transitions/interrupt-transform-transition.html
@@ -14,9 +14,9 @@
     }
   </style>
   <script>
-    if (window.layoutTestController) {
-      layoutTestController.dumpAsText();
-      layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+      testRunner.dumpAsText();
+      testRunner.waitUntilDone();
     }
 
     function test()
@@ -28,8 +28,8 @@
       var result = (xTranslate > 0) ? 'PASS' : 'FAIL: transition should be re-targeted from 200px in x, so x > 0';
       document.getElementById('result').innerHTML = result;
 
-      if (window.layoutTestController)
-          layoutTestController.notifyDone();
+      if (window.testRunner)
+          testRunner.notifyDone();
     }
 
     function startTest()
diff --git a/LayoutTests/transitions/interrupt-zero-duration.html b/LayoutTests/transitions/interrupt-zero-duration.html
index 19759d1..4af5142 100644
--- a/LayoutTests/transitions/interrupt-zero-duration.html
+++ b/LayoutTests/transitions/interrupt-zero-duration.html
@@ -14,9 +14,9 @@
     }
     </style>
     <script>
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
 
     result = "PASS";
@@ -57,8 +57,8 @@
         
         window.setTimeout(function() {
             document.getElementById('result').innerHTML = result;
-            if (window.layoutTestController)
-                layoutTestController.notifyDone();
+            if (window.testRunner)
+                testRunner.notifyDone();
         }, 800);
     }
     
diff --git a/LayoutTests/transitions/interrupted-accelerated-transition.html b/LayoutTests/transitions/interrupted-accelerated-transition.html
index a911df3..43a20de 100644
--- a/LayoutTests/transitions/interrupted-accelerated-transition.html
+++ b/LayoutTests/transitions/interrupted-accelerated-transition.html
@@ -17,9 +17,9 @@
         }
     </style>
     <script>
-        if (window.layoutTestController) {
-            layoutTestController.dumpAsText();
-            layoutTestController.waitUntilDone();
+        if (window.testRunner) {
+            testRunner.dumpAsText();
+            testRunner.waitUntilDone();
         }
         function loaded()
         {
diff --git a/LayoutTests/transitions/interrupted-all-transition.html b/LayoutTests/transitions/interrupted-all-transition.html
index 581fa1d..7bbcc25 100644
--- a/LayoutTests/transitions/interrupted-all-transition.html
+++ b/LayoutTests/transitions/interrupted-all-transition.html
@@ -19,9 +19,9 @@
     }
   </style>
   <script>
-    if (window.layoutTestController) {
-      layoutTestController.dumpAsText();
-      layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+      testRunner.dumpAsText();
+      testRunner.waitUntilDone();
     }
 
     function startTransition()
@@ -35,8 +35,8 @@
         window.setTimeout(function() {
           var boxPos = parseInt(window.getComputedStyle(box).left);
           document.getElementById('result').innerHTML = (boxPos < 200) ? "PASS" : "FAIL";
-          if (window.layoutTestController)
-              layoutTestController.notifyDone();
+          if (window.testRunner)
+              testRunner.notifyDone();
         }, 250);
       }, 500);
     }
diff --git a/LayoutTests/transitions/matched-transform-functions.html b/LayoutTests/transitions/matched-transform-functions.html
index 757068b..224472d 100644
--- a/LayoutTests/transitions/matched-transform-functions.html
+++ b/LayoutTests/transitions/matched-transform-functions.html
@@ -14,9 +14,9 @@
     
   </style>
   <script>
-    if (window.layoutTestController) {
-      layoutTestController.dumpAsText();
-      layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+      testRunner.dumpAsText();
+      testRunner.waitUntilDone();
     }
 
     function test()
@@ -25,8 +25,8 @@
       var result = (c.f < 200) ? 'PASS' : 'FAIL: transition should still be running, so y < 200';
       document.getElementById('result').innerHTML = result;
 
-      if (window.layoutTestController)
-          layoutTestController.notifyDone();
+      if (window.testRunner)
+          testRunner.notifyDone();
     }
     
     function startTest()
diff --git a/LayoutTests/transitions/move-after-transition.html b/LayoutTests/transitions/move-after-transition.html
index 5836d5a..dc4458f 100644
--- a/LayoutTests/transitions/move-after-transition.html
+++ b/LayoutTests/transitions/move-after-transition.html
@@ -47,14 +47,14 @@
       testDiv.style.webkitTransitionDuration = '0';
 
       testDiv.style.webkitTransform = 'translateX(150px)';
-      if (window.layoutTestController)
-        layoutTestController.notifyDone();
+      if (window.testRunner)
+        testRunner.notifyDone();
     }
     
     function startTest()
     {
-      if (window.layoutTestController)
-        layoutTestController.waitUntilDone();
+      if (window.testRunner)
+        testRunner.waitUntilDone();
 
       document.getElementById('tester').addEventListener('webkitTransitionEnd', testEnded, false);
       document.getElementById('container').className = 'moved';
diff --git a/LayoutTests/transitions/multiple-text-shadow-transition.html b/LayoutTests/transitions/multiple-text-shadow-transition.html
index 4c6a243..f040c63 100644
--- a/LayoutTests/transitions/multiple-text-shadow-transition.html
+++ b/LayoutTests/transitions/multiple-text-shadow-transition.html
@@ -30,9 +30,9 @@
   </style>
   <script>
 
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     function setupTest()
@@ -52,8 +52,8 @@
         else
             result.innerHTML = 'FAIL: saw ' + shadow.length + ' shadows during the transition';
         
-        if (window.layoutTestController)
-            layoutTestController.notifyDone();
+        if (window.testRunner)
+            testRunner.notifyDone();
     }
     
     window.addEventListener('load', setupTest, false);
diff --git a/LayoutTests/transitions/opacity-transition-zindex.html b/LayoutTests/transitions/opacity-transition-zindex.html
index ff520d1..fd67513 100644
--- a/LayoutTests/transitions/opacity-transition-zindex.html
+++ b/LayoutTests/transitions/opacity-transition-zindex.html
@@ -38,8 +38,8 @@
     }
   </style>
   <script>
-    if (window.layoutTestController)
-      layoutTestController.waitUntilDone();
+    if (window.testRunner)
+      testRunner.waitUntilDone();
 
     function runTest()
     {
@@ -47,11 +47,11 @@
       container.style.opacity = 1;
       
       // dump the tree in the middle of the transition
-      if (window.layoutTestController) {
-        if (layoutTestController.pauseTransitionAtTimeOnElementWithId)
-          window.setTimeout(function() { layoutTestController.pauseTransitionAtTimeOnElementWithId("opacity", 2.5, "first"); layoutTestController.notifyDone(); }, 0);
+      if (window.testRunner) {
+        if (testRunner.pauseTransitionAtTimeOnElementWithId)
+          window.setTimeout(function() { testRunner.pauseTransitionAtTimeOnElementWithId("opacity", 2.5, "first"); testRunner.notifyDone(); }, 0);
         else
-          window.setTimeout(function() { layoutTestController.notifyDone(); }, 2500);
+          window.setTimeout(function() { testRunner.notifyDone(); }, 2500);
       }
     }
     // FIXME: this should use runTransitionTest().
diff --git a/LayoutTests/transitions/override-transition-crash.html b/LayoutTests/transitions/override-transition-crash.html
index 9f3989c..6ce23c2 100644
--- a/LayoutTests/transitions/override-transition-crash.html
+++ b/LayoutTests/transitions/override-transition-crash.html
@@ -18,8 +18,8 @@
     }
   </style>
   <script>
-    if (window.layoutTestController) {
-      layoutTestController.dumpAsText();
+    if (window.testRunner) {
+      testRunner.dumpAsText();
     }
     
     function start()
diff --git a/LayoutTests/transitions/remove-transition-style.html b/LayoutTests/transitions/remove-transition-style.html
index 6cd0125..b5135c8 100644
--- a/LayoutTests/transitions/remove-transition-style.html
+++ b/LayoutTests/transitions/remove-transition-style.html
@@ -15,9 +15,9 @@
     }
   </style>
   <script>
-    if (window.layoutTestController) {
-      layoutTestController.waitUntilDone();
-      layoutTestController.dumpAsText();
+    if (window.testRunner) {
+      testRunner.waitUntilDone();
+      testRunner.dumpAsText();
     }
 
     function log(s)
@@ -28,14 +28,14 @@
 
     function testTransitions()
     {
-      if (window.layoutTestController) {
-        var numAnims = layoutTestController.numberOfActiveAnimations();
+      if (window.testRunner) {
+        var numAnims = testRunner.numberOfActiveAnimations();
         if (numAnims == 0)
           log('No running transitions: PASS');
         else
           log('Still ' + numAnims + ' transitions running: FAIL')
 
-        layoutTestController.notifyDone();
+        testRunner.notifyDone();
       }
     }
     
diff --git a/LayoutTests/transitions/repeated-firing-background-color.html b/LayoutTests/transitions/repeated-firing-background-color.html
index 250a648..fd47fa9 100644
--- a/LayoutTests/transitions/repeated-firing-background-color.html
+++ b/LayoutTests/transitions/repeated-firing-background-color.html
@@ -11,22 +11,22 @@
   <script>
     function checkRunning()
     {
-      if (!window.layoutTestController) {
+      if (!window.testRunner) {
         document.getElementById('result').innerHTML = "This test must be run in DRT."
         return;
       }
         
-      var current = layoutTestController.numberOfActiveAnimations();
+      var current = testRunner.numberOfActiveAnimations();
       if (current == 0)
         document.getElementById('result').innerHTML = "Number of active transitions is (0) as expected";
       else
         document.getElementById('result').innerHTML = "Number of active transitions is (" + current + ") but was expecting (0)";
-      layoutTestController.notifyDone();
+      testRunner.notifyDone();
     }
 
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
   </script>
 </head>
diff --git a/LayoutTests/transitions/retargetted-transition.html b/LayoutTests/transitions/retargetted-transition.html
index ea5a72b..5cfb620 100644
--- a/LayoutTests/transitions/retargetted-transition.html
+++ b/LayoutTests/transitions/retargetted-transition.html
@@ -13,9 +13,9 @@
     
   </style>
   <script>
-    if (window.layoutTestController) {
-      layoutTestController.dumpAsText();
-      layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+      testRunner.dumpAsText();
+      testRunner.waitUntilDone();
     }
 
     function test()
@@ -24,8 +24,8 @@
       var result = (c.f < 200) ? 'PASS' : 'FAIL: transition should still be running, so y < 200';
       document.getElementById('result').innerHTML = result;
 
-      if (window.layoutTestController)
-          layoutTestController.notifyDone();
+      if (window.testRunner)
+          testRunner.notifyDone();
     }
     
     function startTest()
diff --git a/LayoutTests/transitions/shadow.html b/LayoutTests/transitions/shadow.html
index d7ea36e..0e50cbe 100644
--- a/LayoutTests/transitions/shadow.html
+++ b/LayoutTests/transitions/shadow.html
@@ -22,9 +22,9 @@
     }
   </style>
   <script>
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     function start()
@@ -35,8 +35,8 @@
         box2.style.webkitBoxShadow = '5px 5px 5px rgba(0, 0, 0, 0.5)';
         window.setTimeout(function() {
               document.getElementById('result').innerHTML = "PASS";
-              if (window.layoutTestController)
-                  layoutTestController.notifyDone();
+              if (window.testRunner)
+                  testRunner.notifyDone();
           }, 300);
     }
     
diff --git a/LayoutTests/transitions/start-transform-transition.html b/LayoutTests/transitions/start-transform-transition.html
index f3e36b1..44915b5 100644
--- a/LayoutTests/transitions/start-transform-transition.html
+++ b/LayoutTests/transitions/start-transform-transition.html
@@ -16,9 +16,9 @@
     }
   </style>
   <script>
-    if (window.layoutTestController) {
-      layoutTestController.dumpAsText();
-      layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+      testRunner.dumpAsText();
+      testRunner.waitUntilDone();
     }
 
     function test()
@@ -30,8 +30,8 @@
       var result = (xTranslate > 0) ? 'PASS' : 'FAIL: transition should be running, so x > 0';
       document.getElementById('result').innerHTML = result;
 
-      if (window.layoutTestController)
-          layoutTestController.notifyDone();
+      if (window.testRunner)
+          testRunner.notifyDone();
     }
 
     function startTest()
diff --git a/LayoutTests/transitions/suspend-transform-transition.html b/LayoutTests/transitions/suspend-transform-transition.html
index bd3697b..208a95c 100644
--- a/LayoutTests/transitions/suspend-transform-transition.html
+++ b/LayoutTests/transitions/suspend-transform-transition.html
@@ -28,8 +28,8 @@
     }
   </style>
   <script>
-    if (window.layoutTestController)
-        layoutTestController.waitUntilDone();
+    if (window.testRunner)
+        testRunner.waitUntilDone();
     
     function suspendAndWaitForCompletion()
     {
@@ -37,8 +37,8 @@
             internals.suspendAnimations(document);
 
         window.setTimeout(function() {
-            if (window.layoutTestController)
-                layoutTestController.notifyDone();
+            if (window.testRunner)
+                testRunner.notifyDone();
         }, 250);
     }
     
diff --git a/LayoutTests/transitions/transition-drt-api-delay-expected.txt b/LayoutTests/transitions/transition-drt-api-delay-expected.txt
index 3d0c62e..9429f27 100644
--- a/LayoutTests/transitions/transition-drt-api-delay-expected.txt
+++ b/LayoutTests/transitions/transition-drt-api-delay-expected.txt
@@ -1,4 +1,4 @@
-Test for transition delay on layoutTestController API
+Test for transition delay on testRunner API
 
 This test works only in DumpRenderTree. It uses an API exposed only there to jump to a particular time in a running transition. Tests bug 22368
 
diff --git a/LayoutTests/transitions/transition-drt-api-delay.html b/LayoutTests/transitions/transition-drt-api-delay.html
index 5aa3b50..e824227 100644
--- a/LayoutTests/transitions/transition-drt-api-delay.html
+++ b/LayoutTests/transitions/transition-drt-api-delay.html
@@ -22,22 +22,22 @@
    <script src="resources/transition-test-helpers.js"></script>
    <script>
     function endTest() {
-      if (window.layoutTestController) {
-        layoutTestController.pauseTransitionAtTimeOnElementWithId("left", 2.0, "target");
+      if (window.testRunner) {
+        testRunner.pauseTransitionAtTimeOnElementWithId("left", 2.0, "target");
         var left = window.getComputedStyle(document.getElementById('target')).left;
         var result = "PASS";
         if (left != "125px") {
           result = "FAIL - expected 125px got " + left;
         }
         document.getElementById('result').innerHTML = "<p>" + result + "</p>";
-        layoutTestController.notifyDone();
+        testRunner.notifyDone();
       }
     }
     
     function startTest() {
-      if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+      if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
       }
       
       document.getElementById("target").className = "moved";
@@ -46,7 +46,7 @@
    </script>
 </head>
 <body onload="startTest()">
-  <h1>Test for transition delay on layoutTestController API</h1>
+  <h1>Test for transition delay on testRunner API</h1>
   
   <p>This test works only in DumpRenderTree. It uses an API exposed
     only there to jump to a particular time in a running transition.
diff --git a/LayoutTests/transitions/transition-drt-api.html b/LayoutTests/transitions/transition-drt-api.html
index be184d7..1bbd473 100644
--- a/LayoutTests/transitions/transition-drt-api.html
+++ b/LayoutTests/transitions/transition-drt-api.html
@@ -19,12 +19,12 @@
     }
    </style>
    <script>
-    if (window.layoutTestController)
-      layoutTestController.dumpAsText();
+    if (window.testRunner)
+      testRunner.dumpAsText();
 
     function endTest() {
-      if (window.layoutTestController) {
-        var paused = layoutTestController.pauseTransitionAtTimeOnElementWithId("left", 1.0, "target");
+      if (window.testRunner) {
+        var paused = testRunner.pauseTransitionAtTimeOnElementWithId("left", 1.0, "target");
         var result = "";
         if (paused)
           result = "PASS: correctly paused transition";
@@ -32,14 +32,14 @@
           result = "FAIL: failed to pause transition";
 
         document.getElementById('results').innerText = result;
-        layoutTestController.notifyDone();
+        testRunner.notifyDone();
       } else
         document.getElementById('results').innerText = "This test requires DRT";
     }
     
     function startTest() {
-      if (window.layoutTestController)
-        layoutTestController.waitUntilDone();
+      if (window.testRunner)
+        testRunner.waitUntilDone();
       
       document.getElementById("target").className = "moved";
       window.setTimeout(endTest, 0);
diff --git a/LayoutTests/transitions/transition-duration-cleared-in-transitionend-crash.html b/LayoutTests/transitions/transition-duration-cleared-in-transitionend-crash.html
index 0c01a86..44097d9 100644
--- a/LayoutTests/transitions/transition-duration-cleared-in-transitionend-crash.html
+++ b/LayoutTests/transitions/transition-duration-cleared-in-transitionend-crash.html
@@ -3,15 +3,15 @@
         This tests that we don't crash if we clear a transitions duration during the transition end callback.
         <div id="t" style="background-color:#000">test</div> 
         <script>
-            if (window.layoutTestController) {
-                layoutTestController.dumpAsText();
-                layoutTestController.waitUntilDone();
+            if (window.testRunner) {
+                testRunner.dumpAsText();
+                testRunner.waitUntilDone();
             }
             var el = document.getElementById('t');
             el.addEventListener('webkitTransitionEnd', function(){
                 el.style.webkitTransitionDuration = '';
-                if (window.layoutTestController)
-                    layoutTestController.notifyDone();
+                if (window.testRunner)
+                    testRunner.notifyDone();
             });
             el.style.cssText += ';-webkit-transition:background-color 0.2s;background-color:#fff'
         </script>
diff --git a/LayoutTests/transitions/transition-end-event-destroy-iframe.html b/LayoutTests/transitions/transition-end-event-destroy-iframe.html
index 77acff9..7b21b14 100644
--- a/LayoutTests/transitions/transition-end-event-destroy-iframe.html
+++ b/LayoutTests/transitions/transition-end-event-destroy-iframe.html
@@ -6,9 +6,9 @@
     }
   </style>
   <script>
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     function testFinished() {
@@ -19,8 +19,8 @@
             GCController.collect();
         document.getElementById('results').innerHTML = 'Did not crash, so PASSED';
         
-        if (window.layoutTestController)
-            layoutTestController.notifyDone();
+        if (window.testRunner)
+            testRunner.notifyDone();
     };
   </script>
 </head>
diff --git a/LayoutTests/transitions/transition-end-event-destroy-renderer.html b/LayoutTests/transitions/transition-end-event-destroy-renderer.html
index eca09e7..634d90a 100644
--- a/LayoutTests/transitions/transition-end-event-destroy-renderer.html
+++ b/LayoutTests/transitions/transition-end-event-destroy-renderer.html
@@ -11,9 +11,9 @@
     }
   </style>
   <script>
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
 
     var numDone = 0;
@@ -26,8 +26,8 @@
 
         document.getElementById('results').innerHTML = 'Did not crash, so PASSED';
 
-        if (window.layoutTestController)
-          layoutTestController.notifyDone();
+        if (window.testRunner)
+          testRunner.notifyDone();
       }
     }
 
diff --git a/LayoutTests/transitions/transition-end-event-rendering.html b/LayoutTests/transitions/transition-end-event-rendering.html
index f0aec52..959afd6 100644
--- a/LayoutTests/transitions/transition-end-event-rendering.html
+++ b/LayoutTests/transitions/transition-end-event-rendering.html
@@ -45,14 +45,14 @@
 
     function testEnded()
     {
-      if (window.layoutTestController)
-        layoutTestController.notifyDone();
+      if (window.testRunner)
+        testRunner.notifyDone();
     }
     
     function startTest()
     {
-      if (window.layoutTestController)
-        layoutTestController.waitUntilDone();
+      if (window.testRunner)
+        testRunner.waitUntilDone();
       document.getElementById('tester').addEventListener('webkitTransitionEnd', testEnded, false);
       document.getElementById('container').className = 'moved';
     }
diff --git a/LayoutTests/transitions/transition-hit-test-transform.html b/LayoutTests/transitions/transition-hit-test-transform.html
index 286233e..3c7b4a8 100644
--- a/LayoutTests/transitions/transition-hit-test-transform.html
+++ b/LayoutTests/transitions/transition-hit-test-transform.html
@@ -47,12 +47,12 @@
      
         function doTest()
         {
-            if (window.layoutTestController) {
-                if (!layoutTestController.pauseTransitionAtTimeOnElementWithId("-webkit-transform", 2.0, "target"))
+            if (window.testRunner) {
+                if (!testRunner.pauseTransitionAtTimeOnElementWithId("-webkit-transform", 2.0, "target"))
                     throw("Transition is not running");
         
                 checkResults();
-                layoutTestController.notifyDone();
+                testRunner.notifyDone();
             }
             else {
                 window.setTimeout("checkResults()", 2000);
@@ -61,9 +61,9 @@
     
         function startTest()
         {
-            if (window.layoutTestController) {
-                layoutTestController.dumpAsText();
-                layoutTestController.waitUntilDone();
+            if (window.testRunner) {
+                testRunner.dumpAsText();
+                testRunner.waitUntilDone();
             }
       
             document.getElementById("target").style.webkitTransform = "translateX(300px)";
diff --git a/LayoutTests/transitions/transition-hit-test.html b/LayoutTests/transitions/transition-hit-test.html
index f23ff81..0d1ce1a 100644
--- a/LayoutTests/transitions/transition-hit-test.html
+++ b/LayoutTests/transitions/transition-hit-test.html
@@ -45,12 +45,12 @@
      
         function doTest()
         {
-            if (window.layoutTestController) {
-                if (!layoutTestController.pauseTransitionAtTimeOnElementWithId("left", 2.0, "target"))
+            if (window.testRunner) {
+                if (!testRunner.pauseTransitionAtTimeOnElementWithId("left", 2.0, "target"))
                     throw("Transition is not running");
         
                 checkResults();
-                layoutTestController.notifyDone();
+                testRunner.notifyDone();
             }
             else {
                 window.setTimeout("checkResults()", 2000);
@@ -59,9 +59,9 @@
     
         function startTest()
         {
-            if (window.layoutTestController) {
-                layoutTestController.dumpAsText();
-                layoutTestController.waitUntilDone();
+            if (window.testRunner) {
+                testRunner.dumpAsText();
+                testRunner.waitUntilDone();
             }
       
             document.getElementById("target").style.left = "300px";
diff --git a/LayoutTests/transitions/zero-duration-with-non-zero-delay-end.html b/LayoutTests/transitions/zero-duration-with-non-zero-delay-end.html
index f7f6fa4..b024f70 100644
--- a/LayoutTests/transitions/zero-duration-with-non-zero-delay-end.html
+++ b/LayoutTests/transitions/zero-duration-with-non-zero-delay-end.html
@@ -22,7 +22,7 @@
    <script>
     function sample0() {
       var expected = 1;
-      var current = layoutTestController.numberOfActiveAnimations();
+      var current = testRunner.numberOfActiveAnimations();
       if (current == expected)
         document.getElementById('result0').innerHTML = "Number of active animations before transition is (" + current + ") as expected";
       else
@@ -31,13 +31,13 @@
     
     function sample1() {
       var expected = 0;
-      var current = layoutTestController.numberOfActiveAnimations();
+      var current = testRunner.numberOfActiveAnimations();
       if (current == expected)
         document.getElementById('result1').innerHTML = "Number of active animations after transition is (" + current + ") as expected";
       else
         document.getElementById('result1').innerHTML = "Number of active animations after transition is (" + current + ") but was expecting (" + expected + ")";
       
-      layoutTestController.notifyDone();
+      testRunner.notifyDone();
     }
     
     function runTest() {
@@ -48,9 +48,9 @@
     }
     
     function startTest() {
-      if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+      if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
         
         var target = document.getElementById('target');
         target.style.left = '200px';
diff --git a/LayoutTests/transitions/zero-duration-without-units.html b/LayoutTests/transitions/zero-duration-without-units.html
index 8f3cade..10cce47 100644
--- a/LayoutTests/transitions/zero-duration-without-units.html
+++ b/LayoutTests/transitions/zero-duration-without-units.html
@@ -13,8 +13,8 @@
     }
   </style>
   <script>
-    if (window.layoutTestController)
-      layoutTestController.dumpAsText();
+    if (window.testRunner)
+      testRunner.dumpAsText();
 
     function test()
     {
diff --git a/LayoutTests/traversal/hixie-node-iterator/001.xml b/LayoutTests/traversal/hixie-node-iterator/001.xml
index f9490a6..7283e87 100644
--- a/LayoutTests/traversal/hixie-node-iterator/001.xml
+++ b/LayoutTests/traversal/hixie-node-iterator/001.xml
@@ -3,7 +3,7 @@
   <title>DOM Traversal: NodeIterator: Basics</title>
   <script type="text/javascript"> <![CDATA[
     function doTest() {
-      if (window.layoutTestController) layoutTestController.dumpAsText();
+      if (window.testRunner) testRunner.dumpAsText();
       var iterator = document.createNodeIterator(document, NodeFilter.SHOW_ALL, null, false);
       var expected = new Array(9, // document
                                1, // html
diff --git a/LayoutTests/traversal/hixie-node-iterator/002.xml b/LayoutTests/traversal/hixie-node-iterator/002.xml
index 35f22ad..d9dd633 100644
--- a/LayoutTests/traversal/hixie-node-iterator/002.xml
+++ b/LayoutTests/traversal/hixie-node-iterator/002.xml
@@ -3,7 +3,7 @@
   <title>DOM Traversal: NodeIterator: Basics Backwards</title>
   <script type="text/javascript"> <![CDATA[
     function doTest() {
-      if (window.layoutTestController) layoutTestController.dumpAsText();
+      if (window.testRunner) testRunner.dumpAsText();
       var iterator = document.createNodeIterator(document, NodeFilter.SHOW_ALL, null, false);
       var expected = new Array(9, // document
                                1, // html
diff --git a/LayoutTests/traversal/hixie-node-iterator/003.xml b/LayoutTests/traversal/hixie-node-iterator/003.xml
index a6bcfe0..42b6b25 100644
--- a/LayoutTests/traversal/hixie-node-iterator/003.xml
+++ b/LayoutTests/traversal/hixie-node-iterator/003.xml
@@ -12,7 +12,7 @@
     var errors = 0;
     var log = '';
     function doTest() {
-      if (window.layoutTestController) layoutTestController.dumpAsText();
+      if (window.testRunner) testRunner.dumpAsText();
       var iterator = document.createNodeIterator(document.getElementById('root'), NodeFilter.SHOW_ALL, null, false);
       var root = document.getElementById('root');
       var A = document.getElementById('A');
diff --git a/LayoutTests/traversal/hixie-node-iterator/004.xml b/LayoutTests/traversal/hixie-node-iterator/004.xml
index 1292188..3f30a44 100644
--- a/LayoutTests/traversal/hixie-node-iterator/004.xml
+++ b/LayoutTests/traversal/hixie-node-iterator/004.xml
@@ -5,7 +5,7 @@
     var errors = 0;
     var log = '';
     function doTest() {
-      if (window.layoutTestController) layoutTestController.dumpAsText();
+      if (window.testRunner) testRunner.dumpAsText();
       var iterator = document.createNodeIterator(document.getElementById('root'), NodeFilter.SHOW_ALL, null, false);
       var root = document.getElementById('root');
       var A = document.getElementById('A');
diff --git a/LayoutTests/traversal/hixie-node-iterator/005.xml b/LayoutTests/traversal/hixie-node-iterator/005.xml
index d99b793..1b212d9 100644
--- a/LayoutTests/traversal/hixie-node-iterator/005.xml
+++ b/LayoutTests/traversal/hixie-node-iterator/005.xml
@@ -5,7 +5,7 @@
     var errors = 0;
     var log = '';
     function doTest() {
-      if (window.layoutTestController) layoutTestController.dumpAsText();
+      if (window.testRunner) testRunner.dumpAsText();
       var iterator = document.createNodeIterator(document.getElementById('root'), NodeFilter.SHOW_ALL, null, false);
       var root = document.getElementById('root');
       var A = document.getElementById('A');
diff --git a/LayoutTests/traversal/hixie-node-iterator/006.xml b/LayoutTests/traversal/hixie-node-iterator/006.xml
index aa91b91..58d3f77 100644
--- a/LayoutTests/traversal/hixie-node-iterator/006.xml
+++ b/LayoutTests/traversal/hixie-node-iterator/006.xml
@@ -5,7 +5,7 @@
     var errors = 0;
     var log = '';
     function doTest() {
-      if (window.layoutTestController) layoutTestController.dumpAsText();
+      if (window.testRunner) testRunner.dumpAsText();
       var iterator = document.createNodeIterator(document.getElementById('root'), NodeFilter.SHOW_ALL, null, false);
       var root = document.getElementById('root');
       var A = document.getElementById('A');
diff --git a/LayoutTests/traversal/hixie-node-iterator/007.xml b/LayoutTests/traversal/hixie-node-iterator/007.xml
index 0f9c049..e3bcff3 100644
--- a/LayoutTests/traversal/hixie-node-iterator/007.xml
+++ b/LayoutTests/traversal/hixie-node-iterator/007.xml
@@ -5,7 +5,7 @@
     var errors = 0;
     var log = '';
     function doTest() {
-      if (window.layoutTestController) layoutTestController.dumpAsText();
+      if (window.testRunner) testRunner.dumpAsText();
       var iterator = document.createNodeIterator(document.getElementById('root'), NodeFilter.SHOW_ALL, null, false);
       var root = document.getElementById('root');
       var A = document.getElementById('A');
diff --git a/LayoutTests/traversal/hixie-node-iterator/008.xml b/LayoutTests/traversal/hixie-node-iterator/008.xml
index 0962b4f..1aa2799 100644
--- a/LayoutTests/traversal/hixie-node-iterator/008.xml
+++ b/LayoutTests/traversal/hixie-node-iterator/008.xml
@@ -5,7 +5,7 @@
     var errors = 0;
     var log = '';
     function doTest() {
-      if (window.layoutTestController) layoutTestController.dumpAsText();
+      if (window.testRunner) testRunner.dumpAsText();
       var iterator = document.createNodeIterator(document.getElementById('root'), NodeFilter.SHOW_ALL, null, false);
       var root = document.getElementById('root');
       var A = document.getElementById('A');
diff --git a/LayoutTests/traversal/hixie-node-iterator/009.xml b/LayoutTests/traversal/hixie-node-iterator/009.xml
index 3c400fa..3cf0b66 100644
--- a/LayoutTests/traversal/hixie-node-iterator/009.xml
+++ b/LayoutTests/traversal/hixie-node-iterator/009.xml
@@ -5,7 +5,7 @@
     var errors = 0;
     var log = '';
     function doTest() {
-      if (window.layoutTestController) layoutTestController.dumpAsText();
+      if (window.testRunner) testRunner.dumpAsText();
       var iterator = document.createNodeIterator(document.getElementById('root'), NodeFilter.SHOW_ALL, null, false);
       var root = document.getElementById('root');
       var A = document.getElementById('A');
diff --git a/LayoutTests/traversal/hixie-node-iterator/010.xml b/LayoutTests/traversal/hixie-node-iterator/010.xml
index 5c67135..63e3d5b 100644
--- a/LayoutTests/traversal/hixie-node-iterator/010.xml
+++ b/LayoutTests/traversal/hixie-node-iterator/010.xml
@@ -3,7 +3,7 @@
   <title>DOM Traversal: NodeIterator: Filters</title>
   <script type="text/javascript"> <![CDATA[
     function doTest() {
-      if (window.layoutTestController) layoutTestController.dumpAsText();
+      if (window.testRunner) testRunner.dumpAsText();
       var iterator = document.createNodeIterator(document, NodeFilter.SHOW_ALL, testFilter, false);
       // skips text nodes and body element
       var expected = new Array(9, // document
diff --git a/LayoutTests/traversal/hixie-node-iterator/origin.txt b/LayoutTests/traversal/hixie-node-iterator/origin.txt
index 18b00f9..9f4224c 100644
--- a/LayoutTests/traversal/hixie-node-iterator/origin.txt
+++ b/LayoutTests/traversal/hixie-node-iterator/origin.txt
@@ -1,7 +1,7 @@
 I got these tests from http://www.hixie.ch/tests/adhoc/dom/traversal/node-iterator/ on February 3, 2008.
 The only changes I made were:
 
-    1) Add layoutTestController.dumpAsText() calls to each test.
+    1) Add testRunner.dumpAsText() calls to each test.
 
     2) Changed the <![CDATA[]]> near the bottom of tests 001, 002, and 010 to
        <![CDATA[ ]]> to work around <http://bugzilla.gnome.org/show_bug.cgi?id=514181>.
diff --git a/LayoutTests/traversal/moz-bug559526.html b/LayoutTests/traversal/moz-bug559526.html
index a375e19..a8b394c 100644
--- a/LayoutTests/traversal/moz-bug559526.html
+++ b/LayoutTests/traversal/moz-bug559526.html
@@ -28,8 +28,8 @@
 </div>
 <script type="application/javascript">
 
-if (window.layoutTestController)
-  layoutTestController.dumpAsText();
+if (window.testRunner)
+  testRunner.dumpAsText();
 
 /** Test for Bug 559526 **/
 
diff --git a/LayoutTests/traversal/moz-bug590771.html b/LayoutTests/traversal/moz-bug590771.html
index da92ef5..bc74085 100644
--- a/LayoutTests/traversal/moz-bug590771.html
+++ b/LayoutTests/traversal/moz-bug590771.html
@@ -14,8 +14,8 @@
 <pre id="test">
 <script type="application/javascript">
 
-if (window.layoutTestController)
-  layoutTestController.dumpAsText();
+if (window.testRunner)
+  testRunner.dumpAsText();
 
 /** Test for Bug 590771 **/
 
diff --git a/LayoutTests/traversal/moz-mutations-3.html b/LayoutTests/traversal/moz-mutations-3.html
index 70d8893..173f4b2 100644
--- a/LayoutTests/traversal/moz-mutations-3.html
+++ b/LayoutTests/traversal/moz-mutations-3.html
@@ -11,8 +11,8 @@
 Results available in the JavaScript console
 Test adapted from http://mxr.mozilla.org/mozilla-central/source/content/base/test/test_NodeIterator_mutations_3.html
 <script class="testbody" type="text/javascript">
-  if (window.layoutTestController)
-    layoutTestController.dumpAsText();
+  if (window.testRunner)
+    testRunner.dumpAsText();
 
   function $(id) {
     return document.getElementById(id);
diff --git a/LayoutTests/traversal/node-iterator-001.html b/LayoutTests/traversal/node-iterator-001.html
index 3e7b2d2..c77b263 100644
--- a/LayoutTests/traversal/node-iterator-001.html
+++ b/LayoutTests/traversal/node-iterator-001.html
@@ -9,8 +9,8 @@
 </div>
 <div style="font-family: Courier; font-size: 14;">
 <script>
-if (window.layoutTestController)
-    layoutTestController.dumpAsText();
+if (window.testRunner)
+    testRunner.dumpAsText();
 
 var root = document.getElementById('test');
 
diff --git a/LayoutTests/traversal/node-iterator-002.html b/LayoutTests/traversal/node-iterator-002.html
index 1d4730c..42c3a24 100644
--- a/LayoutTests/traversal/node-iterator-002.html
+++ b/LayoutTests/traversal/node-iterator-002.html
@@ -9,8 +9,8 @@
 </div>
 <div style="font-family: Courier; font-size: 14;">
 <script>
-if (window.layoutTestController)
-    layoutTestController.dumpAsText();
+if (window.testRunner)
+    testRunner.dumpAsText();
 
 var root = document.getElementById('test');
 
diff --git a/LayoutTests/traversal/node-iterator-003.html b/LayoutTests/traversal/node-iterator-003.html
index 535bcf7..4ee8121 100644
--- a/LayoutTests/traversal/node-iterator-003.html
+++ b/LayoutTests/traversal/node-iterator-003.html
@@ -9,8 +9,8 @@
 </div>
 <div style="font-family: Courier; font-size: 14;">
 <script>
-if (window.layoutTestController)
-    layoutTestController.dumpAsText();
+if (window.testRunner)
+    testRunner.dumpAsText();
 
 var root = document.getElementById('test');
 
diff --git a/LayoutTests/traversal/node-iterator-004.html b/LayoutTests/traversal/node-iterator-004.html
index a971be0..cd3f958 100644
--- a/LayoutTests/traversal/node-iterator-004.html
+++ b/LayoutTests/traversal/node-iterator-004.html
@@ -9,8 +9,8 @@
 </div>
 <div style="font-family: Courier; font-size: 14;">
 <script>
-if (window.layoutTestController)
-    layoutTestController.dumpAsText();
+if (window.testRunner)
+    testRunner.dumpAsText();
 
 var root = document.getElementById('test');
 
diff --git a/LayoutTests/traversal/node-iterator-005.html b/LayoutTests/traversal/node-iterator-005.html
index 6a38a79..e061998 100644
--- a/LayoutTests/traversal/node-iterator-005.html
+++ b/LayoutTests/traversal/node-iterator-005.html
@@ -9,8 +9,8 @@
 </div>
 <div style="font-family: Courier; font-size: 14;">
 <script>
-if (window.layoutTestController)
-    layoutTestController.dumpAsText();
+if (window.testRunner)
+    testRunner.dumpAsText();
 
 var root = document.getElementById('test');
 
diff --git a/LayoutTests/traversal/node-iterator-006.html b/LayoutTests/traversal/node-iterator-006.html
index 92f50e1..09cc218 100644
--- a/LayoutTests/traversal/node-iterator-006.html
+++ b/LayoutTests/traversal/node-iterator-006.html
@@ -7,8 +7,8 @@
 <div id="test"><span id="A"></span><span id="B"></span><span id="C"></span></div>
 <div style="font-family: Courier; font-size: 14;">
 <script>
-if (window.layoutTestController)
-    layoutTestController.dumpAsText();
+if (window.testRunner)
+    testRunner.dumpAsText();
 
 var root = document.getElementById('test');
 
diff --git a/LayoutTests/traversal/node-iterator-006a.html b/LayoutTests/traversal/node-iterator-006a.html
index d4c5b3f..b6d05ac 100644
--- a/LayoutTests/traversal/node-iterator-006a.html
+++ b/LayoutTests/traversal/node-iterator-006a.html
@@ -9,8 +9,8 @@
 </div>
 <div style="font-family: Courier; font-size: 14;">
 <script>
-if (window.layoutTestController)
-    layoutTestController.dumpAsText();
+if (window.testRunner)
+    testRunner.dumpAsText();
 
 var root = document.getElementById('test');
 
diff --git a/LayoutTests/traversal/node-iterator-007.html b/LayoutTests/traversal/node-iterator-007.html
index 18656b7f..72745a9 100644
--- a/LayoutTests/traversal/node-iterator-007.html
+++ b/LayoutTests/traversal/node-iterator-007.html
@@ -9,8 +9,8 @@
 </div>
 <div style="font-family: Courier; font-size: 14;">
 <script>
-if (window.layoutTestController)
-    layoutTestController.dumpAsText();
+if (window.testRunner)
+    testRunner.dumpAsText();
 
 var root = document.getElementById('test');
 
diff --git a/LayoutTests/traversal/node-iterator-008.html b/LayoutTests/traversal/node-iterator-008.html
index 455cd64..1c78e04 100644
--- a/LayoutTests/traversal/node-iterator-008.html
+++ b/LayoutTests/traversal/node-iterator-008.html
@@ -9,8 +9,8 @@
 </div>
 <div style="font-family: Courier; font-size: 14;">
 <script>
-if (window.layoutTestController)
-    layoutTestController.dumpAsText();
+if (window.testRunner)
+    testRunner.dumpAsText();
 
 var parent = document.getElementById('test');
 //var root = document.getElementById('A');
diff --git a/LayoutTests/traversal/node-iterator-009.html b/LayoutTests/traversal/node-iterator-009.html
index 9541f92..28e821f 100644
--- a/LayoutTests/traversal/node-iterator-009.html
+++ b/LayoutTests/traversal/node-iterator-009.html
@@ -8,8 +8,8 @@
   <div style="font-family: Courier; font-size: 14;">
     <script type="text/javascript" charset="utf-8">
 
-    if (window.layoutTestController)
-        layoutTestController.dumpAsText();
+    if (window.testRunner)
+        testRunner.dumpAsText();
 
       var dataURL = 'resources/node-iterator-009-data.xml';
       function fetchXML()
diff --git a/LayoutTests/traversal/node-iterator-prototype.html b/LayoutTests/traversal/node-iterator-prototype.html
index 08c66b2..feaf7a2 100644
--- a/LayoutTests/traversal/node-iterator-prototype.html
+++ b/LayoutTests/traversal/node-iterator-prototype.html
@@ -9,8 +9,8 @@
 it.</p>
 <div id="console"></div>
 <script>
-if (window.layoutTestController)
-    layoutTestController.dumpAsText();
+if (window.testRunner)
+    testRunner.dumpAsText();
 
 Node.prototype.foo = "parent";
 
diff --git a/LayoutTests/traversal/size-zero-run.html b/LayoutTests/traversal/size-zero-run.html
index 2394935..c67b22b 100644
--- a/LayoutTests/traversal/size-zero-run.html
+++ b/LayoutTests/traversal/size-zero-run.html
@@ -3,8 +3,8 @@
 <head>
 <script>
 function test() {
-    if(window.layoutTestController)
-        layoutTestController.dumpAsText();
+    if(window.testRunner)
+        testRunner.dumpAsText();
         
     var textnode1 = document.getElementById("node").firstChild;
     var textnode2 = textnode1.splitText(3);
diff --git a/LayoutTests/traversal/stay-within-root.html b/LayoutTests/traversal/stay-within-root.html
index 02f2d72..3e6483f 100644
--- a/LayoutTests/traversal/stay-within-root.html
+++ b/LayoutTests/traversal/stay-within-root.html
@@ -1,8 +1,8 @@
 <html>
 <head>
 <script language="JavaScript">
-if (window.layoutTestController)
-    layoutTestController.dumpAsText();
+if (window.testRunner)
+    testRunner.dumpAsText();
 
 function log(message) {
     var console = document.getElementById("console");
diff --git a/LayoutTests/traversal/tree-walker-001.html b/LayoutTests/traversal/tree-walker-001.html
index 62c7bae..e81478b 100644
--- a/LayoutTests/traversal/tree-walker-001.html
+++ b/LayoutTests/traversal/tree-walker-001.html
@@ -40,8 +40,8 @@
 </div>
 <div style="font-family: Courier; font-size: 14; white-space: pre">
 <script>
-if (window.layoutTestController)
-    layoutTestController.dumpAsText();
+if (window.testRunner)
+    testRunner.dumpAsText();
 
 var root = document.getElementById('test');
 var start = document.getElementById('A');
diff --git a/LayoutTests/traversal/tree-walker-002.html b/LayoutTests/traversal/tree-walker-002.html
index 9221ac5..4958f7a 100644
--- a/LayoutTests/traversal/tree-walker-002.html
+++ b/LayoutTests/traversal/tree-walker-002.html
@@ -40,8 +40,8 @@
 </div>
 <div style="font-family: Courier; font-size: 14; white-space: pre">
 <script>
-if (window.layoutTestController)
-    layoutTestController.dumpAsText();
+if (window.testRunner)
+    testRunner.dumpAsText();
 
 var root = document.getElementById('test');
 var start = document.getElementById('B');
diff --git a/LayoutTests/traversal/tree-walker-003.html b/LayoutTests/traversal/tree-walker-003.html
index 52b24fb..565708c 100644
--- a/LayoutTests/traversal/tree-walker-003.html
+++ b/LayoutTests/traversal/tree-walker-003.html
@@ -46,8 +46,8 @@
 </div>
 <div style="font-family: Courier; font-size: 14; white-space: pre">
 <script>
-if (window.layoutTestController)
-    layoutTestController.dumpAsText();
+if (window.testRunner)
+    testRunner.dumpAsText();
 
 var root = document.getElementById('test');
 var start = document.getElementById('A');
diff --git a/LayoutTests/traversal/tree-walker-004.html b/LayoutTests/traversal/tree-walker-004.html
index 3f5e1e6..46b6967 100644
--- a/LayoutTests/traversal/tree-walker-004.html
+++ b/LayoutTests/traversal/tree-walker-004.html
@@ -46,8 +46,8 @@
 </div>
 <div style="font-family: Courier; font-size: 14; white-space: pre">
 <script>
-if (window.layoutTestController)
-    layoutTestController.dumpAsText();
+if (window.testRunner)
+    testRunner.dumpAsText();
 
 var root = document.getElementById('test');
 var start = document.getElementById('A');
diff --git a/LayoutTests/traversal/tree-walker-005.html b/LayoutTests/traversal/tree-walker-005.html
index 70ae659..b94d6fe 100644
--- a/LayoutTests/traversal/tree-walker-005.html
+++ b/LayoutTests/traversal/tree-walker-005.html
@@ -46,8 +46,8 @@
 </div>
 <div style="font-family: Courier; font-size: 14; white-space: pre">
 <script>
-if (window.layoutTestController)
-    layoutTestController.dumpAsText();
+if (window.testRunner)
+    testRunner.dumpAsText();
 
 var root = document.getElementById('test');
 var start = document.getElementById('B');
diff --git a/LayoutTests/traversal/tree-walker-006.html b/LayoutTests/traversal/tree-walker-006.html
index 09ec0dd..2ba6c79 100644
--- a/LayoutTests/traversal/tree-walker-006.html
+++ b/LayoutTests/traversal/tree-walker-006.html
@@ -8,8 +8,8 @@
   <div style="font-family: Courier; font-size: 14;">
     <script type="text/javascript" charset="utf-8">
 
-    if (window.layoutTestController)
-        layoutTestController.dumpAsText();
+    if (window.testRunner)
+        testRunner.dumpAsText();
 
       var dataURL = 'resources/node-iterator-009-data.xml';
       function fetchXML()
diff --git a/LayoutTests/traversal/tree-walker-filter-1.html b/LayoutTests/traversal/tree-walker-filter-1.html
index 2777e2f..2c1b676 100644
--- a/LayoutTests/traversal/tree-walker-filter-1.html
+++ b/LayoutTests/traversal/tree-walker-filter-1.html
@@ -36,8 +36,8 @@
 }
 
 function test() {
-    if (window.layoutTestController)
-        layoutTestController.dumpAsText();
+    if (window.testRunner)
+        testRunner.dumpAsText();
 
     var wrapper = document.createElement("div"); // just to have one more level up.
 
diff --git a/LayoutTests/userscripts/document-element-available-at-start.html b/LayoutTests/userscripts/document-element-available-at-start.html
index 86e0d7b..272ad1d 100644
--- a/LayoutTests/userscripts/document-element-available-at-start.html
+++ b/LayoutTests/userscripts/document-element-available-at-start.html
@@ -2,9 +2,9 @@
 <html>
 <head>
 <script>
-if (window.layoutTestController) {
-    layoutTestController.dumpAsText();
-    layoutTestController.addUserScript("if (document.documentElement) console.log('SUCCESS');", true, true);
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.addUserScript("if (document.documentElement) console.log('SUCCESS');", true, true);
 }
 </script>
 </head>
diff --git a/LayoutTests/userscripts/mixed-case-stylesheet.html b/LayoutTests/userscripts/mixed-case-stylesheet.html
index d41cbac..3b1e5fd 100644
--- a/LayoutTests/userscripts/mixed-case-stylesheet.html
+++ b/LayoutTests/userscripts/mixed-case-stylesheet.html
@@ -1,9 +1,9 @@
 <html>
 <head>
 <script>
-if (window.layoutTestController) {
-    window.layoutTestController.dumpAsText();
-    window.layoutTestController.addUserStyleSheet("#mixedCase { display: none }", true);
+if (window.testRunner) {
+    window.testRunner.dumpAsText();
+    window.testRunner.addUserStyleSheet("#mixedCase { display: none }", true);
 }
 </script>
 </head>
diff --git a/LayoutTests/userscripts/resources/blank.xhtml b/LayoutTests/userscripts/resources/blank.xhtml
index 18b0070..d9928b5 100644
--- a/LayoutTests/userscripts/resources/blank.xhtml
+++ b/LayoutTests/userscripts/resources/blank.xhtml
@@ -3,8 +3,8 @@
 <body>
 <script>
 window.onload = function() {
-    if (window.layoutTestController)
-        layoutTestController.notifyDone();
+    if (window.testRunner)
+        testRunner.notifyDone();
 }
 </script>
 </body>
diff --git a/LayoutTests/userscripts/resources/frame2.html b/LayoutTests/userscripts/resources/frame2.html
index 9cd15b3..04c8eca 100644
--- a/LayoutTests/userscripts/resources/frame2.html
+++ b/LayoutTests/userscripts/resources/frame2.html
@@ -2,8 +2,8 @@
 <body>
 <script>
 window.onload = function() {
-    if (window.layoutTestController)
-        layoutTestController.notifyDone();
+    if (window.testRunner)
+        testRunner.notifyDone();
 }
 </script>
 <div id="thinger">thinger</div>
diff --git a/LayoutTests/userscripts/script-not-run-for-fragments.html b/LayoutTests/userscripts/script-not-run-for-fragments.html
index cd4e543..b746c1e 100644
--- a/LayoutTests/userscripts/script-not-run-for-fragments.html
+++ b/LayoutTests/userscripts/script-not-run-for-fragments.html
@@ -2,10 +2,10 @@
 <html>
 <head>
 <script>
-if (window.layoutTestController) {
-    layoutTestController.dumpAsText();
-    layoutTestController.waitUntilDone();
-    layoutTestController.addUserScript("console.log('injected: ' + document.location.href); var div = document.createElement('div'); div.innerHTML = '<p>hi</p>';", true, true);
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+    testRunner.addUserScript("console.log('injected: ' + document.location.href); var div = document.createElement('div'); div.innerHTML = '<p>hi</p>';", true, true);
 }
 </script>
 </head>
diff --git a/LayoutTests/userscripts/script-run-at-end.html b/LayoutTests/userscripts/script-run-at-end.html
index 462da88..830d978 100644
--- a/LayoutTests/userscripts/script-run-at-end.html
+++ b/LayoutTests/userscripts/script-run-at-end.html
@@ -2,9 +2,9 @@
 <html>
 <head>
 <script>
-if (window.layoutTestController) {
-    layoutTestController.dumpAsText();
-    layoutTestController.addUserScript("document.getElementById('target').innerHTML = 'PASS'", false, true);
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.addUserScript("document.getElementById('target').innerHTML = 'PASS'", false, true);
 }
 </script>
 </head>
diff --git a/LayoutTests/userscripts/script-run-at-start.html b/LayoutTests/userscripts/script-run-at-start.html
index 4aa2f35..ae05543 100644
--- a/LayoutTests/userscripts/script-run-at-start.html
+++ b/LayoutTests/userscripts/script-run-at-start.html
@@ -2,9 +2,9 @@
 <html>
 <head>
 <script>
-if (window.layoutTestController) {
-    layoutTestController.dumpAsText();
-    layoutTestController.addUserScript("if (window.location == 'about:blank') console.log('SUCCESS');", true, true);
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.addUserScript("if (window.location == 'about:blank') console.log('SUCCESS');", true, true);
 }
 </script>
 </head>
diff --git a/LayoutTests/userscripts/simple-stylesheet.html b/LayoutTests/userscripts/simple-stylesheet.html
index da004d0..f89b2f2 100644
--- a/LayoutTests/userscripts/simple-stylesheet.html
+++ b/LayoutTests/userscripts/simple-stylesheet.html
@@ -2,9 +2,9 @@
 <html>
 <head>
 <script>
-if (window.layoutTestController) {
-    layoutTestController.dumpAsText();
-    layoutTestController.addUserStyleSheet("div { width:0; }", true);
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.addUserStyleSheet("div { width:0; }", true);
 }
 </script>
 </head>
diff --git a/LayoutTests/userscripts/user-script-all-frames.html b/LayoutTests/userscripts/user-script-all-frames.html
index d850e58..f03e301 100644
--- a/LayoutTests/userscripts/user-script-all-frames.html
+++ b/LayoutTests/userscripts/user-script-all-frames.html
@@ -1,11 +1,11 @@
 <html>
 <head>
 <script>
-if (window.layoutTestController) {
-    window.layoutTestController.dumpAsText();
-    window.layoutTestController.dumpChildFramesAsText();
-    layoutTestController.waitUntilDone();
-    window.layoutTestController.addUserScript("document.getElementById('thinger').style.display = 'none';",
+if (window.testRunner) {
+    window.testRunner.dumpAsText();
+    window.testRunner.dumpChildFramesAsText();
+    testRunner.waitUntilDone();
+    window.testRunner.addUserScript("document.getElementById('thinger').style.display = 'none';",
                                               false, true);
 }
 </script>
diff --git a/LayoutTests/userscripts/user-script-audio-document.html b/LayoutTests/userscripts/user-script-audio-document.html
index 9f0dc62..b1422db 100644
--- a/LayoutTests/userscripts/user-script-audio-document.html
+++ b/LayoutTests/userscripts/user-script-audio-document.html
@@ -1,10 +1,10 @@
 <html>
 <head>
 <script>
-if (window.layoutTestController) {
-    window.layoutTestController.dumpAsText();
-    window.layoutTestController.addUserScript("console.log('Start Script: ' + document.location.href)", true, true);
-    window.layoutTestController.addUserScript("console.log('End Script: ' + document.location.href)", false, true);
+if (window.testRunner) {
+    window.testRunner.dumpAsText();
+    window.testRunner.addUserScript("console.log('Start Script: ' + document.location.href)", true, true);
+    window.testRunner.addUserScript("console.log('End Script: ' + document.location.href)", false, true);
 }
 </script>
 </head>
diff --git a/LayoutTests/userscripts/user-script-image-document.html b/LayoutTests/userscripts/user-script-image-document.html
index 826032a..46c0aab 100644
--- a/LayoutTests/userscripts/user-script-image-document.html
+++ b/LayoutTests/userscripts/user-script-image-document.html
@@ -1,10 +1,10 @@
 <html>
 <head>
 <script>
-if (window.layoutTestController) {
-    window.layoutTestController.dumpAsText();
-    window.layoutTestController.addUserScript("console.log('Start Script: ' + document.location.href)", true, true);
-    window.layoutTestController.addUserScript("console.log('End Script: ' + document.location.href)", false, true);
+if (window.testRunner) {
+    window.testRunner.dumpAsText();
+    window.testRunner.addUserScript("console.log('Start Script: ' + document.location.href)", true, true);
+    window.testRunner.addUserScript("console.log('End Script: ' + document.location.href)", false, true);
 }
 </script>
 </head>
diff --git a/LayoutTests/userscripts/user-script-plugin-document.html b/LayoutTests/userscripts/user-script-plugin-document.html
index 79ce4d9..ee5288a 100644
--- a/LayoutTests/userscripts/user-script-plugin-document.html
+++ b/LayoutTests/userscripts/user-script-plugin-document.html
@@ -1,10 +1,10 @@
 <html>
 <head>
 <script>
-if (window.layoutTestController) {
-    window.layoutTestController.dumpAsText();
-    window.layoutTestController.addUserScript("console.log('Start Script: ' + document.location.href)", true, true);
-    window.layoutTestController.addUserScript("console.log('End Script: ' + document.location.href)", false, true);
+if (window.testRunner) {
+    window.testRunner.dumpAsText();
+    window.testRunner.addUserScript("console.log('Start Script: ' + document.location.href)", true, true);
+    window.testRunner.addUserScript("console.log('End Script: ' + document.location.href)", false, true);
 }
 </script>
 </head>
diff --git a/LayoutTests/userscripts/user-script-top-frame-only.html b/LayoutTests/userscripts/user-script-top-frame-only.html
index 29d4f66..2c49140 100644
--- a/LayoutTests/userscripts/user-script-top-frame-only.html
+++ b/LayoutTests/userscripts/user-script-top-frame-only.html
@@ -1,11 +1,11 @@
 <html>
 <head>
 <script>
-if (window.layoutTestController) {
-    window.layoutTestController.dumpAsText();
-    window.layoutTestController.dumpChildFramesAsText();
-    layoutTestController.waitUntilDone();
-    window.layoutTestController.addUserScript("document.getElementById('thinger').style.display = 'none';",
+if (window.testRunner) {
+    window.testRunner.dumpAsText();
+    window.testRunner.dumpChildFramesAsText();
+    testRunner.waitUntilDone();
+    window.testRunner.addUserScript("document.getElementById('thinger').style.display = 'none';",
                                               false, false);
 }
 </script>
diff --git a/LayoutTests/userscripts/user-script-video-document.html b/LayoutTests/userscripts/user-script-video-document.html
index c3b69e5..b105c26 100644
--- a/LayoutTests/userscripts/user-script-video-document.html
+++ b/LayoutTests/userscripts/user-script-video-document.html
@@ -1,10 +1,10 @@
 <html>
 <head>
 <script>
-if (window.layoutTestController) {
-    window.layoutTestController.dumpAsText();
-    window.layoutTestController.addUserScript("console.log('Start Script: ' + document.location.href)", true, true);
-    window.layoutTestController.addUserScript("console.log('End Script: ' + document.location.href)", false, true);
+if (window.testRunner) {
+    window.testRunner.dumpAsText();
+    window.testRunner.addUserScript("console.log('Start Script: ' + document.location.href)", true, true);
+    window.testRunner.addUserScript("console.log('End Script: ' + document.location.href)", false, true);
 }
 </script>
 </head>
diff --git a/LayoutTests/userscripts/user-style-all-frames.html b/LayoutTests/userscripts/user-style-all-frames.html
index e361ff5e..7e1d714 100644
--- a/LayoutTests/userscripts/user-style-all-frames.html
+++ b/LayoutTests/userscripts/user-style-all-frames.html
@@ -1,11 +1,11 @@
 <html>
 <head>
 <script>
-if (window.layoutTestController) {
-    window.layoutTestController.dumpAsText();
-    window.layoutTestController.dumpChildFramesAsText();
-    layoutTestController.waitUntilDone();
-    window.layoutTestController.addUserStyleSheet("#thinger { display:none; }", true);
+if (window.testRunner) {
+    window.testRunner.dumpAsText();
+    window.testRunner.dumpChildFramesAsText();
+    testRunner.waitUntilDone();
+    window.testRunner.addUserStyleSheet("#thinger { display:none; }", true);
 }
 </script>
 </head>
diff --git a/LayoutTests/userscripts/user-style-top-frame-only.html b/LayoutTests/userscripts/user-style-top-frame-only.html
index f7c751c..d3134f4 100644
--- a/LayoutTests/userscripts/user-style-top-frame-only.html
+++ b/LayoutTests/userscripts/user-style-top-frame-only.html
@@ -1,11 +1,11 @@
 <html>
 <head>
 <script>
-if (window.layoutTestController) {
-    window.layoutTestController.dumpAsText();
-    window.layoutTestController.dumpChildFramesAsText();
-    layoutTestController.waitUntilDone();
-    window.layoutTestController.addUserStyleSheet("#thinger { display:none; }", false);
+if (window.testRunner) {
+    window.testRunner.dumpAsText();
+    window.testRunner.dumpChildFramesAsText();
+    testRunner.waitUntilDone();
+    window.testRunner.addUserStyleSheet("#thinger { display:none; }", false);
 }
 </script>
 </head>
diff --git a/LayoutTests/userscripts/window-onerror-for-isolated-world-1.html b/LayoutTests/userscripts/window-onerror-for-isolated-world-1.html
index af08a23..8369396 100644
--- a/LayoutTests/userscripts/window-onerror-for-isolated-world-1.html
+++ b/LayoutTests/userscripts/window-onerror-for-isolated-world-1.html
@@ -14,8 +14,8 @@
 var recordCount = 0;
 document.getElementById("console").addEventListener("DOMNodeInserted", function(e) {
     recordCount++;
-    if (recordCount === expectedRecordCount && window.layoutTestController)
-        layoutTestController.notifyDone();
+    if (recordCount === expectedRecordCount && window.testRunner)
+        testRunner.notifyDone();
 }, false);
 
 function log(msg) {
@@ -55,10 +55,10 @@
     throw new Error("Error in "+ isolatedWorld + " inline script.");
 }
 
-if (window.layoutTestController) {
-    layoutTestController.dumpAsText();
-    layoutTestController.waitUntilDone();
-    layoutTestController.addUserScript("(" + exceptions + ")('user script')", false, true);
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+    testRunner.addUserScript("(" + exceptions + ")('user script')", false, true);
 }
 
 exceptions("main world");
diff --git a/LayoutTests/userscripts/window-onerror-for-isolated-world-2.html b/LayoutTests/userscripts/window-onerror-for-isolated-world-2.html
index 4aa97e5..c485170 100644
--- a/LayoutTests/userscripts/window-onerror-for-isolated-world-2.html
+++ b/LayoutTests/userscripts/window-onerror-for-isolated-world-2.html
@@ -13,8 +13,8 @@
 var expectedRecordCount = 10;
 var recordCount = 0;
 document.getElementById("console").addEventListener("DOMNodeInserted", function(e) {
-    if (++recordCount === expectedRecordCount && window.layoutTestController)
-        layoutTestController.notifyDone();
+    if (++recordCount === expectedRecordCount && window.testRunner)
+        testRunner.notifyDone();
 }, false);
 
 var throwExceptions = function(isolatedWorld)
@@ -54,10 +54,10 @@
     }, false);
 };
 
-if (window.layoutTestController) {
-    layoutTestController.dumpAsText();
-    layoutTestController.waitUntilDone();
-    layoutTestController.addUserScript("(" + errorHandlers + ")('user script'); (" + throwExceptions + ")('user script')", false, true);
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+    testRunner.addUserScript("(" + errorHandlers + ")('user script'); (" + throwExceptions + ")('user script')", false, true);
 }
 
 throwExceptions("main world");
diff --git a/LayoutTests/webarchive/adopt-attribute-styled-body-webarchive-expected.webarchive b/LayoutTests/webarchive/adopt-attribute-styled-body-webarchive-expected.webarchive
index 8e6f029..b19dcd5 100644
--- a/LayoutTests/webarchive/adopt-attribute-styled-body-webarchive-expected.webarchive
+++ b/LayoutTests/webarchive/adopt-attribute-styled-body-webarchive-expected.webarchive
@@ -9,10 +9,10 @@
 
 &lt;script&gt;
 
-if (window.layoutTestController) {
-    layoutTestController.dumpDOMAsWebArchive();
-    layoutTestController.setCanOpenWindows();
-    layoutTestController.waitUntilDone();
+if (window.testRunner) {
+    testRunner.dumpDOMAsWebArchive();
+    testRunner.setCanOpenWindows();
+    testRunner.waitUntilDone();
 }
 
 var secondWindow = null;
@@ -53,10 +53,10 @@
     
     if (window.GCController) {
         GCController.collect();
-        if (window.layoutTestController)
-            layoutTestController.notifyDone();
+        if (window.testRunner)
+            testRunner.notifyDone();
         else
-            alert("How strange - You have window.GCController, but no window.layoutTestController.  How did this happen?");
+            alert("How strange - You have window.GCController, but no window.testRunner.  How did this happen?");
     }
     else
         alert("Now wait for garbage collection to have occured, then save the current page as a WebArchive.");
diff --git a/LayoutTests/webarchive/adopt-attribute-styled-body-webarchive.html b/LayoutTests/webarchive/adopt-attribute-styled-body-webarchive.html
index 30b26a7..d66b53e 100644
--- a/LayoutTests/webarchive/adopt-attribute-styled-body-webarchive.html
+++ b/LayoutTests/webarchive/adopt-attribute-styled-body-webarchive.html
@@ -3,10 +3,10 @@
 
 <script>
 
-if (window.layoutTestController) {
-    layoutTestController.dumpDOMAsWebArchive();
-    layoutTestController.setCanOpenWindows();
-    layoutTestController.waitUntilDone();
+if (window.testRunner) {
+    testRunner.dumpDOMAsWebArchive();
+    testRunner.setCanOpenWindows();
+    testRunner.waitUntilDone();
 }
 
 var secondWindow = null;
@@ -47,10 +47,10 @@
     
     if (window.GCController) {
         GCController.collect();
-        if (window.layoutTestController)
-            layoutTestController.notifyDone();
+        if (window.testRunner)
+            testRunner.notifyDone();
         else
-            alert("How strange - You have window.GCController, but no window.layoutTestController.  How did this happen?");
+            alert("How strange - You have window.GCController, but no window.testRunner.  How did this happen?");
     }
     else
         alert("Now wait for garbage collection to have occured, then save the current page as a WebArchive.");
diff --git a/LayoutTests/webarchive/adopt-attribute-styled-node-webarchive-expected.webarchive b/LayoutTests/webarchive/adopt-attribute-styled-node-webarchive-expected.webarchive
index 8791278..63845c8 100644
--- a/LayoutTests/webarchive/adopt-attribute-styled-node-webarchive-expected.webarchive
+++ b/LayoutTests/webarchive/adopt-attribute-styled-node-webarchive-expected.webarchive
@@ -9,10 +9,10 @@
 
 &lt;script&gt;
 
-if (window.layoutTestController) {
-    layoutTestController.dumpDOMAsWebArchive();
-    layoutTestController.setCanOpenWindows();
-    layoutTestController.waitUntilDone();
+if (window.testRunner) {
+    testRunner.dumpDOMAsWebArchive();
+    testRunner.setCanOpenWindows();
+    testRunner.waitUntilDone();
 }
 
 var otherWindow = null;
@@ -53,10 +53,10 @@
     
     if (window.GCController) {
         GCController.collect();
-        if (window.layoutTestController)
-            layoutTestController.notifyDone();
+        if (window.testRunner)
+            testRunner.notifyDone();
         else
-            alert("How strange - You have window.GCController, but no window.layoutTestController.  How did this happen?");
+            alert("How strange - You have window.GCController, but no window.testRunner.  How did this happen?");
     }
     else
         alert("Now wait for garbage collection to have occured, then save the current page as a WebArchive.");
diff --git a/LayoutTests/webarchive/adopt-attribute-styled-node-webarchive.html b/LayoutTests/webarchive/adopt-attribute-styled-node-webarchive.html
index 91c6c1e..f67e9c2 100644
--- a/LayoutTests/webarchive/adopt-attribute-styled-node-webarchive.html
+++ b/LayoutTests/webarchive/adopt-attribute-styled-node-webarchive.html
@@ -3,10 +3,10 @@
 
 <script>
 
-if (window.layoutTestController) {
-    layoutTestController.dumpDOMAsWebArchive();
-    layoutTestController.setCanOpenWindows();
-    layoutTestController.waitUntilDone();
+if (window.testRunner) {
+    testRunner.dumpDOMAsWebArchive();
+    testRunner.setCanOpenWindows();
+    testRunner.waitUntilDone();
 }
 
 var otherWindow = null;
@@ -47,10 +47,10 @@
     
     if (window.GCController) {
         GCController.collect();
-        if (window.layoutTestController)
-            layoutTestController.notifyDone();
+        if (window.testRunner)
+            testRunner.notifyDone();
         else
-            alert("How strange - You have window.GCController, but no window.layoutTestController.  How did this happen?");
+            alert("How strange - You have window.GCController, but no window.testRunner.  How did this happen?");
     }
     else
         alert("Now wait for garbage collection to have occured, then save the current page as a WebArchive.");
diff --git a/LayoutTests/webarchive/adopt-inline-styled-node-webarchive-expected.webarchive b/LayoutTests/webarchive/adopt-inline-styled-node-webarchive-expected.webarchive
index ea1fc8d..e8dd818 100644
--- a/LayoutTests/webarchive/adopt-inline-styled-node-webarchive-expected.webarchive
+++ b/LayoutTests/webarchive/adopt-inline-styled-node-webarchive-expected.webarchive
@@ -9,10 +9,10 @@
 
 &lt;script&gt;
 
-if (window.layoutTestController) {
-    layoutTestController.dumpDOMAsWebArchive();
-    layoutTestController.setCanOpenWindows();
-    layoutTestController.waitUntilDone();
+if (window.testRunner) {
+    testRunner.dumpDOMAsWebArchive();
+    testRunner.setCanOpenWindows();
+    testRunner.waitUntilDone();
 }
 
 var otherWindow = null;
@@ -53,10 +53,10 @@
     
     if (window.GCController) {
         GCController.collect();
-        if (window.layoutTestController)
-            layoutTestController.notifyDone();
+        if (window.testRunner)
+            testRunner.notifyDone();
         else
-            alert("How strange - You have window.GCController, but no window.layoutTestController.  How did this happen?");
+            alert("How strange - You have window.GCController, but no window.testRunner.  How did this happen?");
     }
     else
         alert("Now wait for garbage collection to have occured, then save the current page as a WebArchive.");
diff --git a/LayoutTests/webarchive/adopt-inline-styled-node-webarchive.html b/LayoutTests/webarchive/adopt-inline-styled-node-webarchive.html
index bb5e651..72db5e0 100644
--- a/LayoutTests/webarchive/adopt-inline-styled-node-webarchive.html
+++ b/LayoutTests/webarchive/adopt-inline-styled-node-webarchive.html
@@ -3,10 +3,10 @@
 
 <script>
 
-if (window.layoutTestController) {
-    layoutTestController.dumpDOMAsWebArchive();
-    layoutTestController.setCanOpenWindows();
-    layoutTestController.waitUntilDone();
+if (window.testRunner) {
+    testRunner.dumpDOMAsWebArchive();
+    testRunner.setCanOpenWindows();
+    testRunner.waitUntilDone();
 }
 
 var otherWindow = null;
@@ -47,10 +47,10 @@
     
     if (window.GCController) {
         GCController.collect();
-        if (window.layoutTestController)
-            layoutTestController.notifyDone();
+        if (window.testRunner)
+            testRunner.notifyDone();
         else
-            alert("How strange - You have window.GCController, but no window.layoutTestController.  How did this happen?");
+            alert("How strange - You have window.GCController, but no window.testRunner.  How did this happen?");
     }
     else
         alert("Now wait for garbage collection to have occured, then save the current page as a WebArchive.");
diff --git a/LayoutTests/webarchive/archive-empty-frame-dom-expected.webarchive b/LayoutTests/webarchive/archive-empty-frame-dom-expected.webarchive
index fa0b059..bc71a70 100644
--- a/LayoutTests/webarchive/archive-empty-frame-dom-expected.webarchive
+++ b/LayoutTests/webarchive/archive-empty-frame-dom-expected.webarchive
@@ -8,8 +8,8 @@
 		<string>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;&lt;html&gt;&lt;head&gt;
 &lt;title&gt;Empty iFrame causes archive exception&lt;/title&gt;
 &lt;script&gt;
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 &lt;/script&gt;
 &lt;/head&gt;
 &lt;body&gt;
diff --git a/LayoutTests/webarchive/archive-empty-frame-dom.html b/LayoutTests/webarchive/archive-empty-frame-dom.html
index 41b683e..47c1128 100644
--- a/LayoutTests/webarchive/archive-empty-frame-dom.html
+++ b/LayoutTests/webarchive/archive-empty-frame-dom.html
@@ -4,8 +4,8 @@
 <head>
 <title>Empty iFrame causes archive exception</title>
 <script>
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 </script>
 </head>
 <body>
diff --git a/LayoutTests/webarchive/archive-empty-frame-source-expected.webarchive b/LayoutTests/webarchive/archive-empty-frame-source-expected.webarchive
index df185e9..a7a220c 100644
--- a/LayoutTests/webarchive/archive-empty-frame-source-expected.webarchive
+++ b/LayoutTests/webarchive/archive-empty-frame-source-expected.webarchive
@@ -11,8 +11,8 @@
 &lt;head&gt;
 &lt;title&gt;Empty iFrame causes archive exception&lt;/title&gt;
 &lt;script&gt;
-    if (window.layoutTestController)
-        layoutTestController.dumpSourceAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpSourceAsWebArchive();
 &lt;/script&gt;
 &lt;/head&gt;
 &lt;body&gt;
diff --git a/LayoutTests/webarchive/archive-empty-frame-source.html b/LayoutTests/webarchive/archive-empty-frame-source.html
index df3deeb..3ef2820 100644
--- a/LayoutTests/webarchive/archive-empty-frame-source.html
+++ b/LayoutTests/webarchive/archive-empty-frame-source.html
@@ -4,8 +4,8 @@
 <head>
 <title>Empty iFrame causes archive exception</title>
 <script>
-    if (window.layoutTestController)
-        layoutTestController.dumpSourceAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpSourceAsWebArchive();
 </script>
 </head>
 <body>
diff --git a/LayoutTests/webarchive/archive-with-unencoded-url-expected.webarchive b/LayoutTests/webarchive/archive-with-unencoded-url-expected.webarchive
index 4d96007..0509903 100644
--- a/LayoutTests/webarchive/archive-with-unencoded-url-expected.webarchive
+++ b/LayoutTests/webarchive/archive-with-unencoded-url-expected.webarchive
@@ -7,8 +7,8 @@
 		<key>WebResourceData</key>
 		<string>&lt;html&gt;&lt;head&gt;
 &lt;script&gt;
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 &lt;/script&gt;
 &lt;/head&gt;
 &lt;body&gt;
diff --git a/LayoutTests/webarchive/archive-with-unencoded-url.html b/LayoutTests/webarchive/archive-with-unencoded-url.html
index 1350083..48aabe9 100644
--- a/LayoutTests/webarchive/archive-with-unencoded-url.html
+++ b/LayoutTests/webarchive/archive-with-unencoded-url.html
@@ -1,8 +1,8 @@
 <html>
 <head>
 <script>
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 </script>
 </head>
 <body>
diff --git a/LayoutTests/webarchive/css-page-rule-crash-expected.webarchive b/LayoutTests/webarchive/css-page-rule-crash-expected.webarchive
index 7535be6..29859c3 100644
--- a/LayoutTests/webarchive/css-page-rule-crash-expected.webarchive
+++ b/LayoutTests/webarchive/css-page-rule-crash-expected.webarchive
@@ -8,8 +8,8 @@
 		<string>&lt;html&gt;&lt;head&gt;
 &lt;script&gt;
 
-if (window.layoutTestController)
-    layoutTestController.dumpDOMAsWebArchive();
+if (window.testRunner)
+    testRunner.dumpDOMAsWebArchive();
 
 &lt;/script&gt;
 
diff --git a/LayoutTests/webarchive/css-page-rule-crash.html b/LayoutTests/webarchive/css-page-rule-crash.html
index 64e3dde..10f4c4f 100644
--- a/LayoutTests/webarchive/css-page-rule-crash.html
+++ b/LayoutTests/webarchive/css-page-rule-crash.html
@@ -1,8 +1,8 @@
 <head>
 <script>
 
-if (window.layoutTestController)
-    layoutTestController.dumpDOMAsWebArchive();
+if (window.testRunner)
+    testRunner.dumpDOMAsWebArchive();
 
 </script>
 
diff --git a/LayoutTests/webarchive/doctype-expected.webarchive b/LayoutTests/webarchive/doctype-expected.webarchive
index 7e778c9..3fc7967 100644
--- a/LayoutTests/webarchive/doctype-expected.webarchive
+++ b/LayoutTests/webarchive/doctype-expected.webarchive
@@ -11,8 +11,8 @@
 &lt;title&gt;Test for Bug 15290: REGRESSION (r14184-r14216): Duplicate DOCTYPE definitions when saving files as webarchives&lt;/title&gt;
 &lt;/head&gt;
 &lt;script&gt;
-    if (window.layoutTestController)
-        layoutTestController.dumpSourceAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpSourceAsWebArchive();
 &lt;/script&gt;
 &lt;body&gt;
 &lt;div&gt;
diff --git a/LayoutTests/webarchive/doctype.html b/LayoutTests/webarchive/doctype.html
index d580beb..4887a26 100644
--- a/LayoutTests/webarchive/doctype.html
+++ b/LayoutTests/webarchive/doctype.html
@@ -4,8 +4,8 @@
 <title>Test for Bug 15290: REGRESSION (r14184-r14216): Duplicate DOCTYPE definitions when saving files as webarchives</title>
 </head>
 <script>
-    if (window.layoutTestController)
-        layoutTestController.dumpSourceAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpSourceAsWebArchive();
 </script>
 <body>
 <div>
diff --git a/LayoutTests/webarchive/ignore-noscript-if-scripting-enabled-expected.txt b/LayoutTests/webarchive/ignore-noscript-if-scripting-enabled-expected.txt
index 7e6bb35..d91e944 100644
--- a/LayoutTests/webarchive/ignore-noscript-if-scripting-enabled-expected.txt
+++ b/LayoutTests/webarchive/ignore-noscript-if-scripting-enabled-expected.txt
@@ -7,8 +7,8 @@
 		<key>WebResourceData</key>
 		<string>&lt;html&gt;&lt;head&gt;
 &lt;script&gt;
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 &lt;/script&gt;
 &lt;/head&gt;
 &lt;body&gt;
diff --git a/LayoutTests/webarchive/ignore-noscript-if-scripting-enabled.html b/LayoutTests/webarchive/ignore-noscript-if-scripting-enabled.html
index 65ec652..a9a6a7d 100644
--- a/LayoutTests/webarchive/ignore-noscript-if-scripting-enabled.html
+++ b/LayoutTests/webarchive/ignore-noscript-if-scripting-enabled.html
@@ -1,8 +1,8 @@
 <html>
 <head>
 <script>
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 </script>
 </head>
 <body>
diff --git a/LayoutTests/webarchive/loading/cache-expired-subresource.html b/LayoutTests/webarchive/loading/cache-expired-subresource.html
index 6fd3826..b110ae8 100644
--- a/LayoutTests/webarchive/loading/cache-expired-subresource.html
+++ b/LayoutTests/webarchive/loading/cache-expired-subresource.html
@@ -1,13 +1,13 @@
 <html>
 <script>
-    if (window.layoutTestController) {
-        layoutTestController.dumpResourceLoadCallbacks();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpResourceLoadCallbacks();
+        testRunner.waitUntilDone();
     }
     
     function frameLoaded() {
-        if (window.layoutTestController)
-            layoutTestController.notifyDone();
+        if (window.testRunner)
+            testRunner.notifyDone();
     }
 </script>
 <body>
diff --git a/LayoutTests/webarchive/loading/javascript-url-iframe-crash.html b/LayoutTests/webarchive/loading/javascript-url-iframe-crash.html
index 47fd0ca..124f9fa 100644
--- a/LayoutTests/webarchive/loading/javascript-url-iframe-crash.html
+++ b/LayoutTests/webarchive/loading/javascript-url-iframe-crash.html
@@ -1,8 +1,8 @@
 <html>
 <script>
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     window.location="resources/javascript-url-iframe-crash.webarchive";
diff --git a/LayoutTests/webarchive/loading/mainresource-null-mimetype-crash.html b/LayoutTests/webarchive/loading/mainresource-null-mimetype-crash.html
index e73215bd..e4fdb98 100644
--- a/LayoutTests/webarchive/loading/mainresource-null-mimetype-crash.html
+++ b/LayoutTests/webarchive/loading/mainresource-null-mimetype-crash.html
@@ -1,7 +1,7 @@
 <html>
 <script>
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
     }
     
     window.location="resources/mainresource-null-mimetype.webarchive";
diff --git a/LayoutTests/webarchive/loading/missing-data.html b/LayoutTests/webarchive/loading/missing-data.html
index a54359a..5017411 100644
--- a/LayoutTests/webarchive/loading/missing-data.html
+++ b/LayoutTests/webarchive/loading/missing-data.html
@@ -1,5 +1,5 @@
 <script>
-    if (window.layoutTestController)
-        layoutTestController.dumpAsText();
+    if (window.testRunner)
+        testRunner.dumpAsText();
     window.location="resources/missing-data.webarchive";
 </script>
diff --git a/LayoutTests/webarchive/loading/test-loading-archive-subresource-null-mimetype.html b/LayoutTests/webarchive/loading/test-loading-archive-subresource-null-mimetype.html
index d4af4cb..f9765df 100644
--- a/LayoutTests/webarchive/loading/test-loading-archive-subresource-null-mimetype.html
+++ b/LayoutTests/webarchive/loading/test-loading-archive-subresource-null-mimetype.html
@@ -1,14 +1,14 @@
 <html>
 <script>
-    if (window.layoutTestController) {
-        layoutTestController.dumpResourceLoadCallbacks();
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpResourceLoadCallbacks();
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     function frameLoaded() {
-        if (window.layoutTestController)
-            layoutTestController.notifyDone();
+        if (window.testRunner)
+            testRunner.notifyDone();
     }
 </script>
 <body>
diff --git a/LayoutTests/webarchive/loading/test-loading-archive.html b/LayoutTests/webarchive/loading/test-loading-archive.html
index 897ff13..1ebc18a 100644
--- a/LayoutTests/webarchive/loading/test-loading-archive.html
+++ b/LayoutTests/webarchive/loading/test-loading-archive.html
@@ -1,14 +1,14 @@
 <html>
 <script>
-    if (window.layoutTestController) {
-        layoutTestController.dumpResourceLoadCallbacks();
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpResourceLoadCallbacks();
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     function frameLoaded() {
-        if (window.layoutTestController)
-            layoutTestController.notifyDone();
+        if (window.testRunner)
+            testRunner.notifyDone();
     }
 </script>
 <body>
diff --git a/LayoutTests/webarchive/test-body-background-expected.webarchive b/LayoutTests/webarchive/test-body-background-expected.webarchive
index ce30f59..be37731 100644
--- a/LayoutTests/webarchive/test-body-background-expected.webarchive
+++ b/LayoutTests/webarchive/test-body-background-expected.webarchive
@@ -7,8 +7,8 @@
 		<key>WebResourceData</key>
 		<string>&lt;html&gt;&lt;head&gt;
 &lt;script&gt;
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 &lt;/script&gt;
 &lt;/head&gt;
 &lt;body background="resources/apple.gif"&gt;
diff --git a/LayoutTests/webarchive/test-body-background.html b/LayoutTests/webarchive/test-body-background.html
index 6aa5785..f2fd8d2 100644
--- a/LayoutTests/webarchive/test-body-background.html
+++ b/LayoutTests/webarchive/test-body-background.html
@@ -1,8 +1,8 @@
 <html>
 <head>
 <script>
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 </script>
 </head>
 <body background="resources/apple.gif">
diff --git a/LayoutTests/webarchive/test-css-import-expected.webarchive b/LayoutTests/webarchive/test-css-import-expected.webarchive
index ce5ca68..09ca8a0 100644
--- a/LayoutTests/webarchive/test-css-import-expected.webarchive
+++ b/LayoutTests/webarchive/test-css-import-expected.webarchive
@@ -7,8 +7,8 @@
 		<key>WebResourceData</key>
 		<string>&lt;html&gt;&lt;head&gt;
 &lt;script&gt;
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 &lt;/script&gt;
 &lt;link rel="stylesheet" href="resources/test-css-link.css" type="text/css"&gt;
 &lt;style type="text/css"&gt;
diff --git a/LayoutTests/webarchive/test-css-import.html b/LayoutTests/webarchive/test-css-import.html
index 5e23f57..a0cc8c4 100644
--- a/LayoutTests/webarchive/test-css-import.html
+++ b/LayoutTests/webarchive/test-css-import.html
@@ -1,8 +1,8 @@
 <html>
 <head>
 <script>
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 </script>
 <link rel="stylesheet" href="resources/test-css-link.css" type="text/css">
 <style type="text/css">
diff --git a/LayoutTests/webarchive/test-css-url-resources-in-stylesheets-expected.webarchive b/LayoutTests/webarchive/test-css-url-resources-in-stylesheets-expected.webarchive
index 759a9d0..14671aa 100644
--- a/LayoutTests/webarchive/test-css-url-resources-in-stylesheets-expected.webarchive
+++ b/LayoutTests/webarchive/test-css-url-resources-in-stylesheets-expected.webarchive
@@ -7,17 +7,17 @@
 		<key>WebResourceData</key>
 		<string>&lt;html&gt;&lt;head&gt;
 &lt;script&gt;
-if (window.layoutTestController) {
-    layoutTestController.dumpDOMAsWebArchive();
-    layoutTestController.waitUntilDone();
+if (window.testRunner) {
+    testRunner.dumpDOMAsWebArchive();
+    testRunner.waitUntilDone();
 }
 
 function notifyDone()
 {
-    if (window.layoutTestController) {
+    if (window.testRunner) {
         // FIXME: Web fonts are loaded asynchronously, and there is
         // no way to know when they're done, so just wait a bit.
-        setTimeout("layoutTestController.notifyDone()", 1000);
+        setTimeout("testRunner.notifyDone()", 1000);
     }
 }
 &lt;/script&gt;
diff --git a/LayoutTests/webarchive/test-css-url-resources-in-stylesheets.html b/LayoutTests/webarchive/test-css-url-resources-in-stylesheets.html
index 2dae80c..37a7200 100644
--- a/LayoutTests/webarchive/test-css-url-resources-in-stylesheets.html
+++ b/LayoutTests/webarchive/test-css-url-resources-in-stylesheets.html
@@ -1,17 +1,17 @@
 <html>
 <head>
 <script>
-if (window.layoutTestController) {
-    layoutTestController.dumpDOMAsWebArchive();
-    layoutTestController.waitUntilDone();
+if (window.testRunner) {
+    testRunner.dumpDOMAsWebArchive();
+    testRunner.waitUntilDone();
 }
 
 function notifyDone()
 {
-    if (window.layoutTestController) {
+    if (window.testRunner) {
         // FIXME: Web fonts are loaded asynchronously, and there is
         // no way to know when they're done, so just wait a bit.
-        setTimeout("layoutTestController.notifyDone()", 1000);
+        setTimeout("testRunner.notifyDone()", 1000);
     }
 }
 </script>
diff --git a/LayoutTests/webarchive/test-css-url-resources-inline-styles-expected.webarchive b/LayoutTests/webarchive/test-css-url-resources-inline-styles-expected.webarchive
index 2c6f6cd..9332a0f 100644
--- a/LayoutTests/webarchive/test-css-url-resources-inline-styles-expected.webarchive
+++ b/LayoutTests/webarchive/test-css-url-resources-inline-styles-expected.webarchive
@@ -7,17 +7,17 @@
 		<key>WebResourceData</key>
 		<string>&lt;html&gt;&lt;head&gt;
 &lt;script&gt;
-if (window.layoutTestController) {
-    layoutTestController.dumpDOMAsWebArchive();
-    layoutTestController.waitUntilDone();
+if (window.testRunner) {
+    testRunner.dumpDOMAsWebArchive();
+    testRunner.waitUntilDone();
 }
 
 function notifyDone()
 {
-    if (window.layoutTestController) {
+    if (window.testRunner) {
         // FIXME: Web fonts are loaded asynchronously, and there is
         // no way to know when they're done, so just wait a bit.
-        setTimeout("layoutTestController.notifyDone()", 1000);
+        setTimeout("testRunner.notifyDone()", 1000);
     }
 }
 &lt;/script&gt;
diff --git a/LayoutTests/webarchive/test-css-url-resources-inline-styles.html b/LayoutTests/webarchive/test-css-url-resources-inline-styles.html
index 4a0e2e0..1648928 100644
--- a/LayoutTests/webarchive/test-css-url-resources-inline-styles.html
+++ b/LayoutTests/webarchive/test-css-url-resources-inline-styles.html
@@ -1,17 +1,17 @@
 <html>
 <head>
 <script>
-if (window.layoutTestController) {
-    layoutTestController.dumpDOMAsWebArchive();
-    layoutTestController.waitUntilDone();
+if (window.testRunner) {
+    testRunner.dumpDOMAsWebArchive();
+    testRunner.waitUntilDone();
 }
 
 function notifyDone()
 {
-    if (window.layoutTestController) {
+    if (window.testRunner) {
         // FIXME: Web fonts are loaded asynchronously, and there is
         // no way to know when they're done, so just wait a bit.
-        setTimeout("layoutTestController.notifyDone()", 1000);
+        setTimeout("testRunner.notifyDone()", 1000);
     }
 }
 </script>
diff --git a/LayoutTests/webarchive/test-duplicate-resources-expected.webarchive b/LayoutTests/webarchive/test-duplicate-resources-expected.webarchive
index 6a3a0a1..2fe7916 100644
--- a/LayoutTests/webarchive/test-duplicate-resources-expected.webarchive
+++ b/LayoutTests/webarchive/test-duplicate-resources-expected.webarchive
@@ -221,8 +221,8 @@
 		</dict>
 		<dict>
 			<key>WebResourceData</key>
-			<string>if (window.layoutTestController)
-    layoutTestController.dumpDOMAsWebArchive();
+			<string>if (window.testRunner)
+    testRunner.dumpDOMAsWebArchive();
 </string>
 			<key>WebResourceMIMEType</key>
 			<string>text/javascript</string>
diff --git a/LayoutTests/webarchive/test-frameset-expected.webarchive b/LayoutTests/webarchive/test-frameset-expected.webarchive
index 061b1e1..aaa122e 100644
--- a/LayoutTests/webarchive/test-frameset-expected.webarchive
+++ b/LayoutTests/webarchive/test-frameset-expected.webarchive
@@ -7,8 +7,8 @@
 		<key>WebResourceData</key>
 		<string>&lt;html&gt;&lt;head&gt;
 &lt;script&gt;
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 &lt;/script&gt;
 &lt;/head&gt;
 &lt;frameset rows="*"&gt;
diff --git a/LayoutTests/webarchive/test-frameset.html b/LayoutTests/webarchive/test-frameset.html
index 79dfabf..1409c33 100644
--- a/LayoutTests/webarchive/test-frameset.html
+++ b/LayoutTests/webarchive/test-frameset.html
@@ -1,8 +1,8 @@
 <html>
 <head>
 <script>
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 </script>
 </head>
 <frameset rows="*">
diff --git a/LayoutTests/webarchive/test-img-src-expected.webarchive b/LayoutTests/webarchive/test-img-src-expected.webarchive
index b524469..64be830 100644
--- a/LayoutTests/webarchive/test-img-src-expected.webarchive
+++ b/LayoutTests/webarchive/test-img-src-expected.webarchive
@@ -7,8 +7,8 @@
 		<key>WebResourceData</key>
 		<string>&lt;html&gt;&lt;head&gt;
 &lt;script&gt;
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 &lt;/script&gt;
 &lt;/head&gt;
 &lt;body&gt;
diff --git a/LayoutTests/webarchive/test-img-src.html b/LayoutTests/webarchive/test-img-src.html
index 064e3da..a65dd40 100644
--- a/LayoutTests/webarchive/test-img-src.html
+++ b/LayoutTests/webarchive/test-img-src.html
@@ -1,8 +1,8 @@
 <html>
 <head>
 <script>
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 </script>
 </head>
 <body>
diff --git a/LayoutTests/webarchive/test-input-src-expected.webarchive b/LayoutTests/webarchive/test-input-src-expected.webarchive
index 804a2b7..ae859ca 100644
--- a/LayoutTests/webarchive/test-input-src-expected.webarchive
+++ b/LayoutTests/webarchive/test-input-src-expected.webarchive
@@ -7,8 +7,8 @@
 		<key>WebResourceData</key>
 		<string>&lt;html&gt;&lt;head&gt;
 &lt;script&gt;
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 &lt;/script&gt;
 &lt;/head&gt;
 &lt;body&gt;
diff --git a/LayoutTests/webarchive/test-input-src.html b/LayoutTests/webarchive/test-input-src.html
index a2ebdd8..d075e75 100644
--- a/LayoutTests/webarchive/test-input-src.html
+++ b/LayoutTests/webarchive/test-input-src.html
@@ -1,8 +1,8 @@
 <html>
 <head>
 <script>
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 </script>
 </head>
 <body>
diff --git a/LayoutTests/webarchive/test-link-href-expected.webarchive b/LayoutTests/webarchive/test-link-href-expected.webarchive
index 27d4483..c2e126e 100644
--- a/LayoutTests/webarchive/test-link-href-expected.webarchive
+++ b/LayoutTests/webarchive/test-link-href-expected.webarchive
@@ -7,8 +7,8 @@
 		<key>WebResourceData</key>
 		<string>&lt;html&gt;&lt;head&gt;
 &lt;script&gt;
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 &lt;/script&gt;
 &lt;link rel="stylesheet" href="resources/test-style.css" type="text/css"&gt;
 &lt;/head&gt;
diff --git a/LayoutTests/webarchive/test-link-href.html b/LayoutTests/webarchive/test-link-href.html
index 367d5ba..084a12e 100644
--- a/LayoutTests/webarchive/test-link-href.html
+++ b/LayoutTests/webarchive/test-link-href.html
@@ -1,8 +1,8 @@
 <html>
 <head>
 <script>
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 </script>
 <link rel="stylesheet" href="resources/test-style.css" type="text/css">
 </head>
diff --git a/LayoutTests/webarchive/test-link-rel-icon-beforeload-expected.webarchive b/LayoutTests/webarchive/test-link-rel-icon-beforeload-expected.webarchive
index 73c885f..3a2606f 100644
--- a/LayoutTests/webarchive/test-link-rel-icon-beforeload-expected.webarchive
+++ b/LayoutTests/webarchive/test-link-rel-icon-beforeload-expected.webarchive
@@ -9,10 +9,10 @@
 &lt;script&gt;
 function runTest()
 {
-    if (window.layoutTestController) {
-        layoutTestController.setIconDatabaseEnabled(true);
-        layoutTestController.dumpDOMAsWebArchive();
-        layoutTestController.queueReload();
+    if (window.testRunner) {
+        testRunner.setIconDatabaseEnabled(true);
+        testRunner.dumpDOMAsWebArchive();
+        testRunner.queueReload();
     }
 }
 &lt;/script&gt;
diff --git a/LayoutTests/webarchive/test-link-rel-icon-beforeload.html b/LayoutTests/webarchive/test-link-rel-icon-beforeload.html
index 5c0bb84..e149995 100644
--- a/LayoutTests/webarchive/test-link-rel-icon-beforeload.html
+++ b/LayoutTests/webarchive/test-link-rel-icon-beforeload.html
@@ -3,10 +3,10 @@
 <script>
 function runTest()
 {
-    if (window.layoutTestController) {
-        layoutTestController.setIconDatabaseEnabled(true);
-        layoutTestController.dumpDOMAsWebArchive();
-        layoutTestController.queueReload();
+    if (window.testRunner) {
+        testRunner.setIconDatabaseEnabled(true);
+        testRunner.dumpDOMAsWebArchive();
+        testRunner.queueReload();
     }
 }
 </script>
diff --git a/LayoutTests/webarchive/test-link-rel-icon-expected.webarchive b/LayoutTests/webarchive/test-link-rel-icon-expected.webarchive
index 5780282..a9a0d11 100644
--- a/LayoutTests/webarchive/test-link-rel-icon-expected.webarchive
+++ b/LayoutTests/webarchive/test-link-rel-icon-expected.webarchive
@@ -9,10 +9,10 @@
 &lt;script&gt;
 function runTest()
 {
-    if (window.layoutTestController) {
-        layoutTestController.setIconDatabaseEnabled(true);
-        layoutTestController.dumpDOMAsWebArchive();
-        layoutTestController.queueReload();
+    if (window.testRunner) {
+        testRunner.setIconDatabaseEnabled(true);
+        testRunner.dumpDOMAsWebArchive();
+        testRunner.queueReload();
     }
 }
 &lt;/script&gt;
diff --git a/LayoutTests/webarchive/test-link-rel-icon.html b/LayoutTests/webarchive/test-link-rel-icon.html
index 7d0d141..41b5810 100644
--- a/LayoutTests/webarchive/test-link-rel-icon.html
+++ b/LayoutTests/webarchive/test-link-rel-icon.html
@@ -3,10 +3,10 @@
 <script>
 function runTest()
 {
-    if (window.layoutTestController) {
-        layoutTestController.setIconDatabaseEnabled(true);
-        layoutTestController.dumpDOMAsWebArchive();
-        layoutTestController.queueReload();
+    if (window.testRunner) {
+        testRunner.setIconDatabaseEnabled(true);
+        testRunner.dumpDOMAsWebArchive();
+        testRunner.queueReload();
     }
 }
 </script>
diff --git a/LayoutTests/webarchive/test-object-data-expected.webarchive b/LayoutTests/webarchive/test-object-data-expected.webarchive
index 29e0856..f4abe8a 100644
--- a/LayoutTests/webarchive/test-object-data-expected.webarchive
+++ b/LayoutTests/webarchive/test-object-data-expected.webarchive
@@ -7,8 +7,8 @@
 		<key>WebResourceData</key>
 		<string>&lt;html&gt;&lt;head&gt;
 &lt;script&gt;
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 &lt;/script&gt;
 &lt;/head&gt;
 &lt;body&gt;
diff --git a/LayoutTests/webarchive/test-object-data.html b/LayoutTests/webarchive/test-object-data.html
index c134d8e..0a795d6 100644
--- a/LayoutTests/webarchive/test-object-data.html
+++ b/LayoutTests/webarchive/test-object-data.html
@@ -1,8 +1,8 @@
 <html>
 <head>
 <script>
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 </script>
 </head>
 <body>
diff --git a/LayoutTests/webarchive/test-script-src-expected.webarchive b/LayoutTests/webarchive/test-script-src-expected.webarchive
index cc9701c..ba60a29 100644
--- a/LayoutTests/webarchive/test-script-src-expected.webarchive
+++ b/LayoutTests/webarchive/test-script-src-expected.webarchive
@@ -25,8 +25,8 @@
 	<array>
 		<dict>
 			<key>WebResourceData</key>
-			<string>if (window.layoutTestController)
-    layoutTestController.dumpDOMAsWebArchive();
+			<string>if (window.testRunner)
+    testRunner.dumpDOMAsWebArchive();
 </string>
 			<key>WebResourceMIMEType</key>
 			<string>text/javascript</string>
diff --git a/LayoutTests/webarchive/test-table-background-expected.webarchive b/LayoutTests/webarchive/test-table-background-expected.webarchive
index c76a09e..7ebb7af 100644
--- a/LayoutTests/webarchive/test-table-background-expected.webarchive
+++ b/LayoutTests/webarchive/test-table-background-expected.webarchive
@@ -7,8 +7,8 @@
 		<key>WebResourceData</key>
 		<string>&lt;html&gt;&lt;head&gt;
 &lt;script&gt;
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 &lt;/script&gt;
 &lt;/head&gt;
 &lt;body&gt;
diff --git a/LayoutTests/webarchive/test-table-background.html b/LayoutTests/webarchive/test-table-background.html
index e26072a..151a781 100644
--- a/LayoutTests/webarchive/test-table-background.html
+++ b/LayoutTests/webarchive/test-table-background.html
@@ -1,8 +1,8 @@
 <html>
 <head>
 <script>
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 </script>
 </head>
 <body>
diff --git a/LayoutTests/webarchive/test-td-background-expected.webarchive b/LayoutTests/webarchive/test-td-background-expected.webarchive
index ccdbc72..9382da8 100644
--- a/LayoutTests/webarchive/test-td-background-expected.webarchive
+++ b/LayoutTests/webarchive/test-td-background-expected.webarchive
@@ -7,8 +7,8 @@
 		<key>WebResourceData</key>
 		<string>&lt;html&gt;&lt;head&gt;
 &lt;script&gt;
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 &lt;/script&gt;
 &lt;/head&gt;
 &lt;body&gt;
diff --git a/LayoutTests/webarchive/test-td-background.html b/LayoutTests/webarchive/test-td-background.html
index b8f58fb..c085443 100644
--- a/LayoutTests/webarchive/test-td-background.html
+++ b/LayoutTests/webarchive/test-td-background.html
@@ -1,8 +1,8 @@
 <html>
 <head>
 <script>
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
 </script>
 </head>
 <body>
diff --git a/LayoutTests/webarchive/test-xml-stylesheet-expected.webarchive b/LayoutTests/webarchive/test-xml-stylesheet-expected.webarchive
index 2410065..9cb9a14 100644
--- a/LayoutTests/webarchive/test-xml-stylesheet-expected.webarchive
+++ b/LayoutTests/webarchive/test-xml-stylesheet-expected.webarchive
@@ -7,8 +7,8 @@
 		<key>WebResourceData</key>
 		<string>&lt;?xml-stylesheet href="resources/test-xml-stylesheet.css" type="text/css"?&gt;&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
   &lt;script&gt;
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
   &lt;/script&gt;
   &lt;style&gt;
     div { background: red; width: 100px; height: 100px; }
diff --git a/LayoutTests/webarchive/test-xml-stylesheet.xml b/LayoutTests/webarchive/test-xml-stylesheet.xml
index 4cc54a2..2d5a36b 100644
--- a/LayoutTests/webarchive/test-xml-stylesheet.xml
+++ b/LayoutTests/webarchive/test-xml-stylesheet.xml
@@ -1,8 +1,8 @@
 <?xml-stylesheet href="resources/test-xml-stylesheet.css" type="text/css"?>
 <html xmlns="http://www.w3.org/1999/xhtml">
   <script>
-    if (window.layoutTestController)
-        layoutTestController.dumpDOMAsWebArchive();
+    if (window.testRunner)
+        testRunner.dumpDOMAsWebArchive();
   </script>
   <style>
     div { background: red; width: 100px; height: 100px; }
diff --git a/LayoutTests/webaudio/audiobuffersource-channels.html b/LayoutTests/webaudio/audiobuffersource-channels.html
index e54b9e1..f24ed60 100644
--- a/LayoutTests/webaudio/audiobuffersource-channels.html
+++ b/LayoutTests/webaudio/audiobuffersource-channels.html
@@ -17,9 +17,9 @@
 var source;
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/audiobuffersource-multi-channels.html b/LayoutTests/webaudio/audiobuffersource-multi-channels.html
index d298459..ae828f3 100644
--- a/LayoutTests/webaudio/audiobuffersource-multi-channels.html
+++ b/LayoutTests/webaudio/audiobuffersource-multi-channels.html
@@ -14,10 +14,10 @@
 <script>
 
 function runTest() {
-    if (!window.layoutTestController)
+    if (!window.testRunner)
         return;
 
-    layoutTestController.waitUntilDone();
+    testRunner.waitUntilDone();
 
     window.jsTestAsync = true;
 
diff --git a/LayoutTests/webaudio/audiobuffersource-playbackState.html b/LayoutTests/webaudio/audiobuffersource-playbackState.html
index 4abc745..c32f996 100644
--- a/LayoutTests/webaudio/audiobuffersource-playbackState.html
+++ b/LayoutTests/webaudio/audiobuffersource-playbackState.html
@@ -97,9 +97,9 @@
 
 function runTest()
 {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
 
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/audiobuffersource-playbackrate.html b/LayoutTests/webaudio/audiobuffersource-playbackrate.html
index f51c3ae..6f1e5ff 100644
--- a/LayoutTests/webaudio/audiobuffersource-playbackrate.html
+++ b/LayoutTests/webaudio/audiobuffersource-playbackrate.html
@@ -67,7 +67,7 @@
 }
 
 function init() {
-    if (!window.layoutTestController)
+    if (!window.testRunner)
         return;
 
     // Create offline audio context.
@@ -92,7 +92,7 @@
     context.oncomplete = finishAudioTest;
     context.startRendering();
 
-    layoutTestController.waitUntilDone();
+    testRunner.waitUntilDone();
 }
 
 </script>
diff --git a/LayoutTests/webaudio/audiobuffersource.html b/LayoutTests/webaudio/audiobuffersource.html
index 2768aed..0b2874e 100644
--- a/LayoutTests/webaudio/audiobuffersource.html
+++ b/LayoutTests/webaudio/audiobuffersource.html
@@ -20,7 +20,7 @@
 var bufferLoader = 0;
 
 function init() {
-    if (!window.layoutTestController)
+    if (!window.testRunner)
         return;
         
     // Create offline audio context.
@@ -35,7 +35,7 @@
     );
     
     bufferLoader.load();
-    layoutTestController.waitUntilDone();
+    testRunner.waitUntilDone();
 }
 
 function finishedLoading(bufferList) {
diff --git a/LayoutTests/webaudio/audiochannelmerger-basic.html b/LayoutTests/webaudio/audiochannelmerger-basic.html
index 62e5787..f66c567 100644
--- a/LayoutTests/webaudio/audiochannelmerger-basic.html
+++ b/LayoutTests/webaudio/audiochannelmerger-basic.html
@@ -15,9 +15,9 @@
 description("Basic tests for AudioChannelMerger.");
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
 
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/audiochannelmerger-stereo.html b/LayoutTests/webaudio/audiochannelmerger-stereo.html
index b334d0e..c466c68 100644
--- a/LayoutTests/webaudio/audiochannelmerger-stereo.html
+++ b/LayoutTests/webaudio/audiochannelmerger-stereo.html
@@ -70,9 +70,9 @@
 }
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/audiochannelsplitter.html b/LayoutTests/webaudio/audiochannelsplitter.html
index b07a65c..be9adac 100644
--- a/LayoutTests/webaudio/audiochannelsplitter.html
+++ b/LayoutTests/webaudio/audiochannelsplitter.html
@@ -73,9 +73,9 @@
 }
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
 
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/audionode-connect-order.html b/LayoutTests/webaudio/audionode-connect-order.html
index ff1b426..ab4c402 100644
--- a/LayoutTests/webaudio/audionode-connect-order.html
+++ b/LayoutTests/webaudio/audionode-connect-order.html
@@ -32,9 +32,9 @@
 }
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/audionode.html b/LayoutTests/webaudio/audionode.html
index ee77d21..da00da2 100644
--- a/LayoutTests/webaudio/audionode.html
+++ b/LayoutTests/webaudio/audionode.html
@@ -17,9 +17,9 @@
 var context2 = 0;
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/audioparam-connect-audioratesignal.html b/LayoutTests/webaudio/audioparam-connect-audioratesignal.html
index a05361a..173ac6f 100644
--- a/LayoutTests/webaudio/audioparam-connect-audioratesignal.html
+++ b/LayoutTests/webaudio/audioparam-connect-audioratesignal.html
@@ -59,9 +59,9 @@
 }
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
 
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/audioparam-summingjunction.html b/LayoutTests/webaudio/audioparam-summingjunction.html
index d9551b5..9c267ef 100644
--- a/LayoutTests/webaudio/audioparam-summingjunction.html
+++ b/LayoutTests/webaudio/audioparam-summingjunction.html
@@ -72,9 +72,9 @@
 }
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
 
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/automatic-pull-node.html b/LayoutTests/webaudio/automatic-pull-node.html
index e234ce0..e273745 100644
--- a/LayoutTests/webaudio/automatic-pull-node.html
+++ b/LayoutTests/webaudio/automatic-pull-node.html
@@ -118,9 +118,9 @@
 }
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
 
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/biquad-allpass.html b/LayoutTests/webaudio/biquad-allpass.html
index 26628fe..ecfcc95 100644
--- a/LayoutTests/webaudio/biquad-allpass.html
+++ b/LayoutTests/webaudio/biquad-allpass.html
@@ -17,9 +17,9 @@
 description("Tests Biquad allpass filter.");
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/biquad-bandpass.html b/LayoutTests/webaudio/biquad-bandpass.html
index 3b15452..34e2567 100644
--- a/LayoutTests/webaudio/biquad-bandpass.html
+++ b/LayoutTests/webaudio/biquad-bandpass.html
@@ -17,9 +17,9 @@
 description("Tests Biquad bandpass filter.");
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/biquad-getFrequencyResponse.html b/LayoutTests/webaudio/biquad-getFrequencyResponse.html
index 77dd405..4762da6 100644
--- a/LayoutTests/webaudio/biquad-getFrequencyResponse.html
+++ b/LayoutTests/webaudio/biquad-getFrequencyResponse.html
@@ -271,9 +271,9 @@
 
 function runTest()
 {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
 
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/biquad-highpass.html b/LayoutTests/webaudio/biquad-highpass.html
index 30b7dea..56730c5 100644
--- a/LayoutTests/webaudio/biquad-highpass.html
+++ b/LayoutTests/webaudio/biquad-highpass.html
@@ -17,9 +17,9 @@
 description("Tests Biquad highpass filter.");
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/biquad-highshelf.html b/LayoutTests/webaudio/biquad-highshelf.html
index 62497fa..ce29a43 100644
--- a/LayoutTests/webaudio/biquad-highshelf.html
+++ b/LayoutTests/webaudio/biquad-highshelf.html
@@ -17,9 +17,9 @@
 description("Tests Biquad highshelf filter.");
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/biquad-lowpass.html b/LayoutTests/webaudio/biquad-lowpass.html
index 2c0a33b..1a9af8e 100644
--- a/LayoutTests/webaudio/biquad-lowpass.html
+++ b/LayoutTests/webaudio/biquad-lowpass.html
@@ -17,9 +17,9 @@
 description("Tests Biquad lowpass filter.");
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/biquad-lowshelf.html b/LayoutTests/webaudio/biquad-lowshelf.html
index 8c75f9c..c0df1bc 100644
--- a/LayoutTests/webaudio/biquad-lowshelf.html
+++ b/LayoutTests/webaudio/biquad-lowshelf.html
@@ -17,9 +17,9 @@
 description("Tests Biquad lowshelf filter.");
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/biquad-notch.html b/LayoutTests/webaudio/biquad-notch.html
index 201a08d..6c4a672 100644
--- a/LayoutTests/webaudio/biquad-notch.html
+++ b/LayoutTests/webaudio/biquad-notch.html
@@ -17,9 +17,9 @@
 description("Tests Biquad notch filter.");
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/biquad-peaking.html b/LayoutTests/webaudio/biquad-peaking.html
index 6a04483..8519a64 100644
--- a/LayoutTests/webaudio/biquad-peaking.html
+++ b/LayoutTests/webaudio/biquad-peaking.html
@@ -17,9 +17,9 @@
 description("Tests Biquad peaking filter.");
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/biquadfilternode-basic.html b/LayoutTests/webaudio/biquadfilternode-basic.html
index fd8e56a..f1c9e50 100644
--- a/LayoutTests/webaudio/biquadfilternode-basic.html
+++ b/LayoutTests/webaudio/biquadfilternode-basic.html
@@ -16,9 +16,9 @@
 var context = 0;
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/convolution-mono-mono.html b/LayoutTests/webaudio/convolution-mono-mono.html
index ba496b3..0fb42d7 100644
--- a/LayoutTests/webaudio/convolution-mono-mono.html
+++ b/LayoutTests/webaudio/convolution-mono-mono.html
@@ -27,9 +27,9 @@
 // the result should be exactly zero because the inputs are exactly
 // zero.
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/convolver-setBuffer-null.html b/LayoutTests/webaudio/convolver-setBuffer-null.html
index a042767..e771c26 100644
--- a/LayoutTests/webaudio/convolver-setBuffer-null.html
+++ b/LayoutTests/webaudio/convolver-setBuffer-null.html
@@ -15,9 +15,9 @@
 
 function runTest()
 {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
 
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/delaynode-maxdelay.html b/LayoutTests/webaudio/delaynode-maxdelay.html
index de7593a..e27c53c 100644
--- a/LayoutTests/webaudio/delaynode-maxdelay.html
+++ b/LayoutTests/webaudio/delaynode-maxdelay.html
@@ -16,9 +16,9 @@
 description("Tests basic functionality of DelayNode with a non-default max delay time.");
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/delaynode-scheduling.html b/LayoutTests/webaudio/delaynode-scheduling.html
index 9986d92..14dfbd2 100644
--- a/LayoutTests/webaudio/delaynode-scheduling.html
+++ b/LayoutTests/webaudio/delaynode-scheduling.html
@@ -16,9 +16,9 @@
 description("Tests that DelayNode delayTime parameter can be scheduled at a given time.");
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/delaynode.html b/LayoutTests/webaudio/delaynode.html
index a632ee7..c73ba67 100644
--- a/LayoutTests/webaudio/delaynode.html
+++ b/LayoutTests/webaudio/delaynode.html
@@ -16,9 +16,9 @@
 description("Tests basic functionality of DelayNode.");
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/distance-exponential.html b/LayoutTests/webaudio/distance-exponential.html
index b6afc0e..c059d15 100644
--- a/LayoutTests/webaudio/distance-exponential.html
+++ b/LayoutTests/webaudio/distance-exponential.html
@@ -15,9 +15,9 @@
       description("Test exponential distance model of AudioPannerNode.");
 
       function runTest() {
-          if (window.layoutTestController) {
-              layoutTestController.dumpAsText();
-              layoutTestController.waitUntilDone();
+          if (window.testRunner) {
+              testRunner.dumpAsText();
+              testRunner.waitUntilDone();
           }
 
           window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/distance-inverse.html b/LayoutTests/webaudio/distance-inverse.html
index e577174..6b4448d 100644
--- a/LayoutTests/webaudio/distance-inverse.html
+++ b/LayoutTests/webaudio/distance-inverse.html
@@ -15,9 +15,9 @@
       description("Test inverse distance model of AudioPannerNode.");
 
       function runTest() {
-          if (window.layoutTestController) {
-              layoutTestController.dumpAsText();
-              layoutTestController.waitUntilDone();
+          if (window.testRunner) {
+              testRunner.dumpAsText();
+              testRunner.waitUntilDone();
           }
 
           window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/distance-linear.html b/LayoutTests/webaudio/distance-linear.html
index b025563..f435262 100644
--- a/LayoutTests/webaudio/distance-linear.html
+++ b/LayoutTests/webaudio/distance-linear.html
@@ -15,9 +15,9 @@
       description("Test linear distance model of AudioPannerNode.");
 
       function runTest() {
-          if (window.layoutTestController) {
-              layoutTestController.dumpAsText();
-              layoutTestController.waitUntilDone();
+          if (window.testRunner) {
+              testRunner.dumpAsText();
+              testRunner.waitUntilDone();
           }
 
           window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/dynamicscompressor-basic.html b/LayoutTests/webaudio/dynamicscompressor-basic.html
index b03418f..83f8f80 100644
--- a/LayoutTests/webaudio/dynamicscompressor-basic.html
+++ b/LayoutTests/webaudio/dynamicscompressor-basic.html
@@ -17,9 +17,9 @@
 var compressor;
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/gain.html b/LayoutTests/webaudio/gain.html
index 1cfdb01..cfc7b92 100644
--- a/LayoutTests/webaudio/gain.html
+++ b/LayoutTests/webaudio/gain.html
@@ -55,7 +55,7 @@
 }
 
 function init() {
-    if (!window.layoutTestController)
+    if (!window.testRunner)
         return;
 
     // Create offline audio context.
@@ -75,7 +75,7 @@
     context.oncomplete = finishAudioTest;
     context.startRendering();
 
-    layoutTestController.waitUntilDone();
+    testRunner.waitUntilDone();
 }
 
 </script>
diff --git a/LayoutTests/webaudio/javascriptaudionode-downmix8-2channel-input.html b/LayoutTests/webaudio/javascriptaudionode-downmix8-2channel-input.html
index 8b9958a..2666523 100644
--- a/LayoutTests/webaudio/javascriptaudionode-downmix8-2channel-input.html
+++ b/LayoutTests/webaudio/javascriptaudionode-downmix8-2channel-input.html
@@ -21,9 +21,9 @@
 var outputChannels = 6;
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
 
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/javascriptaudionode-upmix2-8channel-input.html b/LayoutTests/webaudio/javascriptaudionode-upmix2-8channel-input.html
index 5ec52bf..195afb4 100644
--- a/LayoutTests/webaudio/javascriptaudionode-upmix2-8channel-input.html
+++ b/LayoutTests/webaudio/javascriptaudionode-upmix2-8channel-input.html
@@ -21,9 +21,9 @@
 var outputChannels = 6;
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
 
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/javascriptaudionode-zero-input-channels.html b/LayoutTests/webaudio/javascriptaudionode-zero-input-channels.html
index fcb9806..638e5ad 100644
--- a/LayoutTests/webaudio/javascriptaudionode-zero-input-channels.html
+++ b/LayoutTests/webaudio/javascriptaudionode-zero-input-channels.html
@@ -26,9 +26,9 @@
 
 function runTest()
 {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
 
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/javascriptaudionode.html b/LayoutTests/webaudio/javascriptaudionode.html
index 31a6172..45e61aa 100644
--- a/LayoutTests/webaudio/javascriptaudionode.html
+++ b/LayoutTests/webaudio/javascriptaudionode.html
@@ -77,9 +77,9 @@
 }
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
 
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/mediaelementaudiosourcenode-gc.html b/LayoutTests/webaudio/mediaelementaudiosourcenode-gc.html
index 141ccdd..830abb3 100644
--- a/LayoutTests/webaudio/mediaelementaudiosourcenode-gc.html
+++ b/LayoutTests/webaudio/mediaelementaudiosourcenode-gc.html
@@ -14,8 +14,8 @@
 description("Tests garbage collection of MediaElementAudioSourceNode.");
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
     }
 
     audioElement = document.createElement("audio");
diff --git a/LayoutTests/webaudio/mediaelementaudiosourcenode.html b/LayoutTests/webaudio/mediaelementaudiosourcenode.html
index ff40980..95eeb72 100644
--- a/LayoutTests/webaudio/mediaelementaudiosourcenode.html
+++ b/LayoutTests/webaudio/mediaelementaudiosourcenode.html
@@ -16,9 +16,9 @@
 var context = 0;
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/mixing.html b/LayoutTests/webaudio/mixing.html
index d85c036..3f68149 100644
--- a/LayoutTests/webaudio/mixing.html
+++ b/LayoutTests/webaudio/mixing.html
@@ -24,7 +24,7 @@
 var bufferLoader = 0;
 
 function init() {
-    if (!window.layoutTestController)
+    if (!window.testRunner)
         return;
         
     // Create offline audio context.
@@ -40,7 +40,7 @@
     );
 
     bufferLoader.load();
-    layoutTestController.waitUntilDone();
+    testRunner.waitUntilDone();
 }
 
 function finishedLoading(bufferList) {
diff --git a/LayoutTests/webaudio/note-grain-on-play.html b/LayoutTests/webaudio/note-grain-on-play.html
index e4a6c4a..b5d5965 100644
--- a/LayoutTests/webaudio/note-grain-on-play.html
+++ b/LayoutTests/webaudio/note-grain-on-play.html
@@ -99,9 +99,9 @@
       }
 
       function runTest() {
-          if (window.layoutTestController) {
-              layoutTestController.dumpAsText();
-              layoutTestController.waitUntilDone();
+          if (window.testRunner) {
+              testRunner.dumpAsText();
+              testRunner.waitUntilDone();
           }
 
           window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/note-grain-on-timing.html b/LayoutTests/webaudio/note-grain-on-timing.html
index e6c989e..136b4a2 100644
--- a/LayoutTests/webaudio/note-grain-on-timing.html
+++ b/LayoutTests/webaudio/note-grain-on-timing.html
@@ -36,9 +36,9 @@
       }
 
       function runTest() {
-          if (window.layoutTestController) {
-              layoutTestController.dumpAsText();
-              layoutTestController.waitUntilDone();
+          if (window.testRunner) {
+              testRunner.dumpAsText();
+              testRunner.waitUntilDone();
           }
 
           window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/oscillator-custom.html b/LayoutTests/webaudio/oscillator-custom.html
index 2529e69..1c2192d 100644
--- a/LayoutTests/webaudio/oscillator-custom.html
+++ b/LayoutTests/webaudio/oscillator-custom.html
@@ -18,7 +18,7 @@
 window.onload = init;
 
 function init() {
-    if (!window.layoutTestController)
+    if (!window.testRunner)
         return;
 
     generateExponentialOscillatorSweep(OSC.CUSTOM);
diff --git a/LayoutTests/webaudio/oscillator-sawtooth.html b/LayoutTests/webaudio/oscillator-sawtooth.html
index f4937e3..cf5fc25 100644
--- a/LayoutTests/webaudio/oscillator-sawtooth.html
+++ b/LayoutTests/webaudio/oscillator-sawtooth.html
@@ -18,7 +18,7 @@
 window.onload = init;
 
 function init() {
-    if (!window.layoutTestController)
+    if (!window.testRunner)
         return;
 
     generateExponentialOscillatorSweep(OSC.SAWTOOTH);
diff --git a/LayoutTests/webaudio/oscillator-sine.html b/LayoutTests/webaudio/oscillator-sine.html
index 2d6fedb..3034239 100644
--- a/LayoutTests/webaudio/oscillator-sine.html
+++ b/LayoutTests/webaudio/oscillator-sine.html
@@ -18,7 +18,7 @@
 window.onload = init;
 
 function init() {
-    if (!window.layoutTestController)
+    if (!window.testRunner)
         return;
 
     generateExponentialOscillatorSweep(OSC.SINE);
diff --git a/LayoutTests/webaudio/oscillator-square.html b/LayoutTests/webaudio/oscillator-square.html
index b62fc75..adc3d6ab 100644
--- a/LayoutTests/webaudio/oscillator-square.html
+++ b/LayoutTests/webaudio/oscillator-square.html
@@ -18,7 +18,7 @@
 window.onload = init;
 
 function init() {
-    if (!window.layoutTestController)
+    if (!window.testRunner)
         return;
 
     generateExponentialOscillatorSweep(OSC.SQUARE);
diff --git a/LayoutTests/webaudio/oscillator-triangle.html b/LayoutTests/webaudio/oscillator-triangle.html
index 2d1f471..eb7e724 100644
--- a/LayoutTests/webaudio/oscillator-triangle.html
+++ b/LayoutTests/webaudio/oscillator-triangle.html
@@ -18,7 +18,7 @@
 window.onload = init;
 
 function init() {
-    if (!window.layoutTestController)
+    if (!window.testRunner)
         return;
 
     generateExponentialOscillatorSweep(OSC.TRIANGLE);
diff --git a/LayoutTests/webaudio/panner-equalpower-stereo.html b/LayoutTests/webaudio/panner-equalpower-stereo.html
index d31c69c..3166cdd 100644
--- a/LayoutTests/webaudio/panner-equalpower-stereo.html
+++ b/LayoutTests/webaudio/panner-equalpower-stereo.html
@@ -21,9 +21,9 @@
       // turning at a different time and we check that the rendered
       // impulse has the expected gain.
       function runTest() {
-          if (window.layoutTestController) {
-              layoutTestController.dumpAsText();
-              layoutTestController.waitUntilDone();
+          if (window.testRunner) {
+              testRunner.dumpAsText();
+              testRunner.waitUntilDone();
           }
 
           window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/panner-equalpower.html b/LayoutTests/webaudio/panner-equalpower.html
index 282f906..eec0ddd 100644
--- a/LayoutTests/webaudio/panner-equalpower.html
+++ b/LayoutTests/webaudio/panner-equalpower.html
@@ -21,9 +21,9 @@
       // turning at a different time and we check that the rendered
       // impulse has the expected gain.
       function runTest() {
-          if (window.layoutTestController) {
-              layoutTestController.dumpAsText();
-              layoutTestController.waitUntilDone();
+          if (window.testRunner) {
+              testRunner.dumpAsText();
+              testRunner.waitUntilDone();
           }
 
           window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/panner-set-model.html b/LayoutTests/webaudio/panner-set-model.html
index e64824b..12f938c 100644
--- a/LayoutTests/webaudio/panner-set-model.html
+++ b/LayoutTests/webaudio/panner-set-model.html
@@ -16,9 +16,9 @@
 
       // Test to see if we panningModel is updated when we set it.
       function runTest() {
-          if (window.layoutTestController) {
-              layoutTestController.dumpAsText();
-              layoutTestController.waitUntilDone();
+          if (window.testRunner) {
+              testRunner.dumpAsText();
+              testRunner.waitUntilDone();
           }
 
           window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/realtimeanalyser-fft-sizing.html b/LayoutTests/webaudio/realtimeanalyser-fft-sizing.html
index 6ff2a33..90c8938 100644
--- a/LayoutTests/webaudio/realtimeanalyser-fft-sizing.html
+++ b/LayoutTests/webaudio/realtimeanalyser-fft-sizing.html
@@ -13,9 +13,9 @@
 <script>
 description("Test that re-sizing the FFT arrays does not fail.");
 
-if (window.layoutTestController) {
-    layoutTestController.dumpAsText();
-    layoutTestController.waitUntilDone();
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
 }
 
 var doTest = function(fftSize, illegal) {
@@ -46,8 +46,8 @@
     doTest(i + 1, true);
 }
 
-if (window.layoutTestController)
-    layoutTestController.notifyDone();
+if (window.testRunner)
+    testRunner.notifyDone();
 testPassed("webkitAudioContext survived multiple invalid FFT array resizings.");
 </script>
 
diff --git a/LayoutTests/webaudio/sample-accurate-scheduling.html b/LayoutTests/webaudio/sample-accurate-scheduling.html
index ffebdd2..6d67d70 100644
--- a/LayoutTests/webaudio/sample-accurate-scheduling.html
+++ b/LayoutTests/webaudio/sample-accurate-scheduling.html
@@ -105,9 +105,9 @@
 }
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/stereo2mono-down-mixing.html b/LayoutTests/webaudio/stereo2mono-down-mixing.html
index 574ccc9..f465570 100644
--- a/LayoutTests/webaudio/stereo2mono-down-mixing.html
+++ b/LayoutTests/webaudio/stereo2mono-down-mixing.html
@@ -42,9 +42,9 @@
 }
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
 
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webaudio/test-basic.html b/LayoutTests/webaudio/test-basic.html
index 8011bc8..ddb9366 100644
--- a/LayoutTests/webaudio/test-basic.html
+++ b/LayoutTests/webaudio/test-basic.html
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 
 <!--
-This is a very basic test to make sure layoutTestController.setAudioData() works correctly.
+This is a very basic test to make sure testRunner.setAudioData() works correctly.
 It generates a 2 seconds long stereo result @44.1KHz
 The left channel will be a 880Hz tone, while the right will be 440Hz.
 -->
@@ -18,7 +18,7 @@
 <div id="console"></div>
 
 <script>
-description("Tests basic audio test infrastructure: specifically layoutTestController.setAudioData()");
+description("Tests basic audio test infrastructure: specifically testRunner.setAudioData()");
 
 var sampleRate = 44100.0;
 var lengthInSeconds = 2;
@@ -36,7 +36,7 @@
 }
 
 function runTest() {
-    if (!window.layoutTestController)
+    if (!window.testRunner)
         return;
     
     var context = new webkitAudioContext();
@@ -45,9 +45,9 @@
     generateSinWave(audioBuffer);
 
     var audioData = createAudioData(audioBuffer);
-    layoutTestController.setAudioData(audioData);
+    testRunner.setAudioData(audioData);
 
-    layoutTestController.notifyDone();
+    testRunner.notifyDone();
 }
 
 runTest();
diff --git a/LayoutTests/webaudio/up-mixing-mono-51.html b/LayoutTests/webaudio/up-mixing-mono-51.html
index 4a198dc..a57451f 100644
--- a/LayoutTests/webaudio/up-mixing-mono-51.html
+++ b/LayoutTests/webaudio/up-mixing-mono-51.html
@@ -14,10 +14,10 @@
 <script>
 
 function runTest() {
-    if (!window.layoutTestController)
+    if (!window.testRunner)
         return;
 
-    layoutTestController.waitUntilDone();
+    testRunner.waitUntilDone();
 
     window.jsTestAsync = true;
 
diff --git a/LayoutTests/webaudio/up-mixing-mono-stereo.html b/LayoutTests/webaudio/up-mixing-mono-stereo.html
index c90f477..93c7190 100644
--- a/LayoutTests/webaudio/up-mixing-mono-stereo.html
+++ b/LayoutTests/webaudio/up-mixing-mono-stereo.html
@@ -14,10 +14,10 @@
 <script>
 
 function runTest() {
-    if (!window.layoutTestController)
+    if (!window.testRunner)
         return;
 
-    layoutTestController.waitUntilDone();
+    testRunner.waitUntilDone();
 
     window.jsTestAsync = true;
 
diff --git a/LayoutTests/webaudio/up-mixing-stereo-51.html b/LayoutTests/webaudio/up-mixing-stereo-51.html
index 161d6ce..0be6ea9 100644
--- a/LayoutTests/webaudio/up-mixing-stereo-51.html
+++ b/LayoutTests/webaudio/up-mixing-stereo-51.html
@@ -14,10 +14,10 @@
 <script>
 
 function runTest() {
-    if (!window.layoutTestController)
+    if (!window.testRunner)
         return;
 
-    layoutTestController.waitUntilDone();
+    testRunner.waitUntilDone();
 
     window.jsTestAsync = true;
 
diff --git a/LayoutTests/webaudio/waveshaper.html b/LayoutTests/webaudio/waveshaper.html
index 4995db1..6c56ab5c 100644
--- a/LayoutTests/webaudio/waveshaper.html
+++ b/LayoutTests/webaudio/waveshaper.html
@@ -99,9 +99,9 @@
 }
 
 function runTest() {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
     }
     
     window.jsTestIsAsync = true;
diff --git a/LayoutTests/webintents/web-intents-delivery.html b/LayoutTests/webintents/web-intents-delivery.html
index 73167a3..c1ef3c7 100644
--- a/LayoutTests/webintents/web-intents-delivery.html
+++ b/LayoutTests/webintents/web-intents-delivery.html
@@ -7,8 +7,8 @@
 <script type="text/javascript">
   shouldBeNull("window.webkitIntent");
 
-  if (window.layoutTestController) {
-    window.layoutTestController.deliverWebIntent("aaa", "ttt", "data");
+  if (window.testRunner) {
+    window.testRunner.deliverWebIntent("aaa", "ttt", "data");
   }
 
   shouldBeDefined("window.webkitIntent");
diff --git a/LayoutTests/webintents/web-intents-failure.html b/LayoutTests/webintents/web-intents-failure.html
index 723b202..083e37a 100644
--- a/LayoutTests/webintents/web-intents-failure.html
+++ b/LayoutTests/webintents/web-intents-failure.html
@@ -6,9 +6,9 @@
       function buttonClicked() {
         startIntentWithCallbacks();
 
-        if (window.layoutTestController) {
+        if (window.testRunner) {
           // Empty args will send failure message.
-          window.layoutTestController.sendWebIntentResponse();
+          window.testRunner.sendWebIntentResponse();
         }
       }
     </script>
diff --git a/LayoutTests/webintents/web-intents-reload.html b/LayoutTests/webintents/web-intents-reload.html
index faf1bc0..13af39c 100644
--- a/LayoutTests/webintents/web-intents-reload.html
+++ b/LayoutTests/webintents/web-intents-reload.html
@@ -18,15 +18,15 @@
 
         debug("* loaded replacement page");
 
-        if (window.layoutTestController) {
-          window.layoutTestController.notifyDone();
+        if (window.testRunner) {
+          window.testRunner.notifyDone();
         }
       }
 
       function startTest() {
-        if (window.layoutTestController) {
-          window.layoutTestController.waitUntilDone();
-          window.layoutTestController.dumpChildFramesAsText();
+        if (window.testRunner) {
+          window.testRunner.waitUntilDone();
+          window.testRunner.dumpChildFramesAsText();
         } else {
           alert('This test needs to run in DRT');
         }
diff --git a/LayoutTests/webintents/web-intents-reply.html b/LayoutTests/webintents/web-intents-reply.html
index 8081912..0d68542 100644
--- a/LayoutTests/webintents/web-intents-reply.html
+++ b/LayoutTests/webintents/web-intents-reply.html
@@ -6,8 +6,8 @@
       function buttonClicked() {
         startIntentWithCallbacks();
 
-        if (window.layoutTestController) {
-          window.layoutTestController.sendWebIntentResponse("reply");
+        if (window.testRunner) {
+          window.testRunner.sendWebIntentResponse("reply");
         }
       }
     </script>