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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/register-default-scope.https.html

Issue 2415873002: Import w3c tests for the service workers (Closed)
Patch Set: Rebase Created 4 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>register() and scope</title> 2 <title>register() and scope</title>
3 <script src="../resources/testharness.js"></script> 3 <script src="/resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script> 4 <script src="resources/testharness-helpers.js"></script>
5 <script src="resources/test-helpers.js"></script> 5 <script src="/resources/testharnessreport.js"></script>
6 <script src="resources/test-helpers.sub.js"></script>
6 <script> 7 <script>
7 8
8 promise_test(function(t) { 9 promise_test(function(t) {
9 var script = 'resources/empty-worker.js'; 10 var script = 'resources/empty-worker.js';
10 var script_url = new URL(script, location.href); 11 var script_url = new URL(script, location.href);
11 var expected_scope = new URL('./', script_url).href; 12 var expected_scope = new URL('./', script_url).href;
12 return service_worker_unregister(t, expected_scope) 13 return service_worker_unregister(t, expected_scope)
13 .then(function() { 14 .then(function() {
14 return navigator.serviceWorker.register('resources/empty-worker.js'); 15 return navigator.serviceWorker.register('resources/empty-worker.js');
15 }).then(function(registration) { 16 }).then(function(registration) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 }, 57 },
57 function(error) { 58 function(error) {
58 assert_equals(error.name, 'SecurityError', 59 assert_equals(error.name, 'SecurityError',
59 'passing a null scope should be interpreted as ' + 60 'passing a null scope should be interpreted as ' +
60 'scope="null" which violates the path restriction'); 61 'scope="null" which violates the path restriction');
61 t.done(); 62 t.done();
62 }); 63 });
63 }, 'null scope'); 64 }, 'null scope');
64 65
65 </script> 66 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698