Bug 752335 - Part 2 - rework our window-waiting code for Mozmill's new windowMap. r+a=bustage-fix on CLOSED TREE.
authorMike Conley <mconley@mozilla.com>
Mon, 07 May 2012 09:33:06 -0400
changeset 10084 fda8b20e6b210020090636f2cca7eccb6adf75e6
parent 10083 dbfa7c06dbfb69510eed8f043f1b26783ddd3be9
child 10085 dd28c7a7d0302d785b4ed413db1f707d0ba41c77
push id7675
push usermconley@mozilla.com
push dateMon, 07 May 2012 13:33:21 +0000
treeherdercomm-central@fda8b20e6b21 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs752335
Bug 752335 - Part 2 - rework our window-waiting code for Mozmill's new windowMap. r+a=bustage-fix on CLOSED TREE.
mail/test/mozmill/shared-modules/test-window-helpers.js
--- a/mail/test/mozmill/shared-modules/test-window-helpers.js
+++ b/mail/test/mozmill/shared-modules/test-window-helpers.js
@@ -731,17 +731,20 @@ function _wait_for_generic_load(aDetails
   } catch (e if e instanceof utils.TimeoutError) {
     mark_failure(["Timeout waiting for content page to load. Current URL is:",
                   aDetails.currentURI.spec]);
   }
 
   // Lie to mozmill to convince it to not explode because these frames never
   // get a mozmillDocumentLoaded attribute (bug 666438).
   let contentWindow = aDetails.contentWindow;
-  contentWindow.mozmillDocumentLoaded = true;
+  let windowId = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
+                              .getInterface(Ci.nsIDOMWindowUtils)
+                              .outerWindowID;
+  controller.windowMap.update(windowId, "loaded", true);
   let cwc = new controller.MozMillController(contentWindow);
   return augment_controller(cwc);
 }
 
 
 let obsService = Cc["@mozilla.org/observer-service;1"]
                    .getService(Ci.nsIObserverService);
 let observationWaitFuncs = {};