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
--- 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"),