Many accessibility js-tests use waitUntilDone
https://bugs.webkit.org/show_bug.cgi?id=172372

Reviewed by Tim Horton.

Corrected the use of js-test harness, updated the tests to use js-test.js instead
of js-test-pre.js where possible.

* accessibility/anonymous-render-block-in-continuation-causes-crash-expected.txt:
* accessibility/anonymous-render-block-in-continuation-causes-crash.html:
* accessibility/aria-checkbox-sends-notification.html:
* accessibility/aria-invalid.html:
* accessibility/aria-switch-sends-notification.html:
* accessibility/deleting-iframe-destroys-axcache.html:
* accessibility/file-upload-button-with-axpress.html:
* accessibility/frame-disconnect-textmarker-cache-crash-expected.txt:
* accessibility/frame-disconnect-textmarker-cache-crash.html:
* accessibility/gtk/aria-listbox-crash.html:
* accessibility/heading-title-includes-links-expected.txt:
* accessibility/heading-title-includes-links.html:
* accessibility/image-map-update-parent-crash-expected.txt:
* accessibility/image-map-update-parent-crash.html:
* accessibility/insert-children-assert-expected.txt:
* accessibility/insert-children-assert.html:
* accessibility/ios-simulator/focus-change-notifications.html:
* accessibility/label-element-press.html:
* accessibility/loading-iframe-updates-axtree.html:
* accessibility/mac/aria-expanded-notifications.html:
* accessibility/mac/aria-listbox-selectedchildren-change.html:
* accessibility/mac/aria-liveregion-on-image.html:
* accessibility/mac/aria-liveregions-addedelement.html:
* accessibility/mac/aria-liveregions-changedalt.html:
* accessibility/mac/aria-liveregions-changedtext.html:
* accessibility/mac/aria-liveregions-removedelement.html:
* accessibility/mac/combobox-activedescendant-notifications-expected.txt:
* accessibility/mac/combobox-activedescendant-notifications.html:
* accessibility/mac/focus-setting-selection-syncronizing-not-clearing-expected.txt:
* accessibility/mac/focus-setting-selection-syncronizing-not-clearing.html:
* accessibility/mac/html-slider-indicator.html:
* accessibility/mac/input-replacevalue-userinfo-expected.txt:
* accessibility/mac/input-replacevalue-userinfo.html:
* accessibility/mac/ordered-textmarker-crash-expected.txt:
* accessibility/mac/ordered-textmarker-crash.html:
* accessibility/mac/search-with-frames-expected.txt:
* accessibility/mac/search-with-frames.html:
* accessibility/mac/selection-boundary-userinfo.html:
* accessibility/mac/selection-change-userinfo.html:
* accessibility/mac/selection-element-tabbing-to-link.html:
* accessibility/mac/selection-value-changes-for-aria-textbox.html:
* accessibility/mac/stale-textmarker-crash-expected.txt:
* accessibility/mac/stale-textmarker-crash.html:
* accessibility/mac/textbox-role-reports-notifications-expected.txt:
* accessibility/mac/textbox-role-reports-notifications.html:
* accessibility/mac/value-change/value-change-user-info-contenteditable.html:
* accessibility/mac/value-change/value-change-user-info-textarea.html:
* accessibility/mac/value-change/value-change-user-info-textfield.html:
* accessibility/media-element.html:
* accessibility/menu-list-sends-change-notification.html:
* accessibility/multiselect-list-reports-active-option.html:
* accessibility/paragraph-with-linebreaks.html:
* accessibility/platform-name.html:
* accessibility/radio-button-group-members.html:
* accessibility/radio-button-title-label.html:
* accessibility/selection-states-expected.txt:
* accessibility/selection-states.html:
* accessibility/spinbutton-value.html:
* accessibility/svg-bounds.html:
* accessibility/table-cell-for-column-and-row-crash.html:
* accessibility/table-cells-roles.html:
* accessibility/table-roles-hierarchy.html:
* accessibility/table-with-aria-role.html:
* accessibility/textarea-insertion-point-line-number.html:
* accessibility/textbox-role-reports-selection.html:
* accessibility/title-ui-element-correctness.html:
* accessibility/unknown-roles-not-exposed-expected.txt:
* accessibility/unknown-roles-not-exposed.html:
* accessibility/win/bstr-elements-role.html:
* accessibility/win/detached-object-notification-crash.html:
* accessibility/win/heading-elements.html:
* accessibility/win/img-alt-attribute.html:
* accessibility/win/linked-elements.html:
* accessibility/win/list-item-role.html:
* accessibility/win/list-marker-role.html:
* accessibility/win/list-role.html:
* accessibility/win/multiple-select-element-role.html:
* accessibility/win/option-element-position-and-size.html:
* accessibility/win/parent-element.html:
* accessibility/win/select-element-role.html:
* accessibility/win/selection-and-focus.html:
* accessibility/win/single-select-children-changed.html:
* accessibility/win/single-select-children.html:
* accessibility/win/text-role.html:
* platform/mac-wk1/accessibility/loading-iframe-updates-axtree-expected.txt:
* platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt:
* platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt:
* platform/mac/accessibility/media-element-expected.txt:
* platform/mac/accessibility/table-cells-roles-expected.txt:
* platform/mac/accessibility/table-roles-hierarchy-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@217171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 9a6f0db..e6f8904 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,104 @@
+2017-05-19  Alexey Proskuryakov  <ap@apple.com>
+
+        Many accessibility js-tests use waitUntilDone
+        https://bugs.webkit.org/show_bug.cgi?id=172372
+
+        Reviewed by Tim Horton.
+
+        Corrected the use of js-test harness, updated the tests to use js-test.js instead
+        of js-test-pre.js where possible.
+
+        * accessibility/anonymous-render-block-in-continuation-causes-crash-expected.txt:
+        * accessibility/anonymous-render-block-in-continuation-causes-crash.html:
+        * accessibility/aria-checkbox-sends-notification.html:
+        * accessibility/aria-invalid.html:
+        * accessibility/aria-switch-sends-notification.html:
+        * accessibility/deleting-iframe-destroys-axcache.html:
+        * accessibility/file-upload-button-with-axpress.html:
+        * accessibility/frame-disconnect-textmarker-cache-crash-expected.txt:
+        * accessibility/frame-disconnect-textmarker-cache-crash.html:
+        * accessibility/gtk/aria-listbox-crash.html:
+        * accessibility/heading-title-includes-links-expected.txt:
+        * accessibility/heading-title-includes-links.html:
+        * accessibility/image-map-update-parent-crash-expected.txt:
+        * accessibility/image-map-update-parent-crash.html:
+        * accessibility/insert-children-assert-expected.txt:
+        * accessibility/insert-children-assert.html:
+        * accessibility/ios-simulator/focus-change-notifications.html:
+        * accessibility/label-element-press.html:
+        * accessibility/loading-iframe-updates-axtree.html:
+        * accessibility/mac/aria-expanded-notifications.html:
+        * accessibility/mac/aria-listbox-selectedchildren-change.html:
+        * accessibility/mac/aria-liveregion-on-image.html:
+        * accessibility/mac/aria-liveregions-addedelement.html:
+        * accessibility/mac/aria-liveregions-changedalt.html:
+        * accessibility/mac/aria-liveregions-changedtext.html:
+        * accessibility/mac/aria-liveregions-removedelement.html:
+        * accessibility/mac/combobox-activedescendant-notifications-expected.txt:
+        * accessibility/mac/combobox-activedescendant-notifications.html:
+        * accessibility/mac/focus-setting-selection-syncronizing-not-clearing-expected.txt:
+        * accessibility/mac/focus-setting-selection-syncronizing-not-clearing.html:
+        * accessibility/mac/html-slider-indicator.html:
+        * accessibility/mac/input-replacevalue-userinfo-expected.txt:
+        * accessibility/mac/input-replacevalue-userinfo.html:
+        * accessibility/mac/ordered-textmarker-crash-expected.txt:
+        * accessibility/mac/ordered-textmarker-crash.html:
+        * accessibility/mac/search-with-frames-expected.txt:
+        * accessibility/mac/search-with-frames.html:
+        * accessibility/mac/selection-boundary-userinfo.html:
+        * accessibility/mac/selection-change-userinfo.html:
+        * accessibility/mac/selection-element-tabbing-to-link.html:
+        * accessibility/mac/selection-value-changes-for-aria-textbox.html:
+        * accessibility/mac/stale-textmarker-crash-expected.txt:
+        * accessibility/mac/stale-textmarker-crash.html:
+        * accessibility/mac/textbox-role-reports-notifications-expected.txt:
+        * accessibility/mac/textbox-role-reports-notifications.html:
+        * accessibility/mac/value-change/value-change-user-info-contenteditable.html:
+        * accessibility/mac/value-change/value-change-user-info-textarea.html:
+        * accessibility/mac/value-change/value-change-user-info-textfield.html:
+        * accessibility/media-element.html:
+        * accessibility/menu-list-sends-change-notification.html:
+        * accessibility/multiselect-list-reports-active-option.html:
+        * accessibility/paragraph-with-linebreaks.html:
+        * accessibility/platform-name.html:
+        * accessibility/radio-button-group-members.html:
+        * accessibility/radio-button-title-label.html:
+        * accessibility/selection-states-expected.txt:
+        * accessibility/selection-states.html:
+        * accessibility/spinbutton-value.html:
+        * accessibility/svg-bounds.html:
+        * accessibility/table-cell-for-column-and-row-crash.html:
+        * accessibility/table-cells-roles.html:
+        * accessibility/table-roles-hierarchy.html:
+        * accessibility/table-with-aria-role.html:
+        * accessibility/textarea-insertion-point-line-number.html:
+        * accessibility/textbox-role-reports-selection.html:
+        * accessibility/title-ui-element-correctness.html:
+        * accessibility/unknown-roles-not-exposed-expected.txt:
+        * accessibility/unknown-roles-not-exposed.html:
+        * accessibility/win/bstr-elements-role.html:
+        * accessibility/win/detached-object-notification-crash.html:
+        * accessibility/win/heading-elements.html:
+        * accessibility/win/img-alt-attribute.html:
+        * accessibility/win/linked-elements.html:
+        * accessibility/win/list-item-role.html:
+        * accessibility/win/list-marker-role.html:
+        * accessibility/win/list-role.html:
+        * accessibility/win/multiple-select-element-role.html:
+        * accessibility/win/option-element-position-and-size.html:
+        * accessibility/win/parent-element.html:
+        * accessibility/win/select-element-role.html:
+        * accessibility/win/selection-and-focus.html:
+        * accessibility/win/single-select-children-changed.html:
+        * accessibility/win/single-select-children.html:
+        * accessibility/win/text-role.html:
+        * platform/mac-wk1/accessibility/loading-iframe-updates-axtree-expected.txt:
+        * platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt:
+        * platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt:
+        * platform/mac/accessibility/media-element-expected.txt:
+        * platform/mac/accessibility/table-cells-roles-expected.txt:
+        * platform/mac/accessibility/table-roles-hierarchy-expected.txt:
+
 2017-05-19  Matt Lewis  <jlewis3@apple.com>
 
         Rebaselined js/dom/global-constructors-attributes.html after revision 217129
