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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-matchall-exact-controller.https.html

Issue 2881743002: [ServiceWorker] Revise wpt tests for Client.type (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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Service Worker: Clients.matchAll with exact controller</title> 2 <title>Service Worker: Clients.matchAll with exact controller</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 const scope = 'resources/blank.html?clients-matchAll'; 7 const scope = 'resources/blank.html?clients-matchAll';
8 const t = async_test('Test Clients.matchAll() with exact controller'); 8 const t = async_test('Test Clients.matchAll() with exact controller');
9 let frames = []; 9 let frames = [];
10 10
(...skipping 10 matching lines...) Expand all
21 } catch (e) { 21 } catch (e) {
22 reject(e); 22 reject(e);
23 } 23 }
24 }; 24 };
25 25
26 worker.postMessage({port:channel.port2}, [channel.port2]); 26 worker.postMessage({port:channel.port2}, [channel.port2]);
27 }); 27 });
28 } 28 }
29 29
30 let expected = [ 30 let expected = [
31 /* visibilityState, focused, url, frameType */ 31 /* visibilityState, focused, url, type, frameType */
falken 2017/05/15 06:39:28 nit: comment style
leonhsl(Using Gerrit) 2017/05/16 02:54:28 Done.
32 ['visible', true, new URL(scope + '#1', location).toString(), 'window', 'nes ted'], 32 ['visible', true, new URL(scope + '#1', location).toString(), 'window', 'nes ted'],
33 ['visible', false, new URL(scope + '#2', location).toString(), 'window', 'ne sted'] 33 ['visible', false, new URL(scope + '#2', location).toString(), 'window', 'ne sted']
34 ]; 34 ];
35 35
36 t.step(_ => { 36 t.step(_ => {
37 let script = 'resources/clients-matchall-worker.js'; 37 let script = 'resources/clients-matchall-worker.js';
38 service_worker_unregister_and_register(t, script, scope) 38 service_worker_unregister_and_register(t, script, scope)
39 .then(registration => { 39 .then(registration => {
40 return wait_for_state(t, registration.installing, 'activated'); 40 return wait_for_state(t, registration.installing, 'activated');
41 }) 41 })
(...skipping 17 matching lines...) Expand all
59 checkWorkerClients(registration.active, expected), 59 checkWorkerClients(registration.active, expected),
60 ]); 60 ]);
61 }) 61 })
62 .then(_ => { 62 .then(_ => {
63 frames.forEach(f => f.remove() ); 63 frames.forEach(f => f.remove() );
64 service_worker_unregister_and_done(t, scope); 64 service_worker_unregister_and_done(t, scope);
65 }) 65 })
66 .catch(unreached_rejection(t)); 66 .catch(unreached_rejection(t));
67 }); 67 });
68 </script> 68 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698