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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/import-scripts-worker.js

Issue 2864783002: Upstream service wrkr `importScripts` tests to WPT (Closed)
Patch Set: Incorporate review feedback 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
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/get-version.php ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 importScripts('../../resources/testharness.js');
2
3 let echo_output = null;
4
5 // Tests importing a script that sets |echo_output| to the query string.
6 function test_import(str) {
7 importScripts('echo.php?' + str);
8 assert_equals(echo_output, str);
9 }
10
11 test_import('root');
12 test_import('root-and-message');
13
14 self.addEventListener('install', () => {
15 test_import('install');
16 test_import('install-and-message');
17 });
18
19 self.addEventListener('message', e => {
20 test_import('root-and-message');
21 test_import('install-and-message');
22 // TODO(falken): This should fail. The spec disallows importing a non-cached
23 // script like this but currently Chrome and Firefox allow it.
24 test_import('message');
25 e.source.postMessage('OK');
26 });
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/get-version.php ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698