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-subframe.html
index 0d6a9be..53dfb4c 100644 (file)
                 testRunner.waitUntilDone();
             }
 
-            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();
-            testRunner.notifyDone();
+            window.addEventListener('message', function ()
+            {
+                runTest();
+                testRunner.notifyDone();
+            });
         }
 
         runTest = function()