Chromium Code Reviews| Index: LayoutTests/http/tests/serviceworker/getregistrations.html |
| diff --git a/LayoutTests/http/tests/serviceworker/getregistrations.html b/LayoutTests/http/tests/serviceworker/getregistrations.html |
| index 6d71f7050a461d752fcac12a06ec679ddd827056..576ef2eed8bee7dc5ccf976c0097f0f5d91ca3e3 100644 |
| --- a/LayoutTests/http/tests/serviceworker/getregistrations.html |
| +++ b/LayoutTests/http/tests/serviceworker/getregistrations.html |
| @@ -6,6 +6,20 @@ |
| <script src="../resources/get-host-info.js"></script> |
| <script src="../fetch/resources/fetch-test-helpers.js"></script> |
| <script> |
| +// Purge the existing registrations for the origin. |
| +// getRegistrations() is used in order to avoid adding additional complexity |
| +// e.g. adding an internal function. |
| +sequential_promise_test(function(t) { |
| + return navigator.serviceWorker.getRegistrations() |
| + .then(function(registrations) { |
| + return registrations.reduce(function(sequence, registration) { |
|
falken
2015/06/23 02:19:46
nit: you'll have to indent the body of this functi
jungkees
2015/06/23 02:30:07
Oh, the file I referred to for the indentation of
|
| + return sequence.then(function() { |
| + return registration.unregister(); |
| + }); |
| + }, Promise.resolve()); |
| + }); |
| + }, 'Purge the existing registrations.'); |
| + |
| sequential_promise_test(function(t) { |
| return navigator.serviceWorker.getRegistrations() |
| .then(function(value) { |