Bug 1405529 Make test_devtools_serviceworker_interception.html close its window so its registration cleans up. r=asuth
authorBen Kelly <ben@wanderview.com>
Wed, 04 Oct 2017 07:36:25 -0700
changeset 1311796 b05f110f2d1f6e2adf905249b9cc337de86fd9d4
parent 1311795 33ef79c5fe06fb8aee5ca32fd700b5a5091899ff
child 1311797 53006df129c87ce9d67e005f365a0a3249cece14
push id225897
push useropettay@mozilla.com
push dateWed, 04 Oct 2017 19:25:01 +0000
treeherdertry@2f2f41234c44 [default view] [failures only]
reviewersasuth
bugs1405529
milestone58.0a1
Bug 1405529 Make test_devtools_serviceworker_interception.html close its window so its registration cleans up. r=asuth
dom/workers/test/serviceworkers/test_devtools_serviceworker_interception.html
--- a/dom/workers/test/serviceworkers/test_devtools_serviceworker_interception.html
+++ b/dom/workers/test/serviceworkers/test_devtools_serviceworker_interception.html
@@ -60,17 +60,18 @@ function executeTest(aWindow) {
     // Should be intercpeted and synthesized.
     .then(_ => fetchAndCheckTimedChannel(aWindow, true, false, "fake.html"))
 
     // Should be intercepted but still fetch from network.
     .then(_ => fetchAndCheckTimedChannel(aWindow, true, true,
                                          "hello.html?ForBypassingHttpCache"))
 
     // Tear down
-    .then(_ => registration.unregister());
+    .then(_ => registration.unregister())
+    .then(_ => aWindow.close());
 }
 
 function register(aWindow, aURL, aScope) {
   return aWindow.navigator.serviceWorker.register(aURL, {scope: aScope})
     .then(r => {
       var worker = r.installing;
       return new Promise(function(aResolve) {
         worker.onstatechange = function() {