Trial fix for bug 886782
authorEhsan Akhgari <ehsan@mozilla.com>
Sat, 15 Mar 2014 17:52:58 -0400
changeset 190987 c41d3898b1c301c8ee698ba4563f848991ee5b57
parent 190986 c8c75db14c4ef7ab40df23e3c59bb028b0faf60c
child 190988 5eacab1442af0e56e63270d6b3df9a24a7f48c1d
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs886782
milestone30.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Trial fix for bug 886782
dom/plugins/test/mochitest/test_NPNVdocumentOrigin.html
--- a/dom/plugins/test/mochitest/test_NPNVdocumentOrigin.html
+++ b/dom/plugins/test/mochitest/test_NPNVdocumentOrigin.html
@@ -26,20 +26,22 @@
         ok(false, "Should throw when shadowing window.location.toString");
       }
       catch (e) {
         ok(true, "Should throw when shadowing window.location.toString");
       }
 
       // Create a plugin in a new window with about:blank
       var newWindow = window.open("about:blank");
-      newWindow.document.writeln('<embed id="plugin2" type="application/x-test" width="200" height="200"></embed>');
-      var p2 = newWindow.document.getElementById("plugin2");
-      is(p2.getNPNVdocumentOrigin(), realOrigin, "Checking for expected origin of plugin in new about:blank window.");
-      newWindow.close();
+      newWindow.onload = function() {
+        newWindow.document.writeln('<embed id="plugin2" type="application/x-test" width="200" height="200"></embed>');
+        var p2 = newWindow.document.getElementById("plugin2");
+        is(p2.getNPNVdocumentOrigin(), realOrigin, "Checking for expected origin of plugin in new about:blank window.");
+        newWindow.close();
 
-      SimpleTest.finish();
+        SimpleTest.finish();
+      };
     }
   </script>
 
   <embed id="plugin1" type="application/x-test" width="200" height="200"></embed>
 </body>
 </html>