Bug 1465670 P2 Fix import-scripts-updated-flag.https.html WPT to expect NetworkError and to clear previous test state. r=asuth
authorBen Kelly <ben@wanderview.com>
Tue, 05 Jun 2018 10:49:12 -0700
changeset 421352 9eb69a99a087f43cf043235ffd3c4bd6799a33b3
parent 421351 ef1dd76af6f97b337a219e119e874f49b278aea6
child 421353 8c55a618ddef81d1de47be8ac965578250e21f85
push id104035
push userbkelly@mozilla.com
push dateTue, 05 Jun 2018 17:49:21 +0000
treeherdermozilla-inbound@c8103e36d8cf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersasuth
bugs1465670
milestone62.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 1465670 P2 Fix import-scripts-updated-flag.https.html WPT to expect NetworkError and to clear previous test state. r=asuth
testing/web-platform/meta/service-workers/service-worker/import-scripts-updated-flag.https.html.ini
testing/web-platform/tests/service-workers/service-worker/import-scripts-updated-flag.https.html
testing/web-platform/tests/service-workers/service-worker/resources/import-scripts-updated-flag-worker.js
deleted file mode 100644
--- a/testing/web-platform/meta/service-workers/service-worker/import-scripts-updated-flag.https.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[import-scripts-updated-flag.https.html]
-  [import script not previously imported]
-    expected: FAIL
-
--- a/testing/web-platform/tests/service-workers/service-worker/import-scripts-updated-flag.https.html
+++ b/testing/web-platform/tests/service-workers/service-worker/import-scripts-updated-flag.https.html
@@ -70,14 +70,14 @@ promise_test(t => {
   }, 'import script previously imported at worker install time');
 
 promise_test(t => {
     return register
       .then(function(worker) {
           return post_and_wait_for_reply(worker, 'message');
         })
       .then(result => {
-          assert_equals(result.error, 'TypeError');
+          assert_equals(result.error, 'NetworkError');
           assert_equals(result.value, null);
         });
   }, 'import script not previously imported');
 </script>
 </body>
--- a/testing/web-platform/tests/service-workers/service-worker/resources/import-scripts-updated-flag-worker.js
+++ b/testing/web-platform/tests/service-workers/service-worker/resources/import-scripts-updated-flag-worker.js
@@ -1,28 +1,30 @@
 importScripts('/resources/testharness.js');
 
 let echo_output = null;
 
 // Tests importing a script that sets |echo_output| to the query string.
 function test_import(str) {
+  echo_output = null;
   importScripts('import-scripts-echo.py?msg=' + str);
   assert_equals(echo_output, str);
 }
 
 test_import('root');
 test_import('root-and-message');
 
 self.addEventListener('install', () => {
     test_import('install');
     test_import('install-and-message');
   });
 
 self.addEventListener('message', e => {
     var error = null;
+    echo_output = null;
 
     try {
       importScripts('import-scripts-echo.py?msg=' + e.data);
     } catch (e) {
       error = e && e.name;
     }
 
     e.source.postMessage({ error: error, value: echo_output });