diff --git a/LayoutTests/accessibility/anonymous-render-block-in-continuation-causes-crash-expected.txt b/LayoutTests/accessibility/anonymous-render-block-in-continuation-causes-crash-expected.txt
index 38deb47..b2052df 100644
--- a/LayoutTests/accessibility/anonymous-render-block-in-continuation-causes-crash-expected.txt
+++ b/LayoutTests/accessibility/anonymous-render-block-in-continuation-causes-crash-expected.txt
@@ -7,6 +7,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+PASS successfullyParsed is true
 
 TEST COMPLETE
 
diff --git a/LayoutTests/accessibility/anonymous-render-block-in-continuation-causes-crash.html b/LayoutTests/accessibility/anonymous-render-block-in-continuation-causes-crash.html
index 732118d..f59c119 100644
--- a/LayoutTests/accessibility/anonymous-render-block-in-continuation-causes-crash.html
+++ b/LayoutTests/accessibility/anonymous-render-block-in-continuation-causes-crash.html
@@ -1,9 +1,8 @@
 <html>
 <head>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 <script>
-    if (window.testRunner)
-        testRunner.waitUntilDone();
+    jsTestIsAsync = true;
 
     function walkAccessibilityTree(accessibilityObject) {
         var count = accessibilityObject.childrenCount;
@@ -17,9 +16,7 @@
         window.root = accessibilityController.rootElement;
         walkAccessibilityTree(root);
 
-        debug('<br /><span class="pass">TEST COMPLETE</span>');
-        if (window.testRunner)
-            testRunner.notifyDone();
+        finishJSTest();
     }
 
     if (window.testRunner && window.accessibilityController) {
diff --git a/LayoutTests/accessibility/aria-checkbox-sends-notification.html b/LayoutTests/accessibility/aria-checkbox-sends-notification.html
index 4c34b0d..b3127f2 100644
--- a/LayoutTests/accessibility/aria-checkbox-sends-notification.html
+++ b/LayoutTests/accessibility/aria-checkbox-sends-notification.html
@@ -1,10 +1,9 @@
 <html>
 <head>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 <script>
     function runTest() {
-        if (window.testRunner)
-            testRunner.waitUntilDone();
+        jsTestIsAsync = true;
 
         description("This tests that checking of an aria checkbox sends a notification.");
 
@@ -19,8 +18,7 @@
 
             if (notificationCount == 2) {
                 accessibleCheckbox.removeNotificationListener(listener);
-                if (window.testRunner)
-                    testRunner.notifyDone();
+                finishJSTest();
             }
         }
         accessibleCheckbox.addNotificationListener(listener);
@@ -31,15 +29,11 @@
     };
 </script>
 </head>
-<body>
+<body onload="runTest()">
 
 <div id="checkbox1" tabindex=0 role="checkbox" aria-checked="false">Test Checkbox</div>
 
 <p id="description"></p>
 <div id="console"></div>
-<script>
-    runTest();
-</script>
-<script src="../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/aria-invalid.html b/LayoutTests/accessibility/aria-invalid.html
index 8742142..0c34460 100644
--- a/LayoutTests/accessibility/aria-invalid.html
+++ b/LayoutTests/accessibility/aria-invalid.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 </head>
 <body id="body">
 
@@ -53,7 +53,7 @@
             $("notifications").innerHTML += "Notification received successfully.";
             axNotificationElement.removeNotificationListener();
             $("examples").hidden = true;
-            window.testRunner.notifyDone();
+            finishJSTest();
         }
     }
 
@@ -66,7 +66,7 @@
     }
 
     if (window.accessibilityController) {
-        window.testRunner.waitUntilDone();
+        jsTestIsAsync = true;
 
         var examples = document.querySelectorAll(".ex");
         for (var i = 0, c = examples.length; i < c; i++) {
@@ -87,7 +87,5 @@
     }
 
 </script>
-
-<script src="../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/aria-switch-sends-notification.html b/LayoutTests/accessibility/aria-switch-sends-notification.html
index 7d33170..616c7fc 100644
--- a/LayoutTests/accessibility/aria-switch-sends-notification.html
+++ b/LayoutTests/accessibility/aria-switch-sends-notification.html
@@ -1,10 +1,9 @@
 <html>
 <head>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 <script>
     function runTest() {
-        if (window.testRunner)
-            testRunner.waitUntilDone();
+        jsTestIsAsync = true;
 
         description("This tests that toggling an aria switch sends a notification.");
 
@@ -19,8 +18,7 @@
 
             if (notificationCount == 2) {
                 widget.removeNotificationListener(listener);
-                if (window.testRunner)
-                    testRunner.notifyDone();
+                finishJSTest();
             }
         }
         widget.addNotificationListener(listener);
@@ -30,15 +28,11 @@
     };
 </script>
 </head>
-<body>
+<body onload="runTest()">
 
 <div id="switch" role="switch" aria-checked="false">Test Switch</div>
 
 <p id="description"></p>
 <div id="console"></div>
-<script>
-    runTest();
-</script>
-<script src="../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/deleting-iframe-destroys-axcache.html b/LayoutTests/accessibility/deleting-iframe-destroys-axcache.html
index b443759..9e7fd89 100644
--- a/LayoutTests/accessibility/deleting-iframe-destroys-axcache.html
+++ b/LayoutTests/accessibility/deleting-iframe-destroys-axcache.html
@@ -1,10 +1,9 @@
 <html>
 <head>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 <script src="../resources/accessibility-helper.js"></script>
 <script>
-    if (window.testRunner)
-        testRunner.waitUntilDone();
+    jsTestIsAsync = true;
 
     function runTest()
     {
@@ -55,9 +54,7 @@
             shouldBeTrue("after.isEqual(newAfter)");
         }
 
-        debug('<br /><span class="pass">TEST COMPLETE</span>');
-        if (window.testRunner)
-            testRunner.notifyDone();
+        finishJSTest();
     }
     
     window.addEventListener('load', function() {
diff --git a/LayoutTests/accessibility/file-upload-button-with-axpress.html b/LayoutTests/accessibility/file-upload-button-with-axpress.html
index 50900d4..b055c5f 100644
--- a/LayoutTests/accessibility/file-upload-button-with-axpress.html
+++ b/LayoutTests/accessibility/file-upload-button-with-axpress.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML>
 <html>
 <body>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 
 <input id="filetype" type="file">
 
@@ -13,20 +13,18 @@
 description("This tests that when AXPress is used DOMActivate will be handled by the input file type.")
 
 if (window.testRunner && window.accessibilityController) {
-    window.testRunner.waitUntilDone();
+    jsTestIsAsync = true;
     
     var inputFile = document.getElementById("filetype");
 
     inputFile.addEventListener("DOMActivate", function() { 
         debug("DOMActivate was called"); 
-        window.testRunner.notifyDone(); 
+        finishJSTest();
     });
 
     accessibilityController.accessibleElementById("filetype").press();
 }
 
 </script>
-
-<script src="../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/frame-disconnect-textmarker-cache-crash-expected.txt b/LayoutTests/accessibility/frame-disconnect-textmarker-cache-crash-expected.txt
index 61b0860..0648799 100644
--- a/LayoutTests/accessibility/frame-disconnect-textmarker-cache-crash-expected.txt
+++ b/LayoutTests/accessibility/frame-disconnect-textmarker-cache-crash-expected.txt
@@ -6,4 +6,7 @@
 PASS string is 'hello'
 PASS string is 'test text'
 TEST PASSED: NO CRASH
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
diff --git a/LayoutTests/accessibility/frame-disconnect-textmarker-cache-crash.html b/LayoutTests/accessibility/frame-disconnect-textmarker-cache-crash.html
index 1a07f50..e301e45 100644
--- a/LayoutTests/accessibility/frame-disconnect-textmarker-cache-crash.html
+++ b/LayoutTests/accessibility/frame-disconnect-textmarker-cache-crash.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 </head>
 <body id="body">
 
@@ -43,9 +43,7 @@
 
             debug("TEST PASSED: NO CRASH");
 
-            if (window.testRunner) {
-                testRunner.notifyDone();
-            }
+            finishJSTest();
             gc();
         };
 
@@ -74,12 +72,8 @@
         gc();
     }
 
-    if (window.accessibilityController) {
-        window.jsTestIsAsync = true;
-    }
+    jsTestIsAsync = true;
 
 </script>
-
-<script src="../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/gtk/aria-listbox-crash.html b/LayoutTests/accessibility/gtk/aria-listbox-crash.html
index 91f2b94..e77c54f 100644
--- a/LayoutTests/accessibility/gtk/aria-listbox-crash.html
+++ b/LayoutTests/accessibility/gtk/aria-listbox-crash.html
@@ -1,16 +1,14 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/js-test.js"></script>
 <script>
 function test()
 {
   description("This tests that selecting an option in an ARIA listbox doesn't crash.");
+  jsTestIsAsync = true;
 
   if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-
     // We focus on the body and get the associated accessibility
     // object to force the creation of the accessibility hierarchy.
     if (window.accessibilityController)
@@ -31,7 +29,7 @@
    // since it's supposed to crash because of a notification about the
    // selection changing and so if we notifyDone() now it would be too
    // soon and we would skip such emission, not crashing at all.
-   window.setTimeout("testRunner.notifyDone()",0);
+   window.setTimeout(finishJSTest, 0);
 }
 </script>
 </head>
@@ -43,7 +41,5 @@
 
 <p id="description"></p>
 <div id="console"></div>
-
-<script src="../../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/heading-title-includes-links-expected.txt b/LayoutTests/accessibility/heading-title-includes-links-expected.txt
index e963e89..b0604f3 100644
--- a/LayoutTests/accessibility/heading-title-includes-links-expected.txt
+++ b/LayoutTests/accessibility/heading-title-includes-links-expected.txt
@@ -5,8 +5,8 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+Heading title: AXTitle: Apple
 PASS successfullyParsed is true
 
 TEST COMPLETE
-Heading title: AXTitle: Apple
 
diff --git a/LayoutTests/accessibility/heading-title-includes-links.html b/LayoutTests/accessibility/heading-title-includes-links.html
index fb2ce4f..f9443d7 100644
--- a/LayoutTests/accessibility/heading-title-includes-links.html
+++ b/LayoutTests/accessibility/heading-title-includes-links.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 </head>
 <body id="body" onload="setTimeout('runTest()', 0);">
 
@@ -16,21 +16,17 @@
 
 <script>
 
-if (window.testRunner && window.accessibilityController) {
-    window.testRunner.waitUntilDone();
-}
+jsTestIsAsync = true;
 
 function runTest() {
     description("This tests that the title of a heading will include links if available.");
 
-    if (window.accessibilityController) {
-
+    if (window.accessibilityController)
         debug("Heading title: " + accessibilityController.accessibleElementById("heading").title);
-    }
-    window.testRunner.notifyDone();
+
+    finishJSTest();
 }
 
 </script>
