Attempt to fix orange in bug 772823
authorGavin Sharp <gavin@gavinsharp.com>
Wed, 21 Nov 2012 13:29:17 -0800
changeset 113936 8b530f1d172688713871d512d14ecd2ff197f3cc
parent 113935 4894a33a8ec3b8179ce68c637f9a14bbd61996a8
child 113937 2fe6082b7361d6ad15e5195610e841cc8a98e3fa
push id18461
push usergsharp@mozilla.com
push dateWed, 21 Nov 2012 21:40:31 +0000
treeherdermozilla-inbound@8b530f1d1726 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs772823
milestone20.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
Attempt to fix orange in bug 772823
docshell/test/chrome/mozFrameType_window.xul
docshell/test/chrome/test_mozFrameType.xul
--- a/docshell/test/chrome/mozFrameType_window.xul
+++ b/docshell/test/chrome/mozFrameType_window.xul
@@ -27,28 +27,28 @@
       var normalFrame = document.getElementById("normalFrame");
       var typeContentFrame = document.getElementById("typeContentFrame");
 
       SimpleTest.is(getDocShellType(normalFrame), Ci.nsIDocShellTreeItem.typeChrome,
                     "normal iframe in chrome document is typeChrome");
       SimpleTest.is(getDocShellType(typeContentFrame), Ci.nsIDocShellTreeItem.typeContent,
                     "iframe with mozFrameType='content' in chrome document is typeContent");
 
-      // Wait for the window to be closed before finishing the test
-      let ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
-                   .getService(Components.interfaces.nsIWindowWatcher);
-      ww.registerNotification(function windowObs(subject, topic, data) {
-        if (topic == "domwindowclosed") {
-          ww.unregisterNotification(windowObs);
+      SimpleTest.executeSoon(function () {
+        // Wait for the window to be closed before finishing the test
+        let ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
+                     .getService(Components.interfaces.nsIWindowWatcher);
+        ww.registerNotification(function windowObs(subject, topic, data) {
+          if (topic == "domwindowclosed") {
+            ww.unregisterNotification(windowObs);
 
-          SimpleTest.executeSoon(function () {
             SimpleTest.waitForFocus(function() {
               SimpleTest.finish();
             }, opener);
-          });
-        }
+          }
+        });
+
+        window.close();
       });
-
-      window.close();
     }
   ]]></script>
 </window>
 
--- a/docshell/test/chrome/test_mozFrameType.xul
+++ b/docshell/test/chrome/test_mozFrameType.xul
@@ -25,15 +25,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 </body>
 
 <script class="testbody" type="application/javascript">
 <![CDATA[
 
 /** Test for Bug 769771 **/
 SimpleTest.waitForExplicitFinish();
 
-window.open("mozFrameType_window.xul", "mozFrameType",
-            "chrome,width=600,height=600");
+addLoadEvent(function () {
+  window.open("mozFrameType_window.xul", "mozFrameType",
+              "chrome,width=600,height=600");
+});
 
 ]]>
 </script>
 
 </window>