| Index: third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/unregister-then-register.https.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/unregister-then-register.html b/third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/unregister-then-register.https.html
|
| similarity index 71%
|
| copy from third_party/WebKit/LayoutTests/http/tests/serviceworker/unregister-then-register.html
|
| copy to third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/unregister-then-register.https.html
|
| index 75db25c1d98e67f13f35f3c9cf353cbd5bb2bef2..d75904d158f6e14a4da04d033170d4a609cee534 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/unregister-then-register.html
|
| +++ b/third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/unregister-then-register.https.html
|
| @@ -1,13 +1,12 @@
|
| <!DOCTYPE html>
|
| -<script src="../resources/testharness.js"></script>
|
| -<script src="../resources/testharnessreport.js"></script>
|
| -<script src="resources/test-helpers.js"></script>
|
| +<script src="/resources/testharness.js"></script>
|
| +<script src="/resources/testharnessreport.js"></script>
|
| +<script src="resources/test-helpers.sub.js"></script>
|
| <script>
|
| var worker_url = 'resources/empty-worker.js';
|
|
|
| async_test(function(t) {
|
| var scope = 'resources/scope/re-register-resolves-to-new-value';
|
| - var iframe;
|
| var registration;
|
|
|
| service_worker_unregister_and_register(t, worker_url, scope)
|
| @@ -49,7 +48,7 @@ async_test(function(t) {
|
| })
|
| .then(function(new_registration) {
|
| assert_equals(registration, new_registration,
|
| - 'register should resolve to the same registration');
|
| + 'new registration should resolve to the same registration');
|
| service_worker_unregister_and_done(t, scope);
|
| })
|
| .catch(unreached_rejection(t));
|
| @@ -57,45 +56,6 @@ async_test(function(t) {
|
| 'registration is in use.');
|
|
|
| async_test(function(t) {
|
| - var scope = 'resources/scope/complete-unregistration-followed-by-' +
|
| - 'reloading-controllee-iframe';
|
| - var registration;
|
| - var frame;
|
| - var service_worker;
|
| - service_worker_unregister_and_register(t, worker_url, scope)
|
| - .then(function(r) {
|
| - registration = r;
|
| - return wait_for_state(t, r.installing, 'activated');
|
| - })
|
| - .then(function() {
|
| - return with_iframe(scope);
|
| - })
|
| - .then(function(f) {
|
| - frame = f;
|
| - return registration.unregister();
|
| - })
|
| - .then(function() {
|
| - return new Promise(function(resolve) {
|
| - frame.onload = resolve;
|
| - frame.contentWindow.location.reload();
|
| - });
|
| - })
|
| - .then(function() {
|
| - var c = frame.contentWindow.navigator.serviceWorker.controller;
|
| - assert_equals(c, null, 'a page after unregistration should not be ' +
|
| - 'controlled by service worker');
|
| - return navigator.serviceWorker.getRegistration(scope);
|
| - })
|
| - .then(function(r) {
|
| - assert_equals(r, undefined, 'getRegistration should return ' +
|
| - 'undefined after unregistration');
|
| - service_worker_unregister_and_done(t, scope);
|
| - })
|
| - .catch(unreached_rejection(t));
|
| -}, 'Reloading the last controlled iframe after unregistration should ensure ' +
|
| - 'the deletion of the registration');
|
| -
|
| -async_test(function(t) {
|
| var scope = 'resources/scope/re-register-does-not-affect-existing-controllee';
|
| var iframe;
|
| var registration;
|
| @@ -125,6 +85,7 @@ async_test(function(t) {
|
| iframe.contentWindow.navigator.serviceWorker.controller,
|
| controller,
|
| 'the worker from the first registration is the controller');
|
| + iframe.remove();
|
| service_worker_unregister_and_done(t, scope);
|
| })
|
| .catch(unreached_rejection(t));
|
| @@ -160,6 +121,7 @@ async_test(function(t) {
|
| assert_not_equals(
|
| frame.contentWindow.navigator.serviceWorker.controller, null,
|
| 'document should have a controller');
|
| + frame.remove();
|
| service_worker_unregister_and_done(t, scope);
|
| })
|
| .catch(unreached_rejection(t));
|
|
|