-<script src="../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/image-map-update-parent-crash-expected.txt b/LayoutTests/accessibility/image-map-update-parent-crash-expected.txt
index 8755771..8a956e0 100644
--- a/LayoutTests/accessibility/image-map-update-parent-crash-expected.txt
+++ b/LayoutTests/accessibility/image-map-update-parent-crash-expected.txt
@@ -3,4 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
diff --git a/LayoutTests/accessibility/image-map-update-parent-crash.html b/LayoutTests/accessibility/image-map-update-parent-crash.html
index e4335a3..2f92845 100644
--- a/LayoutTests/accessibility/image-map-update-parent-crash.html
+++ b/LayoutTests/accessibility/image-map-update-parent-crash.html
@@ -1,15 +1,12 @@
 <html>
 <head>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 <script src="../resources/accessibility-helper.js"></script>
 <script>
 
-if (window.testRunner)
-  testRunner.waitUntilDone();
+jsTestIsAsync = true;
 
 function runAXTest() {
-
-
    description("This tests that an image map's hold on it's parent will be cleared if the parent goes away.");
 
    // First access all children using AX
@@ -20,13 +17,12 @@
    // Now verify we haven't crashed.
    touchAccessibilityTree(accessibilityController.rootElement);
 
-   if (window.testRunner)
-       testRunner.notifyDone();
+   finishJSTest();
 }
 </script>
 
 </head>
-<body>
+<body onload="runAXTest()">
 
 <map name="map">
 <div id="o7"></div>
@@ -34,8 +30,6 @@
 
 <img id="img" usemap="#map"><span></span> 
 
-<script>setTimeout("runAXTest();", 1);</script> 
-
 <p id="description"></p>
 <div id="console"></div>
 
diff --git a/LayoutTests/accessibility/insert-children-assert-expected.txt b/LayoutTests/accessibility/insert-children-assert-expected.txt
index 7be4cc2..72da35f 100644
--- a/LayoutTests/accessibility/insert-children-assert-expected.txt
+++ b/LayoutTests/accessibility/insert-children-assert-expected.txt
@@ -8,4 +8,7 @@
 
 PASS valueOccuranceInElementTree(content, value) is 1
 PASS valueOccuranceInElementTree(content, value) is 1
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
diff --git a/LayoutTests/accessibility/insert-children-assert.html b/LayoutTests/accessibility/insert-children-assert.html
index 86fe93c..f9623d2 100644
--- a/LayoutTests/accessibility/insert-children-assert.html
+++ b/LayoutTests/accessibility/insert-children-assert.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 <script src="../resources/accessibility-helper.js"></script>
 <script>
 var successfullyParsed = false;
@@ -23,10 +23,9 @@
 
 <script>
     description("This tests that we only insert valid children when building ax tree.");
-    
+    jsTestIsAsync = true;
+
     if ("webkitRequestFullScreen" in Element.prototype) {
-        if (window.testRunner)
-            testRunner.waitUntilDone();
         var content = accessibilityController.accessibleElementById("content");
         var value = "AXValue: d";
         document.body.offsetTop;
@@ -37,10 +36,8 @@
                 setTimeout(function () {
                     document.webkitCancelFullScreen();
                 }, 0)
-            } else {
-                if (window.testRunner)
-                    testRunner.notifyDone();
-            }
+            } else
+                finishJSTest();
             shouldBe("valueOccuranceInElementTree(content, value)", "1");
         };
 
diff --git a/LayoutTests/accessibility/ios-simulator/focus-change-notifications.html b/LayoutTests/accessibility/ios-simulator/focus-change-notifications.html
index cc3e902..ce61458 100644
--- a/LayoutTests/accessibility/ios-simulator/focus-change-notifications.html
+++ b/LayoutTests/accessibility/ios-simulator/focus-change-notifications.html
@@ -4,7 +4,7 @@
 <script>
 var successfullyParsed = false;
 </script>
-<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/js-test.js"></script>
 </head>
 <body id="body">
 
@@ -27,7 +27,7 @@
             // We should get a total of 2 focus changes.
             if (focusChangeCount == 2) {
                rootElement.removeNotificationListener();
-               window.testRunner.notifyDone();
+               finishJSTest();
             }
         }
     }
@@ -35,7 +35,7 @@
     if (window.accessibilityController) {
         // Make sure AX gets turned on.
         rootElement = accessibilityController.rootElement.childAtIndex(0);
-        window.testRunner.waitUntilDone();
+        jsTestIsAsync = true;
 
         var addedNotification = rootElement.addNotificationListener(focusCallback);
         if (!addedNotification) {
@@ -54,7 +54,5 @@
 
     successfullyParsed = true;
 </script>
-
-<script src="../../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/label-element-press.html b/LayoutTests/accessibility/label-element-press.html
index 33b8217..b6da07d 100644
--- a/LayoutTests/accessibility/label-element-press.html
+++ b/LayoutTests/accessibility/label-element-press.html
@@ -1,12 +1,12 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 </head>
 
 <body id="body">
 
-<label tabindex=0 onclick="performEvent();" id="labelElement">label</label>
+<label tabindex=0 onclick="finishJSTest()" id="labelElement">label</label>
 
 <p id="description"></p>
 <div id="console"></div>
@@ -14,14 +14,9 @@
 <script>
 
     description("This tests that a label element without a corresponding control will perform a press action on itself instead of nothing.");
- 
-    function performEvent() {
-       testRunner.notifyDone();
-    }
+    jsTestIsAsync = true;
 
     if (window.accessibilityController) {
- 
-        testRunner.waitUntilDone();
         document.getElementById("body").focus();
         var body = accessibilityController.focusedElement;
         var label = body.childAtIndex(0).childAtIndex(0);
@@ -31,7 +26,5 @@
     }
 
 </script>
-
-<script src="../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/loading-iframe-updates-axtree.html b/LayoutTests/accessibility/loading-iframe-updates-axtree.html
index 7a50b14..37ac1a7 100644
--- a/LayoutTests/accessibility/loading-iframe-updates-axtree.html
+++ b/LayoutTests/accessibility/loading-iframe-updates-axtree.html
@@ -1,10 +1,9 @@
 <html>
 <head>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 
   <script>
-    if (window.testRunner)
-        testRunner.waitUntilDone();
+    jsTestIsAsync = true;
 
     function runTest()
     {
@@ -33,9 +32,7 @@
                 shouldBeTrue("newSubwebarea.childrenCount > 0");
             }
 
-            debug('<br /><span class="pass">TEST COMPLETE</span>');
-            if (window.testRunner)
-                testRunner.notifyDone();
+            finishJSTest();
         }, false);
 
         // Load content into the iframe. This will trigger the event
diff --git a/LayoutTests/accessibility/mac/aria-expanded-notifications.html b/LayoutTests/accessibility/mac/aria-expanded-notifications.html
index a40db04..92ea054 100644
--- a/LayoutTests/accessibility/mac/aria-expanded-notifications.html
+++ b/LayoutTests/accessibility/mac/aria-expanded-notifications.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/js-test.js"></script>
 </head>
 <body id="body">
 
@@ -42,15 +42,13 @@
         else if (notifyCount == 3) {
             shouldBeEqualToString("notifyName", "AXRowExpanded");
             accessibilityController.removeNotificationListener();
-            var scriptElement = document.createElement("script");
-            scriptElement.src = "../../resources/js-test-post-async.js";
-            document.body.appendChild(scriptElement);
+            finishJSTest();
         }
         notifyCount++;
     }
 
     if (window.accessibilityController) {
-        window.testRunner.waitUntilDone();
+        jsTestIsAsync = true;
 
         var domTree = document.getElementById("tree0");
         domTree.focus();
@@ -68,6 +66,5 @@
     }
 
 </script>
-
 </body>
 </html>
diff --git a/LayoutTests/accessibility/mac/aria-listbox-selectedchildren-change.html b/LayoutTests/accessibility/mac/aria-listbox-selectedchildren-change.html
index 83a4de1..ac84aa9 100644
--- a/LayoutTests/accessibility/mac/aria-listbox-selectedchildren-change.html
+++ b/LayoutTests/accessibility/mac/aria-listbox-selectedchildren-change.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/js-test.js"></script>
 </head>
 <body id="body">
 
@@ -27,13 +27,13 @@
             // We should get a total of 4 live region changes.
             if (notificationCount == 2) {
                window.accessibilityController.removeNotificationListener();
-               window.testRunner.notifyDone();
+               finishJSTest();
             }
         }
     }
 
     if (window.accessibilityController) {
-        window.testRunner.waitUntilDone();
+        jsTestIsAsync = true;
 
         document.getElementById("listbox").focus();
         listbox = window.accessibilityController.focusedElement;
@@ -47,7 +47,5 @@
     }
 
 </script>
-
-<script src="../../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/mac/aria-liveregion-on-image.html b/LayoutTests/accessibility/mac/aria-liveregion-on-image.html
index d025d78..c319f0b 100644
--- a/LayoutTests/accessibility/mac/aria-liveregion-on-image.html
+++ b/LayoutTests/accessibility/mac/aria-liveregion-on-image.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/js-test.js"></script>
 </head>
 <body id="body">
 
@@ -18,12 +18,12 @@
     function ariaCallback(notification) {
         if (notification == "AXLiveRegionChanged") {
             image.removeNotificationListener();
-            window.testRunner.notifyDone();
+            finishJSTest();
         }
     }
 
     if (window.accessibilityController) {
-        window.testRunner.waitUntilDone();
+        jsTestIsAsync = true;
 
         document.getElementById("image").focus();
         image = window.accessibilityController.focusedElement;
@@ -36,7 +36,5 @@
     }
 
 </script>
-
-<script src="../../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/mac/aria-liveregions-addedelement.html b/LayoutTests/accessibility/mac/aria-liveregions-addedelement.html
index 21dc50d..fde6644 100644
--- a/LayoutTests/accessibility/mac/aria-liveregions-addedelement.html
+++ b/LayoutTests/accessibility/mac/aria-liveregions-addedelement.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/js-test.js"></script>
 </head>
 <body id="body">
 
@@ -23,12 +23,12 @@
         if (notification == "AXLiveRegionChanged") {
            document.getElementById("notifications").innerHTML += "Successfully received " + notification;
            liveRegion.removeNotificationListener();
-           window.testRunner.notifyDone();
+           finishJSTest();
         }
     }
 
     if (window.accessibilityController) {
-        window.testRunner.waitUntilDone();
+        jsTestIsAsync = true;
 
         document.getElementById("liveregion").focus();
         liveRegion = window.accessibilityController.focusedElement;
@@ -41,7 +41,5 @@
     }
 
 </script>
-
-<script src="../../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/mac/aria-liveregions-changedalt.html b/LayoutTests/accessibility/mac/aria-liveregions-changedalt.html
index 96e959d..adc327c 100644
--- a/LayoutTests/accessibility/mac/aria-liveregions-changedalt.html
+++ b/LayoutTests/accessibility/mac/aria-liveregions-changedalt.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/js-test.js"></script>
 </head>
 <body id="body">
 
