- if (window.testRunner) {
- setTimeout(pollUntilDone, 1);
- }
- }
-
- pollUntilDone = function()
- {
- if (!testRunner.globalFlag) {
- setTimeout(pollUntilDone, 1);
- return;
- }
- closeWindowAndNotifyDone(openedWindow);
+ window.addEventListener('message', function ()
+ {
+ closeWindowAndNotifyDone(openedWindow);
+ });