From 87b10b0dd5c9c8984bedeb5bd6109a2648eacbd0 Mon Sep 17 00:00:00 2001 From: Nikhil Marathe Date: Tue, 8 Sep 2015 12:56:40 -0700 Subject: [PATCH] Bug 1186833 - register-same-scope-different-script-url.https.html fixes. r=bkelly Update web-platform-tests expected data --HG-- extra : commitid : 9yd5tNcT5rG extra : rebase_source : 8478afbeae962f7decac7ab55fa5ea8f39eb4878 --- ...same-scope-different-script-url.https.html.ini | 6 ------ ...ter-same-scope-different-script-url.https.html | 15 +++++++++++---- 2 files changed, 11 insertions(+), 10 deletions(-) delete mode 100644 testing/web-platform/mozilla/meta/service-workers/service-worker/register-same-scope-different-script-url.https.html.ini diff --git a/testing/web-platform/mozilla/meta/service-workers/service-worker/register-same-scope-different-script-url.https.html.ini b/testing/web-platform/mozilla/meta/service-workers/service-worker/register-same-scope-different-script-url.https.html.ini deleted file mode 100644 index 9cc1eed9230c..000000000000 --- a/testing/web-platform/mozilla/meta/service-workers/service-worker/register-same-scope-different-script-url.https.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[register-same-scope-different-script-url.https.html] - type: testharness - expected: TIMEOUT - [Register then register new script URL] - expected: TIMEOUT - diff --git 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 index 6eb00f3071a2..445be740951b 100644 --- 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 @@ -84,10 +84,17 @@ async_test(function(t) { .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() {