Bug 1469191 - Use the proper window for synthesizeMouseAtCenter in netmonitor test;r=jdescottes draft
authorBrian Grinstead <bgrinstead@mozilla.com>
Wed, 25 Jul 2018 09:39:48 -0700
changeset 822672 c769229d19661370d5448f0b5b236ce8b2eb91c4
parent 822648 4c4abe35d80851590954b52eabf828c763104696
push id117437
push userbgrinstead@mozilla.com
push dateWed, 25 Jul 2018 16:40:15 +0000
reviewersjdescottes
bugs1469191
milestone63.0a1
Bug 1469191 - Use the proper window for synthesizeMouseAtCenter in netmonitor test;r=jdescottes It was using `window` which refers to the browser window, but we actually want to synthesize the click in the devtools window. MozReview-Commit-ID: KeIwq3JIJin
devtools/client/netmonitor/test/browser_net_filter-autocomplete.js
--- a/devtools/client/netmonitor/test/browser_net_filter-autocomplete.js
+++ b/devtools/client/netmonitor/test/browser_net_filter-autocomplete.js
@@ -46,17 +46,17 @@ add_task(async function() {
   // Let the requests load completely before the autocomplete tests begin
   // as autocomplete values also rely on the network requests.
   const waitNetwork = waitForNetworkEvents(monitor, REQUESTS.length);
   loadFrameScriptUtils();
   await performRequestsInContent(REQUESTS);
   await waitNetwork;
 
   EventUtils.synthesizeMouseAtCenter(
-    document.querySelector(".devtools-filterinput"), {}, window);
+    document.querySelector(".devtools-filterinput"), {}, document.defaultView);
   // Empty Mouse click should keep autocomplete hidden
   ok(!document.querySelector(".devtools-autocomplete-popup"),
     "Autocomplete Popup still hidden");
 
   document.querySelector(".devtools-filterinput").focus();
   // Typing a char should invoke a autocomplete
   EventUtils.sendString("s");
   ok(document.querySelector(".devtools-autocomplete-popup"),