@@ -22,12 +22,12 @@
         if (notification == "AXLiveRegionChanged") {
            document.getElementById("notifications").innerHTML += "Successfully received " + notification;
            liveRegionAlt.removeNotificationListener();
-           window.testRunner.notifyDone();
+           finishJSTest();
         }
     }
 
     if (window.accessibilityController) {
-        window.testRunner.waitUntilDone();
+        jsTestIsAsync = true;
 
         document.getElementById("liveregion").focus();
         liveRegionAlt = window.accessibilityController.focusedElement;
@@ -40,7 +40,5 @@
     }
 
 </script>
-
-<script src="../../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/mac/aria-liveregions-changedtext.html b/LayoutTests/accessibility/mac/aria-liveregions-changedtext.html
index 14233c5..0f5ba0b 100644
--- a/LayoutTests/accessibility/mac/aria-liveregions-changedtext.html
+++ b/LayoutTests/accessibility/mac/aria-liveregions-changedtext.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/js-test.js"></script>
 </head>
 <body id="body">
 
@@ -22,12 +22,12 @@
         if (notification == "AXLiveRegionChanged") {
            document.getElementById("notifications").innerHTML += "Successfully received " + notification;
            liveRegionText.removeNotificationListener();
-           window.testRunner.notifyDone();
+           finishJSTest();
         }
     }
 
     if (window.accessibilityController) {
-        window.testRunner.waitUntilDone();
+        jsTestIsAsync = true;
 
         liveRegionText = accessibilityController.accessibleElementById("liveregion");
 
@@ -39,7 +39,5 @@
     }
 
 </script>
-
-<script src="../../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/mac/aria-liveregions-removedelement.html b/LayoutTests/accessibility/mac/aria-liveregions-removedelement.html
index 9712ae4..843d2aa 100644
--- a/LayoutTests/accessibility/mac/aria-liveregions-removedelement.html
+++ b/LayoutTests/accessibility/mac/aria-liveregions-removedelement.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/js-test.js"></script>
 </head>
 <body id="body">
 
@@ -23,12 +23,12 @@
         if (notification == "AXLiveRegionChanged") {
            document.getElementById("notifications").innerHTML += "Successfully received " + notification;
            liveRegion.removeNotificationListener();
-           window.testRunner.notifyDone();
+           finishJSTest();
         }
     }
 
     if (window.accessibilityController) {
-        window.testRunner.waitUntilDone();
+        jsTestIsAsync = true;
 
         document.getElementById("liveregion").focus();
         liveRegion = window.accessibilityController.focusedElement;
@@ -41,7 +41,5 @@
     }
 
 </script>
-
-<script src="../../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/mac/combobox-activedescendant-notifications-expected.txt b/LayoutTests/accessibility/mac/combobox-activedescendant-notifications-expected.txt
index d5de240..e0f1d9a 100644
--- a/LayoutTests/accessibility/mac/combobox-activedescendant-notifications-expected.txt
+++ b/LayoutTests/accessibility/mac/combobox-activedescendant-notifications-expected.txt
@@ -9,4 +9,7 @@
 The ComboBox should still be the focused element even after the aria-activedescendant was changed.
 PASS combo.isEqual(accessibilityController.focusedElement) is true
 Received notification: AXSelectedChildrenChanged
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
diff --git a/LayoutTests/accessibility/mac/combobox-activedescendant-notifications.html b/LayoutTests/accessibility/mac/combobox-activedescendant-notifications.html
index 6be5583..dac0f32 100644
--- a/LayoutTests/accessibility/mac/combobox-activedescendant-notifications.html
+++ b/LayoutTests/accessibility/mac/combobox-activedescendant-notifications.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC>
 <html>
 <head>
-<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/js-test.js"></script>
 </head>
 <body>
 
@@ -31,7 +31,7 @@
            debug("Received notification: " + notification); 
            if (notification == "AXSelectedChildrenChanged") {
                 combo.removeNotificationListener();
-                window.testRunner.notifyDone();
+                finishJSTest();
            }
         });
 
@@ -43,7 +43,5 @@
     }
 
 </script>
-
-<script src="../../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/mac/focus-setting-selection-syncronizing-not-clearing-expected.txt b/LayoutTests/accessibility/mac/focus-setting-selection-syncronizing-not-clearing-expected.txt
index e0e89ec..d751774 100644
--- a/LayoutTests/accessibility/mac/focus-setting-selection-syncronizing-not-clearing-expected.txt
+++ b/LayoutTests/accessibility/mac/focus-setting-selection-syncronizing-not-clearing-expected.txt
@@ -10,8 +10,8 @@
 PASS axTextStateSyncOne is undefined
 PASS accessibilityController.accessibleElementById("1").isFocusable is true
 PASS accessibilityController.focusedElement.isEqual(accessibilityController.accessibleElementById("1")) is true
+PASS axTextStateSyncTwo is undefined
 PASS successfullyParsed is true
 
 TEST COMPLETE
-PASS axTextStateSyncTwo is undefined
 
diff --git a/LayoutTests/accessibility/mac/focus-setting-selection-syncronizing-not-clearing.html b/LayoutTests/accessibility/mac/focus-setting-selection-syncronizing-not-clearing.html
index b8f3172..a2ca361 100644
--- a/LayoutTests/accessibility/mac/focus-setting-selection-syncronizing-not-clearing.html
+++ b/LayoutTests/accessibility/mac/focus-setting-selection-syncronizing-not-clearing.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/js-test.js"></script>
 </head>
 <body id="body">
 
@@ -55,12 +55,12 @@
         }
         if (selectCount == 2 && focusCount == 3) {
             webArea.removeNotificationListener();
-            testRunner.notifyDone();
+            finishJSTest();
         }
     }
 
     if (window.accessibilityController) {
-        testRunner.waitUntilDone();
+        jsTestIsAsync = true;
         testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
 
         accessibilityController.enableEnhancedAccessibility(true);
@@ -74,7 +74,5 @@
     }
 
 </script>
-
-<script src="../../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/mac/html-slider-indicator.html b/LayoutTests/accessibility/mac/html-slider-indicator.html
index c78a222..ae93a7a 100644
--- a/LayoutTests/accessibility/mac/html-slider-indicator.html
+++ b/LayoutTests/accessibility/mac/html-slider-indicator.html
@@ -1,6 +1,6 @@
 <html>
 <head>
-<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/js-test.js"></script>
 </head>
 <body id="body">
 
@@ -24,12 +24,12 @@
 
         if (valueChangeCount == 2) {
            range.removeNotificationListener();
-           window.testRunner.notifyDone();
+           finishJSTest();
         }
     }
 
     if (window.accessibilityController) {
-        window.testRunner.waitUntilDone();
+        jsTestIsAsync = true;
 
         document.getElementById("range1").focus();
         range = accessibilityController.focusedElement;
@@ -63,7 +63,5 @@
     }
 
 </script>
-
-<script src="../../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/mac/input-replacevalue-userinfo-expected.txt b/LayoutTests/accessibility/mac/input-replacevalue-userinfo-expected.txt
index efa6f82f..2249df9 100644
--- a/LayoutTests/accessibility/mac/input-replacevalue-userinfo-expected.txt
+++ b/LayoutTests/accessibility/mac/input-replacevalue-userinfo-expected.txt
@@ -5,9 +5,6 @@
 
 
 PASS addedNotification is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
 PASS results[resultIndex]["AXTextStateChangeType"] is AXTextStateChangeTypeEdit
 PASS results[resultIndex]["AXTextChangeValues"][0]["AXTextChangeValue"] is "0"
 PASS results[resultIndex]["AXTextChangeValues"][0]["AXTextEditType"] is AXTextEditTypeDelete
@@ -17,4 +14,7 @@
 PASS results[resultIndex]["AXTextStateChangeType"] is AXTextStateChangeTypeEdit
 PASS results[resultIndex]["AXTextChangeValues"][0]["AXTextChangeValue"] is " "
 PASS results[resultIndex]["AXTextChangeValues"][0]["AXTextEditType"] is AXTextEditTypeInsert
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
diff --git a/LayoutTests/accessibility/mac/input-replacevalue-userinfo.html b/LayoutTests/accessibility/mac/input-replacevalue-userinfo.html
index 5426c9a..e6f1b17 100644
--- a/LayoutTests/accessibility/mac/input-replacevalue-userinfo.html
+++ b/LayoutTests/accessibility/mac/input-replacevalue-userinfo.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-    <script src="../../resources/js-test-pre.js"></script>
+    <script src="../../resources/js-test.js"></script>
     <script src="../../editing/editing.js"></script>
 </head>
 <body id="body">
@@ -47,7 +47,7 @@
                     shouldBe("results[resultIndex][\"AXTextChangeValues\"][0][\"AXTextEditType\"]", "AXTextEditTypeInsert");
 
                     webArea.removeNotificationListener();
-                    window.testRunner.notifyDone();
+                    finishJSTest();
                 }
             }
         }
@@ -64,7 +64,7 @@
         document.getElementById("securevaluetest").value = "0";
 
         if (window.accessibilityController) {
-             window.testRunner.waitUntilDone();
+            jsTestIsAsync = true;
 
             accessibilityController.enableEnhancedAccessibility(true);
 
@@ -77,7 +77,5 @@
             setsecurevalue();
         }
     </script>
-
-    <script src="../../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/mac/ordered-textmarker-crash-expected.txt b/LayoutTests/accessibility/mac/ordered-textmarker-crash-expected.txt
index 70b73bf..ca39412 100644
--- a/LayoutTests/accessibility/mac/ordered-textmarker-crash-expected.txt
+++ b/LayoutTests/accessibility/mac/ordered-textmarker-crash-expected.txt
@@ -4,4 +4,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
diff --git a/LayoutTests/accessibility/mac/ordered-textmarker-crash.html b/LayoutTests/accessibility/mac/ordered-textmarker-crash.html
index 6f92521..74a1e4e 100644
--- a/LayoutTests/accessibility/mac/ordered-textmarker-crash.html
+++ b/LayoutTests/accessibility/mac/ordered-textmarker-crash.html
@@ -1,9 +1,9 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/js-test.js"></script>
 </head>
-<body id="body" onload="setTimeout('runTest();', 1)">
+<body id="body" onload="runTest()">
 
 <div id="content1">
 <iframe src="data:text/html,<body><div>hello</div>"></iframe>
@@ -15,9 +15,7 @@
 
     description("This tests that comparing text markers that have no common tree scope won't crash");
 
-    if (window.accessibilityController && window.testRunner) {
-        window.jsTestIsAsync = true;
-    }
+    jsTestIsAsync = true;
 
     function runTest() {
 
@@ -38,12 +36,10 @@
         // Ask for the text marker range with the markers in a different tree.
         // This should NOT crash!
         var range = accessibilityController.rootElement.childAtIndex(0).textMarkerRangeForMarkers(marker1, marker2);
-        window.testRunner.notifyDone();
+
         finishJSTest();
     }
 
 </script>
