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

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

Issue 2778903002: Upstream service worker `client` tests to WPT (Closed)
Patch Set: Remove unnecessary branch Created 3 years, 8 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 on script evaluation</title> 2 <title>Service Worker: Clients.matchAll on script evaluation</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.js"></script> 5 <script src="resources/test-helpers.sub.js"></script>
6 <script> 6 <script>
7 promise_test(function(t) { 7 promise_test(function(t) {
8 var script = 'resources/clients-matchall-on-evaluation-worker.js'; 8 var script = 'resources/clients-matchall-on-evaluation-worker.js';
9 var scope = 'resources/blank.html?clients-matchAll-on-evaluation'; 9 var scope = 'resources/blank.html?clients-matchAll-on-evaluation';
10 10
11 var saw_message = new Promise(function(resolve) { 11 var saw_message = new Promise(function(resolve) {
12 navigator.serviceWorker.onmessage = function(e) { 12 navigator.serviceWorker.onmessage = function(e) {
13 assert_equals(e.data, 'matched'); 13 assert_equals(e.data, 'matched');
14 resolve(); 14 resolve();
15 }; 15 };
16 }); 16 });
17 17
18 return service_worker_unregister_and_register(t, script, scope) 18 return service_worker_unregister_and_register(t, script, scope)
19 .then(function(registration) { 19 .then(function(registration) {
20 add_completion_callback(function() { registration.unregister(); }); 20 add_completion_callback(function() { registration.unregister(); });
21 return saw_message; 21 return saw_message;
22 }); 22 });
23 }, 'Test Clients.matchAll() on script evaluation'); 23 }, 'Test Clients.matchAll() on script evaluation');
24 </script> 24 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698