Bug 1254814 - Synthesize the key to inspect the element in the right process; r=testonly
authorPatrick Brosset <pbrosset@mozilla.com>
Mon, 11 Jul 2016 15:19:46 +0200
changeset 304904 845645460806f28a8f249c5d3c60f07b46cef63c
parent 304774 016e4fdb5a52374d139e3553fc564a7ae0f9ea74
child 304905 98e51699f47e171256a8eb54605bed04a0be5e71
push id30446
push usercbook@mozilla.com
push dateThu, 14 Jul 2016 09:44:34 +0000
treeherdermozilla-central@cd9da00ffcc3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1254814
milestone50.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 1254814 - Synthesize the key to inspect the element in the right process; r=testonly In browser_markup_load_01.js, the browser context menu is opened and then the Q key is pressed in order to choose the "inspect" menu item. However this key is simulated in the content process, using the testActor. Since the menu itself lives in the parent process, the key event should instead be simulated in the parent process for it to work properly. I suspect that this was sometimes causing the menu to stay open in subsequent tests. MozReview-Commit-ID: 1cOF7CSk7sm
devtools/client/inspector/markup/test/browser_markup_load_01.js
--- a/devtools/client/inspector/markup/test/browser_markup_load_01.js
+++ b/devtools/client/inspector/markup/test/browser_markup_load_01.js
@@ -53,17 +53,17 @@ add_task(function* () {
 });
 
 function* chooseWithInspectElementContextMenu(selector, testActor) {
   yield BrowserTestUtils.synthesizeMouseAtCenter(selector, {
     type: "contextmenu",
     button: 2
   }, gBrowser.selectedBrowser);
 
-  yield testActor.synthesizeKey({key: "Q", options: {}});
+  yield EventUtils.synthesizeKey("Q", {});
 }
 
 function waitForLinkedBrowserEvent(tab, event) {
   let def = defer();
   tab.linkedBrowser.addEventListener(event, function cb() {
     tab.linkedBrowser.removeEventListener(event, cb, true);
     def.resolve();
   }, true);