-
-<script src="../../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/mac/search-with-frames-expected.txt b/LayoutTests/accessibility/mac/search-with-frames-expected.txt
index f5410ab..297ccfc 100644
--- a/LayoutTests/accessibility/mac/search-with-frames-expected.txt
+++ b/LayoutTests/accessibility/mac/search-with-frames-expected.txt
@@ -4,9 +4,6 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS successfullyParsed is true
-
-TEST COMPLETE
 PASS resultElement.role is 'AXRole: AXButton'
 PASS resultElement.title is 'AXTitle: button1'
 PASS resultElement.role is 'AXRole: AXButton'
@@ -21,4 +18,7 @@
 PASS resultElement.description is 'AXDescription: frame1a'
 PASS resultElement.role is 'AXRole: AXWebArea'
 PASS resultElement.description is 'AXDescription: frame2'
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
diff --git a/LayoutTests/accessibility/mac/search-with-frames.html b/LayoutTests/accessibility/mac/search-with-frames.html
index 56c426b..06de218 100644
--- a/LayoutTests/accessibility/mac/search-with-frames.html
+++ b/LayoutTests/accessibility/mac/search-with-frames.html
@@ -1,10 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script>
-var successfullyParsed = false;
-</script>
-<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/js-test.js"></script>
 </head>
 <body id="body">
 
@@ -16,7 +13,7 @@
 <div id="console"></div>
 
 <script>
-    window.testRunner.waitUntilDone();
+    jsTestIsAsync = true;
 
     // We have to play some games to get these frames to load their sources in a timely fashion.
     document.getElementById("frame1").src = "data:text/html,<body id='body1'><button id=button1>button1</button><BR><BR><BR></body>";
@@ -112,11 +109,9 @@
     }
 
     successfullyParsed = true;
-    window.testRunner.notifyDone();
+    finishJSTest();
 }
 
 </script>
-
-<script src="../../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/mac/selection-boundary-userinfo.html b/LayoutTests/accessibility/mac/selection-boundary-userinfo.html
index 8fe657d..8bd9195 100644
--- a/LayoutTests/accessibility/mac/selection-boundary-userinfo.html
+++ b/LayoutTests/accessibility/mac/selection-boundary-userinfo.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/js-test.js"></script>
 </head>
 <body id="body">
 
@@ -148,13 +148,13 @@
                 shouldBeResults(true);
 
                 webArea.removeNotificationListener();
-                window.testRunner.notifyDone();
+                finishJSTest();
             }
         }
     }
 
     if (window.accessibilityController) {
-        window.testRunner.waitUntilDone();
+        jsTestIsAsync = true;
 
         accessibilityController.enableEnhancedAccessibility(true);
 
@@ -179,7 +179,5 @@
     }
 
 </script>
-
-<script src="../../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/mac/selection-change-userinfo.html b/LayoutTests/accessibility/mac/selection-change-userinfo.html
index 09cf0c7..e1ebdec 100644
--- a/LayoutTests/accessibility/mac/selection-change-userinfo.html
+++ b/LayoutTests/accessibility/mac/selection-change-userinfo.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/js-test.js"></script>
 </head>
 <body id="body">
 
@@ -180,13 +180,13 @@
                 shouldBe("results[resultIndex][\"AXTextSelectionDirection\"]", "AXTextSelectionDirectionEnd");
 
                 webArea.removeNotificationListener();
-                window.testRunner.notifyDone();
+                finishJSTest();
             }
         }
     }
 
     if (window.accessibilityController) {
-        window.testRunner.waitUntilDone();
+        jsTestIsAsync = true;
 
         accessibilityController.enableEnhancedAccessibility(true);
 
@@ -211,7 +211,5 @@
     }
 
 </script>
-
-<script src="../../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/mac/selection-element-tabbing-to-link.html b/LayoutTests/accessibility/mac/selection-element-tabbing-to-link.html
index 0ed96fe..8b1960b 100644
--- a/LayoutTests/accessibility/mac/selection-element-tabbing-to-link.html
+++ b/LayoutTests/accessibility/mac/selection-element-tabbing-to-link.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/js-test.js"></script>
 </head>
 <body id="body">
 
@@ -48,13 +48,13 @@
                 linkOne = accessibilityController.accessibleElementById("one");
                 shouldBe("ancestorWithRole(changeElementTwo, \"AXRole: AXLink\").isEqual(linkOne)", "true");
                 webArea.removeNotificationListener();
-                testRunner.notifyDone();
+                finishJSTest();
             }
         }
     }
 
     if (window.accessibilityController) {
-        testRunner.waitUntilDone();
+        jsTestIsAsync = true;
         testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
 
         accessibilityController.enableEnhancedAccessibility(true);
@@ -72,7 +72,5 @@
     }
 
 </script>
-
-<script src="../../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/mac/selection-value-changes-for-aria-textbox.html b/LayoutTests/accessibility/mac/selection-value-changes-for-aria-textbox.html
index a3c4bab..ee9e0a8 100644
--- a/LayoutTests/accessibility/mac/selection-value-changes-for-aria-textbox.html
+++ b/LayoutTests/accessibility/mac/selection-value-changes-for-aria-textbox.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/js-test.js"></script>
 </head>
 <body id="body">
 
@@ -22,7 +22,7 @@
         if (notification == "AXValueChanged") {
            document.getElementById("notifications").innerHTML += "Successfully received " + notification + "<br>";
            axTextbox.removeNotificationListener();
-           window.testRunner.notifyDone();
+           finishJSTest();
         }
         else if (notification == "AXSelectedTextChanged") {
            document.getElementById("notifications").innerHTML += "Successfully received " + notification + "<br>";
@@ -30,7 +30,7 @@
     }
 
     if (window.accessibilityController) {
-        window.testRunner.waitUntilDone();
+        jsTestIsAsync = true;
 
         textbox = document.getElementById("textbox");
         textbox.focus();
@@ -52,7 +52,5 @@
     }
 
 </script>
-
-<script src="../../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/mac/stale-textmarker-crash-expected.txt b/LayoutTests/accessibility/mac/stale-textmarker-crash-expected.txt
index 6e9f7ba..3a21c2c 100644
--- a/LayoutTests/accessibility/mac/stale-textmarker-crash-expected.txt
+++ b/LayoutTests/accessibility/mac/stale-textmarker-crash-expected.txt
@@ -7,4 +7,7 @@
 Text marker 2 is valid: true
 Text marker 1 is valid: false
 Text marker 2 is valid: false
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
diff --git a/LayoutTests/accessibility/mac/stale-textmarker-crash.html b/LayoutTests/accessibility/mac/stale-textmarker-crash.html
index 4b8b5af..b8520b1 100644
--- a/LayoutTests/accessibility/mac/stale-textmarker-crash.html
+++ b/LayoutTests/accessibility/mac/stale-textmarker-crash.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/js-test.js"></script>
 </head>
 <body id="body" onload="setTimeout('runTest();', 1)">
 
@@ -17,9 +17,7 @@
 
     var cachedMarker1 = 0;
     var cachedMarker2 = 0;
-    if (window.accessibilityController && window.testRunner) {
-        window.jsTestIsAsync = true;
-    }
+    jsTestIsAsync = true;
 
     function runTest() {
 
@@ -52,12 +50,9 @@
         var index2 = console.indexForTextMarker(cachedMarker2);
         debug("Text marker 2 is valid: " + console.isTextMarkerValid(cachedMarker2));
 
-        window.testRunner.notifyDone();
         finishJSTest();
     }
 
 </script>
-
-<script src="../../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/mac/textbox-role-reports-notifications-expected.txt b/LayoutTests/accessibility/mac/textbox-role-reports-notifications-expected.txt
index 3d96fec..be94adc 100644
--- a/LayoutTests/accessibility/mac/textbox-role-reports-notifications-expected.txt
+++ b/LayoutTests/accessibility/mac/textbox-role-reports-notifications-expected.txt
@@ -1,6 +1,13 @@
 This tests that the AXValueChanged notification is correctly reported for non-native text boxes when content is changed.
 changed innerText
+
+
+
+
 Successfully received AXValueChanged.
 Successfully received AXValueChanged.
 Successfully received AXValueChanged.
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
diff --git a/LayoutTests/accessibility/mac/textbox-role-reports-notifications.html b/LayoutTests/accessibility/mac/textbox-role-reports-notifications.html
index 2b58f6a..1061ea3 100644
--- a/LayoutTests/accessibility/mac/textbox-role-reports-notifications.html
+++ b/LayoutTests/accessibility/mac/textbox-role-reports-notifications.html
@@ -1,20 +1,17 @@
-<!DOCTYPE HTML PUBLIC>
+<!DOCTYPE html>
 <html>
 <head>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../../resources/js-test.js"></script>
 </head>
 <body>
-This tests that the AXValueChanged notification is correctly reported for non-native text boxes when content is changed.<br>
+<div>This tests that the AXValueChanged notification is correctly reported for non-native text boxes when content is changed.</div>
 <div role="textbox" id="ariaTextBox" aria-multiline="false" tabindex="0">Some text in a textbox.</div>
-<div id="console"></div>
-<div id="notifications"></div>
+<div id="console"</div>
 <script>
     var textboxAxElement;
     if (window.testRunner && window.accessibilityController) {
-        window.testRunner.waitUntilDone();
-
+        jsTestIsAsync = true;
         accessibilityController.logAccessibilityEvents();
-        window.testRunner.dumpAsText();
 
         var ariaTextBox = document.getElementById("ariaTextBox");
         ariaTextBox.focus();
@@ -28,17 +25,15 @@
 
     function logNotification(notification) {
         if (notification == "AXValueChanged") {
-            document.getElementById("notifications").innerHTML += "Successfully received AXValueChanged.<br>";
+            debug("Successfully received AXValueChanged.");
             pendingNotifications--;
             if (pendingNotifications == 0) {
                 textboxAxElement.removeNotificationListener();
-                window.testRunner.notifyDone();
+                finishJSTest();
             }
         }
     }
 
 </script>
-
-<script src="../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/mac/value-change/value-change-user-info-contenteditable.html b/LayoutTests/accessibility/mac/value-change/value-change-user-info-contenteditable.html
index 07a134b..dd9125c 100644
--- a/LayoutTests/accessibility/mac/value-change/value-change-user-info-contenteditable.html
+++ b/LayoutTests/accessibility/mac/value-change/value-change-user-info-contenteditable.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-    <script src="../../../resources/js-test-pre.js"></script>
+    <script src="../../../resources/js-test.js"></script>
     <script src="../../../editing/editing.js"></script>
     <script src="value-change-helpers.js"></script>
 </head>
@@ -60,13 +60,13 @@
                     shouldBeInsertReplace("2", "3");
 
                     webArea.removeNotificationListener();
-                    window.testRunner.notifyDone();
+                    finishJSTest();
                 }
             }
         }
 
         if (window.accessibilityController) {
-             window.testRunner.waitUntilDone();
+            jsTestIsAsync = true;
 
             accessibilityController.enableEnhancedAccessibility(true);
 
@@ -102,7 +102,5 @@
             execRedoCommand();
         }
     </script>
