Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Unified Diff: LayoutTests/http/tests/serviceworker/resources/serviceworkerglobalscope-close-worker.js

Issue 513353002: Revert of Revert of ServiceWorker: throw when close() or terminate() called (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/serviceworker/resources/serviceworkerglobalscope-close-worker.js
diff --git a/LayoutTests/http/tests/serviceworker/resources/serviceworkerglobalscope-close-worker.js b/LayoutTests/http/tests/serviceworker/resources/serviceworkerglobalscope-close-worker.js
new file mode 100644
index 0000000000000000000000000000000000000000..092e41d5420f62eb1ebdc6e7de771e30638fa230
--- /dev/null
+++ b/LayoutTests/http/tests/serviceworker/resources/serviceworkerglobalscope-close-worker.js
@@ -0,0 +1,8 @@
+importScripts('interfaces.js');
+importScripts('worker-test-harness.js');
+
+test(function() {
+ assert_throws({name: 'InvalidAccessError'}, function() {
+ self.close();
+ });
+}, 'ServiceWorkerGlobalScope close operation');

Powered by Google App Engine
This is Rietveld 408576698