Bug 1312392: Fix a timing regression in popup sizing tests. r=trivial a=test-only
authorKris Maglione <maglione.k@gmail.com>
Mon, 14 Nov 2016 17:15:45 -0800
changeset 440005 d32b3458265589c2e9bc2f9413b5a3256a6f9ea3
parent 440004 aeb8bcaafe56ee681cf19a13398cd14d163af6ca
child 440006 401aa89aeb11b0cb29419438bfc4d27061c3c3e7
push id36143
push userjkingston@mozilla.com
push dateWed, 16 Nov 2016 22:20:38 +0000
reviewerstrivial, test-only
bugs1312392
milestone52.0a2
Bug 1312392: Fix a timing regression in popup sizing tests. r=trivial a=test-only MozReview-Commit-ID: EDkPfxCN8BE
browser/components/extensions/test/browser/browser_ext_browserAction_popup_resize.js
--- a/browser/components/extensions/test/browser/browser_ext_browserAction_popup_resize.js
+++ b/browser/components/extensions/test/browser/browser_ext_browserAction_popup_resize.js
@@ -1,16 +1,16 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
-function* openPanel(extension, win = window) {
+function* openPanel(extension, win = window, awaitLoad = false) {
   clickBrowserAction(extension, win);
 
-  return yield awaitExtensionPanel(extension, win, false);
+  return yield awaitExtensionPanel(extension, win, awaitLoad);
 }
 
 add_task(function* testBrowserActionPopupResize() {
   let extension = ExtensionTestUtils.loadExtension({
     manifest: {
       "browser_action": {
         "default_popup": "popup.html",
         "browser_style": true,
@@ -108,17 +108,17 @@ function* testPopupSize(standardsMode, b
   });
 
   yield extension.startup();
 
   /* eslint-disable mozilla/no-cpows-in-tests */
 
   if (arrowSide == "top") {
     // Test the standalone panel for a toolbar button.
-    let browser = yield openPanel(extension, browserWin);
+    let browser = yield openPanel(extension, browserWin, true);
 
     let dims = yield promiseContentDimensions(browser);
 
     is(dims.isStandards, standardsMode, "Document has the expected compat mode");
 
     let {innerWidth, innerHeight} = dims.window;
 
     dims = yield alterContent(browser, () => {