Bug 1280128 - Follow-up: Fix a race in a test. r=bustage, a=test-only
☠☠ backed out by 91505c2a68fb ☠ ☠
authorKris Maglione <maglione.k@gmail.com>
Wed, 17 Aug 2016 18:36:55 -0700
changeset 340360 a7ef4e7277b4f9d3a1fdf96a5c62c07745c06e73
parent 340359 9883ff68061893273b9d768dd1d90cf25c23c226
child 340361 18420a62cca834f2bbb4786e2c2194826885f62a
push id6313
push userryanvm@gmail.com
push dateThu, 18 Aug 2016 01:58:39 +0000
treeherdermozilla-beta@6b44534d8e74 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage, test-only
bugs1280128
milestone49.0
Bug 1280128 - Follow-up: Fix a race in a test. r=bustage, a=test-only MozReview-Commit-ID: 9caxFM6L91S
browser/components/extensions/test/browser/browser_ext_popup_corners.js
--- a/browser/components/extensions/test/browser/browser_ext_popup_corners.js
+++ b/browser/components/extensions/test/browser/browser_ext_popup_corners.js
@@ -2,16 +2,20 @@
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
 function* awaitPanel(extension, win = window) {
   let {target} = yield BrowserTestUtils.waitForEvent(win.document, "load", true, (event) => {
     return event.target.location && event.target.location.href.endsWith("popup.html");
   });
 
+  // Wait for the browser resize code, which is triggered asynchronously by the
+  // load event, to run.
+  yield new Promise(resolve => setTimeout(resolve, 10));
+
   return target.defaultView
                .QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDocShell)
                .chromeEventHandler;
 }
 
 add_task(function* testPopupBorderRadius() {
   let extension = ExtensionTestUtils.loadExtension({
     background() {