Clean up asynchronous behavior in some accessibility tests
[WebKit-https.git] / LayoutTests / accessibility / mac / selection-sync.html
index e932b23..acb7e0c 100644 (file)
                 shouldBe("results[resultIndex][\"AXTextStateSync\"]", "true");
 
                 webArea.removeNotificationListener();
-                window.testRunner.notifyDone();
+                finishJSTest();
             }
         }
     }
 
     if (window.accessibilityController) {
-        window.testRunner.waitUntilDone();
+        window.jsTestIsAsync = true;
 
         accessibilityController.enableEnhancedAccessibility(true);
 
         var extendRange = axTextbox.textMarkerRangeForMarkers(markerThree, markerFour);
         webArea.setSelectedVisibleTextRange(moveRange);
         webArea.setSelectedVisibleTextRange(extendRange);
-    }
+    } else
+        debug("window.accessibilityController is not present");
 
 </script>
-
 <script src="../../resources/js-test-post.js"></script>
 </body>
 </html>