Bug 1202171 - Wait for focus after opening the window
authorEhsan Akhgari <ehsan@mozilla.com>
Sat, 12 Sep 2015 23:22:40 -0400
changeset 294836 586eaa0104b4e85cd76481068a85a31bc5ce1b01
parent 294835 01fa417ff4e9da1a03b3360288d7eb0dcc51c710
child 294837 f6b6f8fcb039fa15eed8bdff6b9adf7ecba7a13a
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1202171
milestone43.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
Bug 1202171 - Wait for focus after opening the window
browser/components/search/test/browser_private_search_perwindowpb.js
--- a/browser/components/search/test/browser_private_search_perwindowpb.js
+++ b/browser/components/search/test/browser_private_search_perwindowpb.js
@@ -52,17 +52,19 @@ function test() {
       }
     };
     Services.search.addEngine(engineURL + "426329.xml",
                               Ci.nsISearchEngine.DATA_XML,
                               "data:image/x-icon,%00", false, installCallback);
   }
 
   function testOnWindow(aIsPrivate, aCallback) {
-    let win = whenNewWindowLoaded({ private: aIsPrivate }, aCallback);
+    let win = whenNewWindowLoaded({ private: aIsPrivate }, function() {
+      waitForFocus(aCallback, win);
+    });
     windowsToClose.push(win);
   }
 
   addEngine(function() {
     testOnWindow(false, function(win) {
       performSearch(win, false, function() {
         testOnWindow(true, function(win) {
           performSearch(win, true, function() {