Bug 1085246 - Make browser_fxa_login.js ignore the load for the placeholder tab in openFxASettings. r=gavin, r=Mossop, a=test-only
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Tue, 11 Nov 2014 21:05:44 +0100
changeset 235157 51c3820c230142beed8231a4b0aa4fe9e9355dbb
parent 235156 838f62a0fd9dbd07e8c569c9571dbf536c38a374
child 235158 0fd1e6794f2e3a8cc69c4055fc8e73925cbea6e0
push id611
push userraliiev@mozilla.com
push dateMon, 05 Jan 2015 23:23:16 +0000
treeherdermozilla-release@345cd3b9c445 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin, Mossop, test-only
bugs1085246
milestone35.0a2
Bug 1085246 - Make browser_fxa_login.js ignore the load for the placeholder tab in openFxASettings. r=gavin, r=Mossop, a=test-only
browser/components/loop/test/mochitest/browser_fxa_login.js
--- a/browser/components/loop/test/mochitest/browser_fxa_login.js
+++ b/browser/components/loop/test/mochitest/browser_fxa_login.js
@@ -416,16 +416,20 @@ add_task(function* openFxASettings() {
     state: "state",
     test_error: "token_401",
   };
   yield promiseOAuthParamsSetup(BASE_URL, params);
 
   yield new Promise((resolve, reject) => {
     let progressListener = {
       onLocationChange: function onLocationChange(aBrowser) {
+        if (aBrowser.currentURI.spec == BASE_URL) {
+          // Ignore the changes from the addTab above.
+          return;
+        }
         gBrowser.removeTabsProgressListener(progressListener);
         let contentURI = Services.io.newURI(params.content_uri, null, null);
         is(aBrowser.currentURI.spec, Services.io.newURI("/settings", null, contentURI).spec,
            "Check settings tab URL");
         resolve();
       },
     };
     gBrowser.addTabsProgressListener(progressListener);