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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/register-foreign-fetch-errors-worker.js

Issue 2892473003: Upstream service worker "register" tests to WPT (Closed)
Patch Set: Created 3 years, 7 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 self.addEventListener('install', function(event) { 1 self.addEventListener('install', function(event) {
2 var scope = registration.scope; 2 var scope = registration.scope;
3 var scope_url = new URL(scope); 3 var scope_url = new URL(scope);
4 4
5 test(function() { 5 test(function() {
6 assert_throws(new TypeError(), function() { 6 assert_throws(new TypeError(), function() {
7 event.registerForeignFetch({}); 7 event.registerForeignFetch({});
8 }); 8 });
9 }, 'Invalid options'); 9 }, 'Invalid options');
10 10
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 test(function() { 124 test(function() {
125 assert_throws(new TypeError(), function() { 125 assert_throws(new TypeError(), function() {
126 event.registerForeignFetch({scopes: [scope], 126 event.registerForeignFetch({scopes: [scope],
127 origins: ['https://example.com/', '*']}) ; 127 origins: ['https://example.com/', '*']}) ;
128 }); 128 });
129 }, 'Origins includes other strings and wildcard'); 129 }, 'Origins includes other strings and wildcard');
130 }); 130 });
131 131
132 // Import testharness after install handler to make sure our install handler 132 // Import testharness after install handler to make sure our install handler
133 // runs first. Otherwise only one test will run. 133 // runs first. Otherwise only one test will run.
134 importScripts('../../resources/testharness.js'); 134 importScripts('/resources/testharness.js');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698