Bug 1246035: Add support for _execute_page_action r=kmag
authorMatthew Wein <mwein@mozilla.com>
Mon, 28 Mar 2016 12:14:43 -0700
changeset 345309 a66e1fb0320678f5d2acb2b8712a4133104d4b45
parent 345284 6735565943d34747d8219d3b3b7b30003e7cb265
child 345349 f40c52c4b8005e98065133bf4baaa33b5ca62084
child 345594 bb29577a60ef31e6a9727bf225da812851bc8c89
push id14042
push usermwein@mozilla.com
push dateMon, 28 Mar 2016 19:33:12 +0000
reviewerskmag
bugs1246035
milestone48.0a1
Bug 1246035: Add support for _execute_page_action r=kmag MozReview-Commit-ID: 5Lvj5UiAVkJ
browser/components/extensions/test/browser/browser_ext_commands_execute_page_action.js
--- a/browser/components/extensions/test/browser/browser_ext_commands_execute_page_action.js
+++ b/browser/components/extensions/test/browser/browser_ext_commands_execute_page_action.js
@@ -43,23 +43,22 @@ add_task(function* test_execute_page_act
         browser.test.assertTrue(isShown, "The onClicked event should fire if the page action is shown.");
         browser.test.notifyPass("page-action-without-popup");
       });
 
       browser.test.sendMessage("send-keys");
     },
   });
 
-  yield extension.startup();
-
   extension.onMessage("send-keys", () => {
     EventUtils.synthesizeKey("j", {altKey: true, shiftKey: true});
     EventUtils.synthesizeKey("3", {altKey: true, shiftKey: true});
   });
 
+  yield extension.startup();
   yield extension.awaitFinish("page-action-without-popup");
   yield extension.unload();
 });
 
 add_task(function* test_execute_page_action_with_popup() {
   let scriptPage = url => `<html><head><meta charset="utf-8"><script src="${url}"></script></head><body>Test Popup</body></html>`;
 
   let extension = ExtensionTestUtils.loadExtension({
@@ -118,18 +117,17 @@ add_task(function* test_execute_page_act
         browser.test.assertTrue(isShown, "The onClicked event should fire if the page action is shown.");
         browser.test.notifyPass("page-action-with-popup");
       });
 
       browser.test.sendMessage("send-keys");
     },
   });
 
-  yield extension.startup();
-
   extension.onMessage("send-keys", () => {
     EventUtils.synthesizeKey("j", {altKey: true, shiftKey: true});
     EventUtils.synthesizeKey("3", {altKey: true, shiftKey: true});
   });
 
+  yield extension.startup();
   yield extension.awaitFinish("page-action-with-popup");
   yield extension.unload();
 });