Bug 1398739 - Fix Activity Stream related test failure in browser_google_behavior.js. r=Mardak
authorAndrei Oprea <andrei.br92@gmail.com>
Mon, 11 Sep 2017 15:08:24 +0300
changeset 429630 105783286166ddc04ce65c66bcd2f97e2d5b4748
parent 429629 f3342ea446a53bcc0957e4eca50906a4b684d710
child 429631 ab339292ac6b767d2fc7ac4c7de651fb99b0c420
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMardak
bugs1398739
milestone57.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 1398739 - Fix Activity Stream related test failure in browser_google_behavior.js. r=Mardak MozReview-Commit-ID: FjPE8gWWkqe
browser/components/search/test/browser_google_behavior.js
--- a/browser/components/search/test/browser_google_behavior.js
+++ b/browser/components/search/test/browser_google_behavior.js
@@ -51,16 +51,23 @@ function promiseStateChangeURI() {
 
     gBrowser.addProgressListener(listener);
   });
 }
 
 function promiseContentSearchReady(browser) {
   return ContentTask.spawn(browser, {}, async function(args) {
     return new Promise(resolve => {
+      if (content.wrappedJSObject.gContentSearchController) {
+        let searchController = content.wrappedJSObject.gContentSearchController;
+        if (searchController.defaultEngine) {
+          resolve();
+        }
+      }
+
       content.addEventListener("ContentSearchService", function listener(aEvent) {
         if (aEvent.detail.type == "State") {
           content.removeEventListener("ContentSearchService", listener);
           resolve();
         }
       });
     });
   });