-
-    <script src="../../../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/mac/value-change/value-change-user-info-textarea.html b/LayoutTests/accessibility/mac/value-change/value-change-user-info-textarea.html
index 36c4e58..ebf00eb 100644
--- a/LayoutTests/accessibility/mac/value-change/value-change-user-info-textarea.html
+++ b/LayoutTests/accessibility/mac/value-change/value-change-user-info-textarea.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-    <script src="../../../resources/js-test-pre.js"></script>
+    <script src="../../../resources/js-test.js"></script>
     <script src="../../../editing/editing.js"></script>
     <script src="value-change-helpers.js"></script>
 </head>
@@ -62,13 +62,13 @@
                     shouldBeInsertReplace("5", "6");
 
                     webArea.removeNotificationListener();
-                    window.testRunner.notifyDone();
+                    finishJSTest();
                 }
             }
         }
 
         if (window.accessibilityController) {
-             window.testRunner.waitUntilDone();
+            jsTestIsAsync = true;
 
             accessibilityController.enableEnhancedAccessibility(true);
 
@@ -104,7 +104,5 @@
             execRedoCommand();
         }
     </script>
-
-    <script src="../../../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/mac/value-change/value-change-user-info-textfield.html b/LayoutTests/accessibility/mac/value-change/value-change-user-info-textfield.html
index 8518b50..d20cba3 100644
--- a/LayoutTests/accessibility/mac/value-change/value-change-user-info-textfield.html
+++ b/LayoutTests/accessibility/mac/value-change/value-change-user-info-textfield.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-    <script src="../../../resources/js-test-pre.js"></script>
+    <script src="../../../resources/js-test.js"></script>
     <script src="../../../editing/editing.js"></script>
     <script src="value-change-helpers.js"></script>
 </head>
@@ -60,13 +60,13 @@
                     shouldBeInsertReplace("8", "9");
 
                     webArea.removeNotificationListener();
-                    window.testRunner.notifyDone();
+                    finishJSTest();
                 }
             }
         }
 
         if (window.accessibilityController) {
-             window.testRunner.waitUntilDone();
+            jsTestIsAsync = true;
 
             accessibilityController.enableEnhancedAccessibility(true);
 
@@ -100,7 +100,5 @@
             execRedoCommand();
         }
     </script>
-
-    <script src="../../../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/media-element.html b/LayoutTests/accessibility/media-element.html
index 805ae66..2cb5b50 100644
--- a/LayoutTests/accessibility/media-element.html
+++ b/LayoutTests/accessibility/media-element.html
@@ -6,10 +6,7 @@
             var vidAXObject;
             var indentLevel = 0;
 
-            if (window.testRunner) {
-                testRunner.dumpAsText();
-                testRunner.waitUntilDone();
-            }
+            jsTestIsAsync = true;
 
             function indent(count)
             {
@@ -62,8 +59,8 @@
                 
                 dumpChildren(vidAXObject);
 
-                if (window.testRunner && event.type == 'canplaythrough')
-                    testRunner.notifyDone();     
+                if (event.type == 'canplaythrough')
+                    finishJSTest();
             }
         </script>
     </head>
@@ -77,6 +74,7 @@
     
     <div id=console></div>
 
+    <script src="../resources/js-test-post.js"></script>
 </body>
 </html>
 
diff --git a/LayoutTests/accessibility/menu-list-sends-change-notification.html b/LayoutTests/accessibility/menu-list-sends-change-notification.html
index 99ac08a..bae903a 100644
--- a/LayoutTests/accessibility/menu-list-sends-change-notification.html
+++ b/LayoutTests/accessibility/menu-list-sends-change-notification.html
@@ -1,9 +1,8 @@
 <html>
 <head>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 <script>
-    if (window.testRunner)
-        testRunner.waitUntilDone();
+    jsTestIsAsync = true;
 
     function runTest() {
         description("This tests that changing the value of a menu list sends a notification even when it's not popped open.");
@@ -15,9 +14,7 @@
         function listener(notification) {
             document.getElementById("console").innerText += "Got notification: " + notification + "\n";
             accessibleMenulist.removeNotificationListener(listener);
-            debug('<br /><span class="pass">TEST COMPLETE</span>');
-            if (window.testRunner)
-                testRunner.notifyDone();
+            finishJSTest();
         }
         accessibleMenulist.addNotificationListener(listener);
 
@@ -26,8 +23,7 @@
 
         // Make the test finish quickly whether we get the notification or not.
         window.setTimeout(function() {
-            if (window.testRunner)
-                testRunner.notifyDone();
+            finishJSTest();
         }, 10);
     }
 
diff --git a/LayoutTests/accessibility/multiselect-list-reports-active-option.html b/LayoutTests/accessibility/multiselect-list-reports-active-option.html
index af1ab93..84cf100 100644
--- a/LayoutTests/accessibility/multiselect-list-reports-active-option.html
+++ b/LayoutTests/accessibility/multiselect-list-reports-active-option.html
@@ -1,9 +1,8 @@
 <html>
 <head>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 <script>
-    if (window.testRunner)
-        testRunner.waitUntilDone();
+    jsTestIsAsync = true;
 
     function runTest() {
         description("This tests that navigating in a multiselect list updates selection and the active selected option and sends a notification.");
@@ -55,11 +54,9 @@
 
         // Make the test finish quickly whether we get the notification or not.
         window.setTimeout(function() {
-            debug('<br /><span class="pass">TEST COMPLETE</span>');
             if (window.accessibilityController)
                 accessibleMenulist.removeNotificationListener();
-            if (window.testRunner)
-                testRunner.notifyDone();
+            finishJSTest();
         }, 10);
     }
 
diff --git a/LayoutTests/accessibility/paragraph-with-linebreaks.html b/LayoutTests/accessibility/paragraph-with-linebreaks.html
index b717ecf..6ab71f6 100644
--- a/LayoutTests/accessibility/paragraph-with-linebreaks.html
+++ b/LayoutTests/accessibility/paragraph-with-linebreaks.html
@@ -1,6 +1,6 @@
 <html>
 <head>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 </head>
 <body>
 
@@ -22,8 +22,6 @@
 description("This test checks that linebreaks explicitly set by the author are properly exposed to ATs.");
 
 if (window.testRunner) {
-  testRunner.dumpAsText();
-
   if (window.accessibilityController) {
 
     document.body.focus();
@@ -41,8 +39,5 @@
   }
 }
 </script>
-
-<script src="../resources/js-test-post.js"></script>
-
 </body>
 </html>
diff --git a/LayoutTests/accessibility/platform-name.html b/LayoutTests/accessibility/platform-name.html
index 8d471ec..1c5770b 100644
--- a/LayoutTests/accessibility/platform-name.html
+++ b/LayoutTests/accessibility/platform-name.html
@@ -1,19 +1,15 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 </head>
 <body id="body">
 <p id="description"></p>
 <div id="console"></div>
 <script>
 description("This test just prints the name of the current platform.");
-if (window.testRunner && window.accessibilityController) {
-  testRunner.dumpAsText();
-
-  debug("Platform name: " + accessibilityController.platformName);
-}
+if (window.testRunner && window.accessibilityController)
+    debug("Platform name: " + accessibilityController.platformName);
 </script>
-<script src="../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/radio-button-group-members.html b/LayoutTests/accessibility/radio-button-group-members.html
index 2d1a51f..e5892d5 100644
--- a/LayoutTests/accessibility/radio-button-group-members.html
+++ b/LayoutTests/accessibility/radio-button-group-members.html
@@ -1,9 +1,5 @@
 <html>
-<script src="../resources/js-test-pre.js"></script>
-<script>
-    if (window.testRunner)
-        testRunner.dumpAsText();
-</script>
+<script src="../resources/js-test.js"></script>
 <body>
     
     <div id="content">
@@ -89,6 +85,5 @@
             document.getElementById("content").style.visibility = "hidden";
         }
     </script>
-<script src="../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/radio-button-title-label.html b/LayoutTests/accessibility/radio-button-title-label.html
index c9be017..dfe4989 100644
--- a/LayoutTests/accessibility/radio-button-title-label.html
+++ b/LayoutTests/accessibility/radio-button-title-label.html
@@ -1,11 +1,7 @@
 <html>
 <head>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 </head>
-<script>
-    if (window.testRunner)
-        testRunner.dumpAsText();
-</script>
 <body>
 
 <p id="description"></p>
@@ -62,8 +58,5 @@
 
         }
     </script>
-
-<script src="../resources/js-test-post.js"></script>
-
 </body>
 </html>
diff --git a/LayoutTests/accessibility/selection-states-expected.txt b/LayoutTests/accessibility/selection-states-expected.txt
index e388283..cf42a23 100644
--- a/LayoutTests/accessibility/selection-states-expected.txt
+++ b/LayoutTests/accessibility/selection-states-expected.txt
@@ -9,4 +9,7 @@
 PASS accessibilityController.focusedElement.childAtIndex(1).isSelected is false
 PASS accessibilityController.focusedElement.childAtIndex(2).isSelectable is false
 PASS accessibilityController.focusedElement.childAtIndex(2).isSelected is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
diff --git a/LayoutTests/accessibility/selection-states.html b/LayoutTests/accessibility/selection-states.html
index 3b5aa4a..92219ab 100644
--- a/LayoutTests/accessibility/selection-states.html
+++ b/LayoutTests/accessibility/selection-states.html
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../resources/js-test-pre.js"></script>
+    <script src="../resources/js-test.js"></script>
 </head>
 
 <body id="body">
