Bug 1186833 - register-same-scope-different-script-url.https.html fixes. r=bkelly
☠☠ backed out by 63f9f2c90830 ☠ ☠
authorNikhil Marathe <nsm.nikhil@gmail.com>
Tue, 08 Sep 2015 12:56:40 -0700
changeset 294332 6f01338ecce921c41bdaf8ea3e24abdec0866559
parent 294331 b892adb396017c491bd4c6d619a6567ca476e92b
child 294333 0f7315aa8f6b51c3cba4ce568b60c49170a58c03
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbkelly
bugs1186833
milestone43.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 1186833 - register-same-scope-different-script-url.https.html fixes. r=bkelly Update web-platform-tests expected data
testing/web-platform/mozilla/meta/service-workers/service-worker/register-same-scope-different-script-url.https.html.ini
testing/web-platform/mozilla/tests/service-workers/service-worker/register-same-scope-different-script-url.https.html
deleted file mode 100644
--- a/testing/web-platform/mozilla/meta/service-workers/service-worker/register-same-scope-different-script-url.https.html.ini
+++ /dev/null
@@ -1,9 +0,0 @@
-[register-same-scope-different-script-url.https.html]
-  type: testharness
-  expected: TIMEOUT
-  [Register then register new script URL]
-    expected: TIMEOUT
-
-  [Register same-scope new script url effect on controller]
-    expected: TIMEOUT
-
--- a/testing/web-platform/mozilla/tests/service-workers/service-worker/register-same-scope-different-script-url.https.html
+++ b/testing/web-platform/mozilla/tests/service-workers/service-worker/register-same-scope-different-script-url.https.html
@@ -79,20 +79,27 @@ async_test(function(t) {
           assert_equals(registration.active.scriptURL, script1,
                         'on second register, the first script should be ' +
                         'active');
           return wait_for_state(t, registration.installing, 'installed');
         })
       .then(function() {
           assert_equals(registration.installing, null,
                         'on installed, installing should be null');
-          assert_equals(registration.waiting.scriptURL, script2,
-                        'on installed, the second script should be waiting');
-          assert_equals(registration.active.scriptURL, script1,
-                        'on installed, the first script should be active');
+          // Since the registration is not controlling any document, the new
+          // worker can immediately transition to active.
+          if (registration.waiting) {
+            assert_equals(registration.waiting.scriptURL, script2,
+                          'on installed, the second script may still be waiting');
+            assert_equals(registration.active.scriptURL, script1,
+                          'on installed, the first script may be active');
+          } else {
+            assert_equals(registration.active.scriptURL, script2,
+                          'on installed, the second script may be active');
+          }
           return registration.unregister();
         })
       .then(function() {
           t.done();
         })
       .catch(unreached_rejection(t));
   }, 'Register then register new script URL');