Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / serviceworker / unregister.html
blob54be479d1aeff9c5a0d623ff649cdc1c43d41c90
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <script src="resources/test-helpers.js"></script>
5 <script>
6 async_test(function(t) {
7 var scope = 'resources/scope/unregister-twice';
8 var registration;
9 navigator.serviceWorker.register('resources/empty-worker.js',
10 {scope: scope})
11 .then(function(r) {
12 registration = r;
13 return registration.unregister();
15 .then(function() {
16 return registration.unregister();
18 .then(function(value) {
19 assert_equals(value, false,
20 'unregistering twice should resolve with false');
21 t.done();
23 .catch(unreached_rejection(t));
24 }, 'Unregister twice');
26 async_test(function(t) {
27 var scope = 'resources/scope/successful-unregister/';
28 navigator.serviceWorker.register('resources/empty-worker.js',
29 {scope: scope})
30 .then(function(registration) {
31 return registration.unregister();
33 .then(function(value) {
34 assert_equals(value, true,
35 'unregistration should resolve with true');
36 t.done();
38 .catch(unreached_rejection(t));
39 }, 'Register then unregister');
40 </script>