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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/iframe-register-link-element.html

Issue 2896643002: Upstream service wrkr "iframe sandbox" test 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 <script> 1 <script>
2 'use strict';
2 var link = document.createElement('link'); 3 var link = document.createElement('link');
3 link.setAttribute('rel', 'serviceworker'); 4 link.setAttribute('rel', 'serviceworker');
4 link.setAttribute('href', 'empty-worker.js'); 5 link.setAttribute('href', 'empty-worker.js');
6 function report(result) {
7 top.postMessage({id: location.search, result: result}, '*');
8 };
5 link.onload = function() { 9 link.onload = function() {
6 top.postMessage('loaded', '*'); 10 report('loaded');
7 } 11 };
8 link.onerror = function(e) { 12 link.onerror = function() {
9 top.postMessage('error', '*'); 13 report('error');
10 } 14 };
11 document.getElementsByTagName('head')[0].appendChild(link); 15 document.getElementsByTagName('head')[0].appendChild(link);
12 </script> 16 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698