Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / http / tests / security / javascriptURL / xss-DENIED-from-javascript-url-in-foreign-domain-window-open.html
index 8d37b40..ea34075 100644 (file)
 
             openedWindow = window.open("http://localhost:8000/security/javascriptURL/resources/foreign-domain-javascript-url-accessor-opened-frame.html");
 
-            if (window.testRunner) {
-                setTimeout(pollUntilDone, 1);
-            }
-        }
-
-        pollUntilDone = function()
-        {
-            if (!testRunner.globalFlag) {
-                setTimeout(pollUntilDone, 1);
-                return;
-            }
-            closeWindowAndNotifyDone(openedWindow);
+            window.addEventListener('message', function ()
+            {
+                closeWindowAndNotifyDone(openedWindow);
+            });
         }
     </script>
 </head>