Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / http / tests / xmlhttprequest / reentrant-cancel.html
index 2916ae6..3b3f976 100644 (file)
@@ -2,8 +2,10 @@
 <html>
 <body>
 <script>
-if (window.testRunner)
+if (window.testRunner) {
     testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
 
 function log(str)
 {
@@ -23,6 +25,12 @@ var xhr = new XMLHttpRequest;
 function sendXHR()
 {
     xhr.open("GET", "", true);
+    xhr.onreadystatechange = function() {
+        if (xhr.readyState != 4)
+            return;
+        if (window.testRunner)
+            testRunner.notifyDone();
+    };
     xhr.send();
 }
 window.addEventListener("DOMSubtreeModified", sendXHR);