Bug 1490092 - Clean opened tabs after Open request in tab test; r=Honza
authorTom Glowka <glowka.tom@gmail.com>
Wed, 10 Oct 2018 10:18:07 +0000
changeset 440451 baa2b88b3ed1cd04fbae4d7ec20124c4ee2b87e6
parent 440450 08d597127e937fbcb9f2929c6cd772ed93bfd7d9
child 440452 e9dfaf584e37774a7cfc24242ebb02c11539be97
push id70675
push userebalazs@mozilla.com
push dateWed, 10 Oct 2018 11:04:58 +0000
treeherderautoland@baa2b88b3ed1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersHonza
bugs1490092
milestone64.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 1490092 - Clean opened tabs after Open request in tab test; r=Honza Differential Revision: https://phabricator.services.mozilla.com/D5511
devtools/client/netmonitor/test/browser_net_open_request_in_tab.js
--- a/devtools/client/netmonitor/test/browser_net_open_request_in_tab.js
+++ b/devtools/client/netmonitor/test/browser_net_open_request_in_tab.js
@@ -21,32 +21,33 @@ add_task(async function() {
   // Post data may be fetched by the Header panel,
   // so set the Timings panel as the new default.
   store.getState().ui.detailsPanelSelectedTab = "timings";
 
   // Open GET request in new tab
   await performRequest("GET");
   newTab = await openLastRequestInTab();
   await checkTabResponse(newTab, "GET");
+  gBrowser.removeCurrentTab();
 
   // Open POST request in new tab
   await performRequest("POST", "application/x-www-form-urlencoded", "foo=bar&baz=42");
   newTab = await openLastRequestInTab();
   await checkTabResponse(newTab, "POST", "application/x-www-form-urlencoded",
     "foo=bar&amp;baz=42");
+  gBrowser.removeCurrentTab();
 
   // Open POST application/json request in new tab
   await performRequest("POST", "application/json", '{"foo":"bar"}');
   newTab = await openLastRequestInTab();
   await checkTabResponse(newTab, "POST", "application/json", '{"foo":"bar"}');
+  gBrowser.removeCurrentTab();
 
   await teardown(monitor);
 
-  gBrowser.removeCurrentTab();
-
   async function openLastRequestInTab() {
     const wait = waitForDOM(contextMenuDoc, "#request-list-context-newtab");
     const requestItems = document.querySelectorAll(".request-list-item");
     const lastRequest = requestItems[requestItems.length - 1];
     EventUtils.sendMouseEvent({ type: "mousedown" }, lastRequest);
     EventUtils.sendMouseEvent({ type: "contextmenu" }, lastRequest);
     await wait;