Bug 1454627 - Re-enable browser_ext_user_events.js (bug 1381305). r=mixedpuppy, a=test-only
authorRob Wu <rob@robwu.nl>
Fri, 27 Jul 2018 18:52:21 +0200
changeset 480811 30a17d2d7779b6e32b5e9bb4d013a8cfa1934f14
parent 480810 75b021eb6f7f70e03aaa571c78c9e8a0502de821
child 480812 5c573fbddd4b2b5dc6d3812b24685c989e2fc85d
push id1757
push userffxbld-merge
push dateFri, 24 Aug 2018 17:02:43 +0000
treeherdermozilla-release@736023aebdb1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmixedpuppy, test-only
bugs1454627, 1381305
milestone62.0
Bug 1454627 - Re-enable browser_ext_user_events.js (bug 1381305). r=mixedpuppy, a=test-only Re-enable the test that was disabled in bug 1381305 and fix the underlying issue that caused th intermittent failure in the first place. MozReview-Commit-ID: BL9wS2fogaf
browser/components/extensions/test/browser/browser-common.ini
browser/components/extensions/test/browser/browser_ext_user_events.js
--- a/browser/components/extensions/test/browser/browser-common.ini
+++ b/browser/components/extensions/test/browser/browser-common.ini
@@ -201,17 +201,16 @@ skip-if = os == 'mac' # Save as PDF not 
 [browser_ext_tabs_cookieStoreId.js]
 [browser_ext_tabs_update.js]
 [browser_ext_tabs_zoom.js]
 [browser_ext_tabs_update_url.js]
 [browser_ext_themes_icons.js]
 [browser_ext_themes_validation.js]
 [browser_ext_url_overrides_newtab.js]
 [browser_ext_user_events.js]
-skip-if = debug || os == "linux" #Bug 1381305
 [browser_ext_webRequest.js]
 [browser_ext_webNavigation_frameId0.js]
 [browser_ext_webNavigation_getFrames.js]
 [browser_ext_webNavigation_onCreatedNavigationTarget.js]
 [browser_ext_webNavigation_onCreatedNavigationTarget_contextmenu.js]
 [browser_ext_webNavigation_onCreatedNavigationTarget_named_window.js]
 [browser_ext_webNavigation_onCreatedNavigationTarget_subframe_window_open.js]
 [browser_ext_webNavigation_onCreatedNavigationTarget_window_open.js]
--- a/browser/components/extensions/test/browser/browser_ext_user_events.js
+++ b/browser/components/extensions/test/browser/browser_ext_user_events.js
@@ -42,31 +42,31 @@ add_task(async function testSources() {
         }
       }
 
       let tabs = await browser.tabs.query({active: true, currentWindow: true});
       await browser.pageAction.show(tabs[0].id);
 
       browser.pageAction.onClicked.addListener(() => request("bookmarks"));
       browser.browserAction.onClicked.addListener(() => request("tabs"));
-
-      browser.contextMenus.create({
-        id: "menu",
-        title: "test user events",
-        contexts: ["page"],
-      });
       browser.contextMenus.onClicked.addListener(() => request("webNavigation"));
 
       browser.test.onMessage.addListener(msg => {
         if (msg === "openOptionsPage") {
           browser.runtime.openOptionsPage();
         }
       });
 
-      browser.test.sendMessage("actions-ready");
+      browser.contextMenus.create({
+        id: "menu",
+        title: "test user events",
+        contexts: ["page"],
+      }, () => {
+        browser.test.sendMessage("actions-ready");
+      });
     },
 
     files: {
       "options.html": `<!DOCTYPE html>
         <html lang="en">
         <head>
           <meta charset="UTF-8">
           <script src="options.js"></script>