OLD | NEW |
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 Loading... |
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'); |
OLD | NEW |