Bug 1085246 - Make browser_fxa_login.js ignore the load for the placeholder tab in openFxASettings. r=gavin, r=Mossop, a=me
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Tue, 11 Nov 2014 21:05:44 +0100
changeset 226490 a926116946f8e108599e4d86196b0e7da7bc1644
parent 226489 c504dc2601d164d3c675b727e214cd003500d264
child 226491 adf81adf73a110726500d9ca1141c6cc423a2203
child 226519 e39d97f7f738373e6b185e2d925a232f5ebf7029
child 226530 7155bc4b9535c12dd76a3d59e20efeff6bd8073a
child 226543 2000edf1bb35568a463edbf94889c48574fbd092
child 226646 86d1aeaf40cf3f18ad8f9338d62bc423072019cd
push id53
push userdglastonbury@mozilla.com
push dateWed, 12 Nov 2014 02:04:58 +0000
reviewersgavin, Mossop, me
bugs1085246
milestone36.0a1
Bug 1085246 - Make browser_fxa_login.js ignore the load for the placeholder tab in openFxASettings. r=gavin, r=Mossop, a=me
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);