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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/register-link-element.html

Issue 1781783002: Implement support for link type serviceworker in link elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: uppercase W in runtime feature name Created 4 years, 9 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 | « no previous file | third_party/WebKit/LayoutTests/http/tests/serviceworker/registration.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharness-helpers.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <script src="resources/test-helpers.js"></script>
6 <script src="resources/registration-tests.js"></script>
7 <body>
8 <script>
9
10 function registerUsingLink(script, options) {
11 var scope = options.scope;
12 var link = document.createElement('link');
13 link.setAttribute('rel', 'serviceworker');
14 link.setAttribute('href', script);
15 link.setAttribute('scope', scope);
16 document.getElementsByTagName('head')[0].appendChild(link);
17 return new Promise(function(resolve, reject) {
18 link.onload = resolve;
19 link.onerror = reject;
20 })
21 .then(() => navigator.serviceWorker.getRegistration(scope));
22 }
23
24 registration_tests(registerUsingLink, false);
25
26 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/serviceworker/registration.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698