Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / http / tests / security / dataURL / xss-DENIED-to-data-url-in-foreign-domain-window-open.html
index dd8e320..03914ce 100644 (file)
                 testRunner.setCanOpenWindows();
             }
 
+            window.addEventListener('message', function ()
+            {
+                runTest();
+                closeWindowAndNotifyDone(openedWindow);
+            });
             openedWindow = window.open("http://localhost:8000/security/dataURL/resources/foreign-domain-data-url-accessee-opened-frame.html");
-
-            if (window.testRunner) {
-                setTimeout(pollForTest, 1);
-            } else {
-                log("To run the test, click the button below when the opened window finishes loading.");
-                var button = document.createElement("button");
-                button.appendChild(document.createTextNode("Run Test"));
-                button.onclick = runTest;
-                document.body.appendChild(button);
-            }
-        }
-
-        pollForTest = function()
-        {
-            if (!testRunner.globalFlag) {
-                setTimeout(pollForTest, 1);
-                return;
-            }
-            runTest();
-            closeWindowAndNotifyDone(openedWindow);
         }
 
         runTest = function()