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

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

Issue 2881743002: [ServiceWorker] Revise wpt tests for Client.type (Closed)
Patch Set: Revise code comments 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Service Worker: Clients.get with window and worker clients</title> 2 <title>Service Worker: Clients.get with window and worker clients</title>
3 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script> 4 <script src="/resources/testharnessreport.js"></script>
5 <script src="resources/test-helpers.sub.js"></script> 5 <script src="resources/test-helpers.sub.js"></script>
6 <script> 6 <script>
7 var scope = 'resources/clients-get-client-types'; 7 var scope = 'resources/clients-get-client-types';
8 var frame_url = scope + '-frame.html'; 8 var frame_url = scope + '-frame.html';
9 var shared_worker_url = scope + '-shared-worker.js'; 9 var shared_worker_url = scope + '-shared-worker.js';
10 var client_ids = []; 10 var client_ids = [];
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 return new Promise(function(resolve) { 55 return new Promise(function(resolve) {
56 function get_client_id(e) { 56 function get_client_id(e) {
57 window.removeEventListener('message', get_client_id); 57 window.removeEventListener('message', get_client_id);
58 resolve(e.data.clientId); 58 resolve(e.data.clientId);
59 } 59 }
60 window.addEventListener('message', get_client_id, false); 60 window.addEventListener('message', get_client_id, false);
61 }); 61 });
62 } 62 }
63 63
64 var expected = [ 64 var expected = [
65 /* visibilityState, focused, url, frameType */ 65 // visibilityState, focused, url, type, frameType
66 ['visible', true, normalizeURL(scope) + '-frame.html', 'nested'], 66 ['visible', true, normalizeURL(scope) + '-frame.html', 'window', 'nested'],
67 [undefined, undefined, normalizeURL(scope) + '-shared-worker.js', 'none'] 67 [undefined, undefined, normalizeURL(scope) + '-shared-worker.js', 'sharedwor ker', 'none']
68 ]; 68 ];
69 </script> 69 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698