@@ -21,8 +21,6 @@
     if (window.testRunner && window.accessibilityController) {
         document.getElementById("notDRT").style.visibility = "hidden";
 
-        testRunner.dumpAsText();
-
         document.getElementById("selectElement").focus();
 
         shouldBeTrue('accessibilityController.focusedElement.isMultiSelectable');
diff --git a/LayoutTests/accessibility/spinbutton-value.html b/LayoutTests/accessibility/spinbutton-value.html
index a69121c..d4973be 100644
--- a/LayoutTests/accessibility/spinbutton-value.html
+++ b/LayoutTests/accessibility/spinbutton-value.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML>
 <html>
 <body>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 
 <button id="untitled"></button>
 
@@ -18,8 +18,6 @@
 description("This tests that a spin button supports range value attributes.")
 
 if (window.testRunner && window.accessibilityController) {
-    window.testRunner.dumpAsText();
-
     function endsWith(str, suffix) {
         str = '' + str;
         return str.substr(str.length - suffix.length) == suffix;
@@ -45,7 +43,5 @@
 }
 
 </script>
-
-<script src="../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/svg-bounds.html b/LayoutTests/accessibility/svg-bounds.html
index 2680626..ec5698f 100644
--- a/LayoutTests/accessibility/svg-bounds.html
+++ b/LayoutTests/accessibility/svg-bounds.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML>
 <html>
 <body>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 <script src="../resources/accessibility-helper.js"></script>
 
 <div id="container" style="position: relative; top: 100px; left: 600px; width:400px; height: 400px;" role="group" tabindex="0">
@@ -36,8 +36,6 @@
 }
 
 if (window.testRunner && window.accessibilityController) {
-    window.testRunner.dumpAsText();
- 
     var container = accessibilityController.accessibleElementById("svgroot");
 
     var x = pageX(container) - 1;
@@ -91,8 +89,6 @@
 }
 
 </script>
-
-<script src="../resources/js-test-post.js"></script>
 </body>
 </html>
 
diff --git a/LayoutTests/accessibility/table-cell-for-column-and-row-crash.html b/LayoutTests/accessibility/table-cell-for-column-and-row-crash.html
index 424a2ec..50a0cc4 100644
--- a/LayoutTests/accessibility/table-cell-for-column-and-row-crash.html
+++ b/LayoutTests/accessibility/table-cell-for-column-and-row-crash.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 </head>
 
 <body id="body">
@@ -16,8 +16,6 @@
 description("This tests that retrieving a cell for a table multiple times doesn't crash.");
 
 if (window.testRunner) {
-  testRunner.dumpAsText();
-
   if (window.accessibilityController) {
     document.getElementById("body").focus();
     var axBody = accessibilityController.focusedElement;
@@ -39,7 +37,5 @@
   }
 }
 </script>
-
-<script src="../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/table-cells-roles.html b/LayoutTests/accessibility/table-cells-roles.html
index a36ba10..a86daed 100644
--- a/LayoutTests/accessibility/table-cells-roles.html
+++ b/LayoutTests/accessibility/table-cells-roles.html
@@ -1,9 +1,5 @@
 <html>
-<script src="../resources/js-test-pre.js"></script>
-<script>
-  if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
+<script src="../resources/js-test.js"></script>
 <body>
 
 <table id="table1">
diff --git a/LayoutTests/accessibility/table-roles-hierarchy.html b/LayoutTests/accessibility/table-roles-hierarchy.html
index 9bc3507..0d3c12e 100644
--- a/LayoutTests/accessibility/table-roles-hierarchy.html
+++ b/LayoutTests/accessibility/table-roles-hierarchy.html
@@ -1,14 +1,10 @@
 <html>
 <head>
-  <script src="../resources/js-test-pre.js"></script>
+  <script src="../resources/js-test.js"></script>
   <script>
     var tableAXObject;
     var indentLevel = 0;
 
-    if (window.testRunner) {
-      testRunner.dumpAsText();
-    }
-
     function indent(count) {
       var spaces = "                                                      ";
       return spaces.substr(0, count);
diff --git a/LayoutTests/accessibility/table-with-aria-role.html b/LayoutTests/accessibility/table-with-aria-role.html
index bde2ebe..6a0cf91 100644
--- a/LayoutTests/accessibility/table-with-aria-role.html
+++ b/LayoutTests/accessibility/table-with-aria-role.html
@@ -1,9 +1,5 @@
 <html>
-<script src="../resources/js-test-pre.js"></script>
-<script>
-    if (window.testRunner)
-        testRunner.dumpAsText();
-</script>
+<script src="../resources/js-test.js"></script>
 <body id="body">
 
 <div id="content">
@@ -28,6 +24,5 @@
             document.getElementById("content").style.display = "none";
         }
     </script>
-<script src="../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/textarea-insertion-point-line-number.html b/LayoutTests/accessibility/textarea-insertion-point-line-number.html
index d0b03c2..1214a19 100644
--- a/LayoutTests/accessibility/textarea-insertion-point-line-number.html
+++ b/LayoutTests/accessibility/textarea-insertion-point-line-number.html
@@ -1,9 +1,5 @@
 <html>
-<script src="../resources/js-test-pre.js"></script>
-<script>
-    if (window.testRunner)
-        testRunner.dumpAsText();
-</script>
+<script src="../resources/js-test.js"></script>
 <body>
     <div id="console"></div>
     <textarea name="area1" id="area1" rows="5" cols="40">
@@ -61,6 +57,5 @@
             shouldBe("textareaAXUIElement.insertionPointLineNumber", "0");
         }
     </script>
-<script src="../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/textbox-role-reports-selection.html b/LayoutTests/accessibility/textbox-role-reports-selection.html
index c738724..dba10fe 100644
--- a/LayoutTests/accessibility/textbox-role-reports-selection.html
+++ b/LayoutTests/accessibility/textbox-role-reports-selection.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC>
 <html>
 <head>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 </head>
 <body>
 This tests that the AXSelection property is correctly reported for non-native text boxes.<br>
@@ -36,7 +36,6 @@
     }
 
     if (window.testRunner && window.accessibilityController) {
-        window.testRunner.dumpAsText();
         var ariaTextBox = document.getElementById("ariaTextBox");
         var textLength = ariaTextBox.textContent.length;
 
@@ -49,7 +48,5 @@
     }
 
 </script>
-
-<script src="../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/title-ui-element-correctness.html b/LayoutTests/accessibility/title-ui-element-correctness.html
index 456bedf..b516b2a 100644
--- a/LayoutTests/accessibility/title-ui-element-correctness.html
+++ b/LayoutTests/accessibility/title-ui-element-correctness.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML>
 <html>
 <body>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 
 <div id="container">
 
