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

Unified Diff: LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/scope-default.html

Issue 672383003: [ServiceWorker] Don't allow registration of the ServiceWorker scope outside the script directory. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: geofencing/apis_not_implemented.html Created 6 years, 2 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/ServiceWorkerGlobalScope/scope-default.html
diff --git a/LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/scope-default.html b/LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/scope-default.html
index cd7095d96e04499bd7b205e0caa621b7e9a40ee4..f539cfcfbefb6230dea93010819896f71801be2c 100644
--- a/LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/scope-default.html
+++ b/LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/scope-default.html
@@ -1,11 +1,16 @@
<!DOCTYPE html>
<title>ServiceWorkerGlobalScope: scope property is default value</title>
<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharness-helpers.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../resources/test-helpers.js"></script>
<script src="resources/scope.js"></script>
<script>
-async_test(function(t) {
- scope_test(t, 'resources/scope-worker.js');
- }, 'Verify the scope property: default scope');
+
+promise_test(function(t) {
+ return assert_promise_rejects(
+ navigator.serviceWorker.register('resources/scope-worker.js'),
+ 'SecurityError',
+ 'Registration default scope should fail with SecurityError.');
+ }, 'Registering default scope');
falken 2014/10/24 06:50:44 This test should have a better name. "Register a s
horo 2014/10/24 07:21:43 Done.
</script>

Powered by Google App Engine
This is Rietveld 408576698