Bug 1246035: Add support for _execute_page_action r=kmag
authorMatthew Wein <mwein@mozilla.com>
Mon, 28 Mar 2016 12:14:43 -0700
changeset 290714 a66e1fb0320678f5d2acb2b8712a4133104d4b45
parent 290713 6735565943d34747d8219d3b3b7b30003e7cb265
child 290715 f40c52c4b8005e98065133bf4baaa33b5ca62084
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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();
 });