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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/clients-get-client-types-frame.html

Issue 2884843004: [ServiceWorker] Add wpt tests to verify Client.type as 'worker' (Closed)
Patch Set: Add assert_not_equals undefined Created 3 years, 6 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script> 2 <script>
3 fetch('clientId') 3 fetch('clientId')
4 .then(function(response) { 4 .then(function(response) {
5 return response.text(); 5 return response.text();
6 }) 6 })
7 .then(function(text) { 7 .then(function(text) {
8 parent.postMessage({clientId: text}, '*'); 8 parent.postMessage({clientId: text}, '*');
9 }); 9 });
10
11 onmessage = function(e) {
12 if (e.data == 'StartWorker') {
13 var w = new Worker('clients-get-client-types-frame-worker.js');
14 w.postMessage({cmd:'GetClientId', port:e.ports[0]}, [e.ports[0]]);
15 }
16 }
10 </script> 17 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698