Bug 1287007 - Fix timing issue in browser_ext_tabs_onUpdated.js draft
authorRob Wu <rob@robwu.nl>
Sat, 01 Oct 2016 01:07:22 +0200
changeset 428451 b0e4dc4ba30a4be964fbcbe9ca00ca72f4fe136f
parent 428450 462145038d13e128d10a8d1b4c73c6967916745a
child 428452 100d147b27929695f5d24ed36798fa7b3e443ae7
push id33305
push userbmo:rob@robwu.nl
push dateSun, 23 Oct 2016 20:56:25 +0000
bugs1287007
milestone52.0a1
Bug 1287007 - Fix timing issue in browser_ext_tabs_onUpdated.js Reload about:blank tab after opening it and registering the `tabs.onUpdated` event. This is needed because about:blank loads very fast, before the callback of `tabs.create` is invoked. This effect is amplified by the fact that the APIs are now proxied. MozReview-Commit-ID: DgPtIqHSUDx
browser/components/extensions/test/browser/browser_ext_tabs_onUpdated.js
--- a/browser/components/extensions/test/browser/browser_ext_tabs_onUpdated.js
+++ b/browser/components/extensions/test/browser/browser_ext_tabs_onUpdated.js
@@ -185,13 +185,14 @@ add_task(function* test_without_tabs_per
 
           if (changeInfo.status == "complete") {
             browser.tabs.onUpdated.removeListener(onUpdated);
             browser.tabs.remove(tabId);
             browser.test.notifyPass("finish");
           }
         }
       });
+      browser.tabs.reload(tab.id);
     });
   }, false /* withPermissions */);
 });
 
 add_task(forceGC);