Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / serviceworker / chromium / resources / window-close-during-registration.html
blob46fc6c3184eb9a3043a9cf6f8a23b03d0866a9f5
1 <html>
2 <script>
3 var scope = 'empty';
5 navigator.serviceWorker.getRegistration(scope)
6 .then(function(registration) {
7 if (registration)
8 registration.unregister();
9 })
10 .then(function() {
11 var promise = navigator.serviceWorker.register('empty-worker.js',
12 { scope: scope });
13 window.close();
14 window.opener.done();
15 return promise;
17 .catch(function(error) {
18 window.opener.testFailed(error.message);
19 window.opener.done();
20 });
21 </script>
22 </html>