-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert of Revert of ServiceWorker: throw when close() or terminate() …
…called (patchset #1 of https://codereview.chromium.org/515323002/) Reason for revert: The CL reverted by this patchset was not responsible for the breakage. Re-landing. Original issue's description: > Revert of ServiceWorker: throw when close() or terminate() called (patchset #3 of https://codereview.chromium.org/505063002/) > > Reason for revert: > Break compilation on various bots. Maybe Win only. > > Original issue's description: > > ServiceWorker: throw when close() or terminate() called > > > > Per spec: > > * ServiceWorker#terminate() should throw InvalidAccessError > > * ServiceWorkerGlobalScope#close() should throw InvalidAccessError > > > > ... since the behaviors inherited from the base interfaces are not > > supported. > > > > Spec: slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html > > > > BUG=398318 > > > > Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181049 > > [email protected],[email protected] > NOTREECHECKS=true > NOTRY=true > BUG=398318 > > Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181050 [email protected],[email protected] NOTREECHECKS=true NOTRY=true BUG=398318 Review URL: https://codereview.chromium.org/513353002 git-svn-id: svn://svn.chromium.org/blink/trunk@181057 bbb929c8-8fbe-4397-9dbb-9b2b20218538
- Loading branch information
1 parent
18b6af9
commit 5547e68
Showing
13 changed files
with
76 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
LayoutTests/http/tests/serviceworker/resources/serviceworkerglobalscope-close-worker.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
importScripts('interfaces.js'); | ||
importScripts('worker-test-harness.js'); | ||
|
||
test(function() { | ||
assert_throws({name: 'InvalidAccessError'}, function() { | ||
self.close(); | ||
}); | ||
}, 'ServiceWorkerGlobalScope close operation'); |
12 changes: 12 additions & 0 deletions
12
LayoutTests/http/tests/serviceworker/serviceworkerglobalscope-close.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<title>ServiceWorkerGlobalScope: close operation</title> | ||
<script src="../resources/testharness.js"></script> | ||
<script src="../resources/testharnessreport.js"></script> | ||
<script src="resources/test-helpers.js"></script> | ||
<script> | ||
|
||
service_worker_test( | ||
'resources/serviceworkerglobalscope-close-worker.js', | ||
'ServiceWorkerGlobalScope: close operation'); | ||
|
||
</script> |
24 changes: 24 additions & 0 deletions
24
LayoutTests/http/tests/serviceworker/serviceworkerobject-terminate.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
<title>ServiceWorker object: terminate operation</title> | ||
<script src="../resources/testharness.js"></script> | ||
<script src="../resources/testharnessreport.js"></script> | ||
<script src="resources/test-helpers.js"></script> | ||
<script> | ||
|
||
async_test(function(t) { | ||
var worker = 'resources/empty-worker.js'; | ||
var scope = 'resources/blank.html'; | ||
service_worker_unregister_and_register(t, worker, scope) | ||
.then(t.step_func(function(registration) { | ||
return wait_for_update(t, registration); | ||
})) | ||
.then(t.step_func(function(worker) { | ||
assert_throws({name: 'InvalidAccessError'}, function() { | ||
worker.terminate(); | ||
}); | ||
return service_worker_unregister_and_done(t, scope); | ||
})) | ||
.catch(t.step_func(function(e) { throw e; })); | ||
}, 'Verify the terminate operation'); | ||
|
||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters