Bug 1321182 - Register click handler before starting click test in browser_ext_contextMenus.js r=mixedpuppy
authorRob Wu <rob@robwu.nl>
Fri, 20 Jul 2018 17:43:42 +0200
changeset 427486 69529e9693b081a458261f38c1c433d84970a2a5
parent 427485 8b31d456f8cb28f3aa7adefabcaa1d5cb340d59b
child 427487 9649aefe9a6b245c04206080d2338e7b92da6cdf
push id34306
push usercsabou@mozilla.com
push dateFri, 20 Jul 2018 21:41:18 +0000
treeherdermozilla-central@d6a5e8aea651 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmixedpuppy
bugs1321182
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1321182 - Register click handler before starting click test in browser_ext_contextMenus.js r=mixedpuppy MozReview-Commit-ID: FkOjNm7Tgd5
browser/components/extensions/test/browser/browser_ext_contextMenus.js
--- a/browser/components/extensions/test/browser/browser_ext_contextMenus.js
+++ b/browser/components/extensions/test/browser/browser_ext_contextMenus.js
@@ -529,27 +529,27 @@ add_task(async function test_bookmark_co
         url,
         title,
         parentId: "toolbar_____",
       });
       await browser.contextMenus.create({
         title: "Get bookmark",
         contexts: ["bookmark"],
       });
-      browser.test.sendMessage("bookmark-created");
       browser.contextMenus.onClicked.addListener(async (info) => {
         browser.test.assertEq(newBookmark.id, info.bookmarkId, "Bookmark ID matches");
 
         let [bookmark] = await browser.bookmarks.get(info.bookmarkId);
         browser.test.assertEq(title, bookmark.title, "Bookmark title matches");
         browser.test.assertEq(url, bookmark.url, "Bookmark url matches");
         browser.test.assertFalse(info.hasOwnProperty("pageUrl"), "Context menu does not expose pageUrl");
         await browser.bookmarks.remove(info.bookmarkId);
         browser.test.sendMessage("test-finish");
       });
+      browser.test.sendMessage("bookmark-created");
     },
   });
   await extension.startup();
   await extension.awaitMessage("bookmark-created");
   let menu = await openChromeContextMenu(
     "placesContext",
     "#PersonalToolbar .bookmark-item:last-child");