Bug 1239566 - Get rid of CPOW in browser_webconsole_view_source.js. r=linclark
authorBrian Grinstead <bgrinstead@mozilla.com>
Wed, 13 Apr 2016 07:04:26 -0700
changeset 331034 67ac22444604d2e8f8f6681c502eca7b2cc5ff6c
parent 330962 52ebea10c080da799bc43150e261e043ba824f5b
child 331035 6ae9a0d3be52310fc89f8db171553ec95497d3dd
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslinclark
bugs1239566
milestone48.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 1239566 - Get rid of CPOW in browser_webconsole_view_source.js. r=linclark 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
@@ -11,25 +11,28 @@
 const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
                  "test/test-error.html";
 
 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 [result] = yield waitForMessages({
     webconsole: hud,
     messages: [{
       text: "fooBazBaz is not defined",
       category: CATEGORY_JS,
       severity: SEVERITY_ERROR,
     }],