@@ -45,8 +45,6 @@
 description("This tests that titleUIElement works correctly even when things change dynamically.");
 
 if (window.testRunner && window.accessibilityController) {
-    testRunner.dumpAsText();
-
     function hasTitleUIElement(axElement) {
         var label1 = accessibilityController.accessibleElementById("label1");
         var titleUIElement = axElement.titleUIElement();
@@ -107,7 +105,5 @@
 }
 
 </script>
-
-<script src="../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/unknown-roles-not-exposed-expected.txt b/LayoutTests/accessibility/unknown-roles-not-exposed-expected.txt
index d49818c..162bbaf 100644
--- a/LayoutTests/accessibility/unknown-roles-not-exposed-expected.txt
+++ b/LayoutTests/accessibility/unknown-roles-not-exposed-expected.txt
@@ -4,8 +4,8 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+PASS findUnknownChild(accessibilityController.focusedElement) == null is true
 PASS successfullyParsed is true
 
 TEST COMPLETE
-PASS findUnknownChild(accessibilityController.focusedElement) == null is true
 
diff --git a/LayoutTests/accessibility/unknown-roles-not-exposed.html b/LayoutTests/accessibility/unknown-roles-not-exposed.html
index 9441799..ee53f82 100644
--- a/LayoutTests/accessibility/unknown-roles-not-exposed.html
+++ b/LayoutTests/accessibility/unknown-roles-not-exposed.html
@@ -1,12 +1,8 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../resources/js-test.js"></script>
 <script>
-
-if (window.testRunner)
-  testRunner.dumpAsText();
-
 function findUnknownChild(accessibilityObject) {
     if (accessibilityObject.role == "AXRole: AXUnknown")
         return accessibilityObject;
@@ -39,6 +35,5 @@
 description("This tests accessibility objects with role 'unknown' are not being exposed.");
 
 </script>
-<script src="../resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/accessibility/win/bstr-elements-role.html b/LayoutTests/accessibility/win/bstr-elements-role.html
index 106237b..a03f388 100644
--- a/LayoutTests/accessibility/win/bstr-elements-role.html
+++ b/LayoutTests/accessibility/win/bstr-elements-role.html
@@ -1,11 +1,6 @@
 <html>
     <head>
-        <script src="../../resources/js-test-pre.js"></script>
-
-        <script>
-            if (window.testRunner)
-                testRunner.dumpAsText();
-        </script>
+        <script src="../../resources/js-test.js"></script>
     </head>
     <body id="body">
         <abbr>abbr</abbr>
diff --git a/LayoutTests/accessibility/win/detached-object-notification-crash.html b/LayoutTests/accessibility/win/detached-object-notification-crash.html
index 5fe27cb..3d06e05 100644
--- a/LayoutTests/accessibility/win/detached-object-notification-crash.html
+++ b/LayoutTests/accessibility/win/detached-object-notification-crash.html
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../resources/js-test-pre.js"></script>
+    <script src="../../resources/js-test.js"></script>
 </head>
 
 <body id="body">
@@ -22,13 +22,12 @@
             return;
 
         debug("PASS: Didn't crash.");
-        testRunner.notifyDone();
+        finishJSTest();
     }
     if (window.testRunner && window.accessibilityController) {
         document.getElementById("notDRT").style.visibility = "hidden";
 
-        testRunner.dumpAsText();
-        testRunner.waitUntilDone();
+        jsTestIsAsync = true;
 
         var element = document.getElementById("avnElement");
         element.focus();
diff --git a/LayoutTests/accessibility/win/heading-elements.html b/LayoutTests/accessibility/win/heading-elements.html
index f613456..ee1ad96 100644
--- a/LayoutTests/accessibility/win/heading-elements.html
+++ b/LayoutTests/accessibility/win/heading-elements.html
@@ -1,11 +1,6 @@
 <html>
     <head>
-        <script src="../../resources/js-test-pre.js"></script>
-
-        <script>
-            if (window.testRunner)
-                testRunner.dumpAsText();
-        </script>
+        <script src="../../resources/js-test.js"></script>
     </head>
     <body id="body">
         <h1>h1</h1>
diff --git a/LayoutTests/accessibility/win/img-alt-attribute.html b/LayoutTests/accessibility/win/img-alt-attribute.html
index a5ad367..dc7956c 100644
--- a/LayoutTests/accessibility/win/img-alt-attribute.html
+++ b/LayoutTests/accessibility/win/img-alt-attribute.html
@@ -1,11 +1,6 @@
 <html>
     <head>
-        <script src="../../resources/js-test-pre.js"></script>
-
-        <script>
-            if (window.testRunner)
-                testRunner.dumpAsText();
-        </script>
+        <script src="../../resources/js-test.js"></script>
     </head>
     <body>
         <img aria-labeledby="desc" alt="alternate text" title="title">
diff --git a/LayoutTests/accessibility/win/linked-elements.html b/LayoutTests/accessibility/win/linked-elements.html
index bf66260..6fd4c78 100644
--- a/LayoutTests/accessibility/win/linked-elements.html
+++ b/LayoutTests/accessibility/win/linked-elements.html
@@ -1,11 +1,6 @@
 <html>
     <head>
-        <script src="../../resources/js-test-pre.js"></script>
-
-        <script>
-            if (window.testRunner)
-                testRunner.dumpAsText();
-        </script>
+        <script src="../../resources/js-test.js"></script>
     </head>
     <body id="body">
         <a id="link1" href="img.html" title="title text"><img src="404.png" alt="alt text" title="title text"></a>
diff --git a/LayoutTests/accessibility/win/list-item-role.html b/LayoutTests/accessibility/win/list-item-role.html
index 2d73fe4..5810b74 100644
--- a/LayoutTests/accessibility/win/list-item-role.html
+++ b/LayoutTests/accessibility/win/list-item-role.html
@@ -1,11 +1,6 @@
 <html>
     <head>
-        <script src="../../resources/js-test-pre.js"></script>
-
-        <script>
-            if (window.testRunner)
-                testRunner.dumpAsText();
-        </script>
+        <script src="../../resources/js-test.js"></script>
     </head>
     <body id="body">
         <p>
diff --git a/LayoutTests/accessibility/win/list-marker-role.html b/LayoutTests/accessibility/win/list-marker-role.html
index 34fc941..258da79 100644
--- a/LayoutTests/accessibility/win/list-marker-role.html
+++ b/LayoutTests/accessibility/win/list-marker-role.html
@@ -1,11 +1,6 @@
 <html>
     <head>
-        <script src="../../resources/js-test-pre.js"></script>
-
-        <script>
-            if (window.testRunner)
-                testRunner.dumpAsText();
-        </script>
+        <script src="../../resources/js-test.js"></script>
     </head>
     <body id="body">
         <p>
diff --git a/LayoutTests/accessibility/win/list-role.html b/LayoutTests/accessibility/win/list-role.html
index 37753f6..d7f57c4 100644
--- a/LayoutTests/accessibility/win/list-role.html
+++ b/LayoutTests/accessibility/win/list-role.html
@@ -1,11 +1,6 @@
 <html>
     <head>
-        <script src="../../resources/js-test-pre.js"></script>
-
-        <script>
-            if (window.testRunner)
-                testRunner.dumpAsText();
-        </script>
+        <script src="../../resources/js-test.js"></script>
     </head>
     <body id="body">
         <p>
diff --git a/LayoutTests/accessibility/win/multiple-select-element-role.html b/LayoutTests/accessibility/win/multiple-select-element-role.html
index b58e2ac..c059552 100644
--- a/LayoutTests/accessibility/win/multiple-select-element-role.html
+++ b/LayoutTests/accessibility/win/multiple-select-element-role.html
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../resources/js-test-pre.js"></script>
+    <script src="../../resources/js-test.js"></script>
 </head>
 
 <body id="body">
@@ -22,8 +22,6 @@
     if (window.testRunner && window.accessibilityController) {
         document.getElementById("notDRT").style.visibility = "hidden";
 
-        testRunner.dumpAsText();
-
         document.getElementById("selectElement").focus();
         shouldBe('accessibilityController.focusedElement.role', '"AXRole: AXList"');
         shouldBe('accessibilityController.focusedElement.childAtIndex(0).role', '"AXRole: AXStaticText"');
diff --git a/LayoutTests/accessibility/win/option-element-position-and-size.html b/LayoutTests/accessibility/win/option-element-position-and-size.html
index b2f7c2a..7275d96 100644
--- a/LayoutTests/accessibility/win/option-element-position-and-size.html
+++ b/LayoutTests/accessibility/win/option-element-position-and-size.html
@@ -1,7 +1,7 @@
 <html>
 
 <head>
-    <script src="../../resources/js-test-pre.js"></script>
+    <script src="../../resources/js-test.js"></script>
 </head>
 
 <body id="body">
@@ -20,8 +20,6 @@
     if (window.testRunner && window.accessibilityController) {
         document.getElementById("notDRT").style.visibility = "hidden";
 
-        testRunner.dumpAsText();
-
         document.getElementById("selectElement").focus();
 
         var optionElement = accessibilityController.focusedElement.childAtIndex(0);
diff --git a/LayoutTests/accessibility/win/parent-element.html b/LayoutTests/accessibility/win/parent-element.html
index 7b1f772..bad7259 100644
--- a/LayoutTests/accessibility/win/parent-element.html
+++ b/LayoutTests/accessibility/win/parent-element.html
@@ -1,7 +1,7 @@
 <html>
 
 <head>
-    <script src="../../resources/js-test-pre.js"></script>
+    <script src="../../resources/js-test.js"></script>
 </head>
 
 <body id="body">
@@ -20,8 +20,6 @@
     if (window.testRunner && window.accessibilityController) {
         document.getElementById("notDRT").style.visibility = "hidden";
 
-        testRunner.dumpAsText();
-
         document.getElementById("selectElement").focus();
 
         var optionElement = accessibilityController.focusedElement.childAtIndex(0);
diff --git a/LayoutTests/accessibility/win/select-element-role.html b/LayoutTests/accessibility/win/select-element-role.html
index a946f19..f170e49 100644
--- a/LayoutTests/accessibility/win/select-element-role.html
+++ b/LayoutTests/accessibility/win/select-element-role.html
@@ -1,7 +1,7 @@
 <html>
 
 <head>
-    <script src="../../resources/js-test-pre.js"></script>
+    <script src="../../resources/js-test.js"></script>
 </head>
 
 <body id="body">
@@ -20,8 +20,6 @@
     if (window.testRunner && window.accessibilityController) {
         document.getElementById("notDRT").style.visibility = "hidden";
 
-        testRunner.dumpAsText();
-
         document.getElementById("selectElement").focus();
 
         shouldBe('accessibilityController.focusedElement.role', '"AXRole: AXComboBox"');
diff --git a/LayoutTests/accessibility/win/selection-and-focus.html b/LayoutTests/accessibility/win/selection-and-focus.html
index ff31d11..89e1c68 100644
--- a/LayoutTests/accessibility/win/selection-and-focus.html
+++ b/LayoutTests/accessibility/win/selection-and-focus.html
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../resources/js-test-pre.js"></script>
+    <script src="../../resources/js-test.js"></script>
 </head>
 
 <body>
@@ -37,8 +37,6 @@
     if (window.testRunner && window.accessibilityController) {
         document.getElementById("notDRT").style.visibility = "hidden";
 
-        testRunner.dumpAsText();
-        
         document.body.focus();
         shouldBe('accessibilityController.focusedElement.role', '"document"');
 
diff --git a/LayoutTests/accessibility/win/single-select-children-changed.html b/LayoutTests/accessibility/win/single-select-children-changed.html
index 0aaf1bd..2ac1599 100644
--- a/LayoutTests/accessibility/win/single-select-children-changed.html
+++ b/LayoutTests/accessibility/win/single-select-children-changed.html
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../resources/js-test-pre.js"></script>
+    <script src="../../resources/js-test.js"></script>
 </head>
 
 <body id="body">
@@ -19,8 +19,6 @@
     if (window.testRunner && window.accessibilityController) {
         document.getElementById("notDRT").style.visibility = "hidden";
 
-        testRunner.dumpAsText();
-
         document.getElementById("selectElement").focus();
         var selectElement = accessibilityController.focusedElement;
         var list = accessibilityController.focusedElement.childAtIndex(0);
diff --git a/LayoutTests/accessibility/win/single-select-children.html b/LayoutTests/accessibility/win/single-select-children.html
index 04e8c6b..8d175c8 100644
--- a/LayoutTests/accessibility/win/single-select-children.html
+++ b/LayoutTests/accessibility/win/single-select-children.html
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../resources/js-test-pre.js"></script>
+    <script src="../../resources/js-test.js"></script>
 </head>
 
 <body id="body">
@@ -39,8 +39,6 @@
     if (window.testRunner && window.accessibilityController) {
         document.getElementById("notDRT").style.visibility = "hidden";
 
-        testRunner.dumpAsText();
-
         document.getElementById("selectElement").focus();
         var selectElement = accessibilityController.focusedElement;
         shouldBe('selectElement.role', '"AXRole: combo box"');
diff --git a/LayoutTests/accessibility/win/text-role.html b/LayoutTests/accessibility/win/text-role.html
index 2245cf8..724ab7a 100644
--- a/LayoutTests/accessibility/win/text-role.html
+++ b/LayoutTests/accessibility/win/text-role.html
@@ -1,11 +1,6 @@
 <html>
     <head>
-        <script src="../../resources/js-test-pre.js"></script>
-
-        <script>
-            if (window.testRunner)
-                testRunner.dumpAsText();
-        </script>
+        <script src="../../resources/js-test.js"></script>
     </head>
     <body id="body">
         <p>
diff --git a/LayoutTests/platform/mac-wk1/accessibility/loading-iframe-updates-axtree-expected.txt b/LayoutTests/platform/mac-wk1/accessibility/loading-iframe-updates-axtree-expected.txt
index 087f2d0..50aaa02 100644
--- a/LayoutTests/platform/mac-wk1/accessibility/loading-iframe-updates-axtree-expected.txt
+++ b/LayoutTests/platform/mac-wk1/accessibility/loading-iframe-updates-axtree-expected.txt
@@ -14,6 +14,7 @@
 scrollarea.isEqual(newScrollarea): true
 subwebarea.isEqual(newSubwebarea): false
 PASS newSubwebarea.childrenCount > 0 is true
+PASS successfullyParsed is true
 
 TEST COMPLETE
 
diff --git a/LayoutTests/platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt b/LayoutTests/platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt
index 3d4e954..e81d0c8 100644
--- a/LayoutTests/platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt
+++ b/LayoutTests/platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt
@@ -40,6 +40,7 @@
 PASS body.isEqual(newBody) is true
 PASS before.isEqual(newBefore) is true
 PASS after.isEqual(newAfter) is true
+PASS successfullyParsed is true
 
 TEST COMPLETE
 
diff --git a/LayoutTests/platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt b/LayoutTests/platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt
index 74db9dd..94bce82 100644
--- a/LayoutTests/platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt
+++ b/LayoutTests/platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt
@@ -40,6 +40,7 @@
 PASS body.isEqual(newBody) is true
 PASS before.isEqual(newBefore) is true
 PASS after.isEqual(newAfter) is true
+PASS successfullyParsed is true
 
 TEST COMPLETE
 
diff --git a/LayoutTests/platform/mac/accessibility/media-element-expected.txt b/LayoutTests/platform/mac/accessibility/media-element-expected.txt
index 9cbd07b..7f17b05 100644
--- a/LayoutTests/platform/mac/accessibility/media-element-expected.txt
+++ b/LayoutTests/platform/mac/accessibility/media-element-expected.txt
@@ -92,4 +92,7 @@
             role: AXRole: AXButton
 
 
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
diff --git a/LayoutTests/platform/mac/accessibility/table-cells-roles-expected.txt b/LayoutTests/platform/mac/accessibility/table-cells-roles-expected.txt
index 7387038..272d32a 100644
--- a/LayoutTests/platform/mac/accessibility/table-cells-roles-expected.txt
+++ b/LayoutTests/platform/mac/accessibility/table-cells-roles-expected.txt
@@ -25,4 +25,7 @@
 The table2 cell at (1,2) currently has role  AXRole: AXCell .
 The table2 cell at (2,3) currently has role  AXRole: AXCell .
 The table2 cell at (0,2) currently has role  AXRole: AXCell .
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
diff --git a/LayoutTests/platform/mac/accessibility/table-roles-hierarchy-expected.txt b/LayoutTests/platform/mac/accessibility/table-roles-hierarchy-expected.txt
index 57a492b..b636323 100644
--- a/LayoutTests/platform/mac/accessibility/table-roles-hierarchy-expected.txt
+++ b/LayoutTests/platform/mac/accessibility/table-roles-hierarchy-expected.txt
@@ -83,4 +83,7 @@
             role: AXRole: AXStaticText
         role: AXRole: AXCell
             role: AXRole: AXStaticText
+PASS successfullyParsed is true
+
+TEST COMPLETE