Bug 1239566 - Get rid of CPOW in browser_webconsole_view_source.js. r=linclark, a=test-only
authorBrian Grinstead <bgrinstead@mozilla.com>
Wed, 13 Apr 2016 07:04:26 -0700
changeset 324143 eefaf5e207f01443d61a15b6d22a01979fbfeda9
parent 324142 545c9eba8e7e45f547b43e26ed5af20a5d9e876a
child 324144 98da47b4d83c576ce17d189942d2655df5a36dc1
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslinclark, test-only
bugs1239566
milestone47.0a2
Bug 1239566 - Get rid of CPOW in browser_webconsole_view_source.js. r=linclark, a=test-only MozReview-Commit-ID: EQNXg7M9dZr
devtools/client/webconsole/test/browser_webconsole_view_source.js
--- a/devtools/client/webconsole/test/browser_webconsole_view_source.js
+++ b/devtools/client/webconsole/test/browser_webconsole_view_source.js
@@ -15,25 +15,28 @@ var getItemForAttachment;
 var Sources;
 var getItemInvoked = false;
 
 add_task(function*() {
   yield loadTab(TEST_URI);
   let hud = yield openConsole(null);
   info("console opened");
 
-  let button = content.document.querySelector("button");
-  ok(button, "we have the button on the page");
 
   // On e10s, the exception is triggered in child process
   // and is ignored by test harness
   if (!Services.appinfo.browserTabsRemoteAutostart) {
     expectUncaughtException();
   }
-  EventUtils.sendMouseEvent({ type: "click" }, button, content);
+
+  ContentTask.spawn(gBrowser.selectedBrowser, {}, function*() {
+    let button = content.document.querySelector("button");
+    ok(button, "we have the button on the page");
+    button.click();
+  });
 
   let { panelWin: { DebuggerView } } = yield openDebugger();
   info("debugger opened");
   Sources = DebuggerView.Sources;
   hud = yield openConsole();
   info("console opened again");
 
   let [result] = yield waitForMessages({