Bug 1287007 - Fix timing issue in browser_ext_tabs_onUpdated.js r=billm
authorRob Wu <rob@robwu.nl>
Sat, 01 Oct 2016 01:07:22 +0200
changeset 428730 3915db2d27b13a14d1647ceb5370d6cbc04582e5
parent 428729 e6a612e71387531f50d8fab977f3c6151cf2f561
child 428731 424e3fa0b282b076767bbf13d61db59f1b03acae
push id33405
push userbcampen@mozilla.com
push dateMon, 24 Oct 2016 15:32:53 +0000
reviewersbillm
bugs1287007
milestone52.0a1
Bug 1287007 - Fix timing issue in browser_ext_tabs_onUpdated.js r=billm 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);