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

Side by Side Diff: LayoutTests/http/tests/serviceworker/multiple-register.html

Issue 1205493005: Service Worker: Add initialization step for getRegistrations.html layout test. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix indentation Created 5 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
« no previous file with comments | « LayoutTests/http/tests/serviceworker/getregistrations.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 <script src="resources/test-helpers.js"></script> 4 <script src="resources/test-helpers.js"></script>
5 <script> 5 <script>
6 var worker_url = 'resources/empty-worker.js'; 6 var worker_url = 'resources/empty-worker.js';
7 7
8 async_test(function(t) { 8 async_test(function(t) {
9 var scope = 'resources/scope/subsequent-register-from-same-window'; 9 var scope = 'resources/scope/subsequent-register-from-same-window';
10 var registration; 10 var registration;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 for (var i = 0; i < 10; ++i) { 97 for (var i = 0; i < 10; ++i) {
98 promises.push(navigator.serviceWorker.register(worker_url, 98 promises.push(navigator.serviceWorker.register(worker_url,
99 { scope: scope })); 99 { scope: scope }));
100 } 100 }
101 return Promise.all(promises); 101 return Promise.all(promises);
102 }) 102 })
103 .then(function(registrations) { 103 .then(function(registrations) {
104 registrations.forEach(function(registration) { 104 registrations.forEach(function(registration) {
105 assert_equals(registration, registrations[0], 105 assert_equals(registration, registrations[0],
106 'register should resolve to the same registration'); 106 'register should resolve to the same registration');
107 }); 107 });
108 return registrations[0].unregister(); 108 return registrations[0].unregister();
109 }) 109 })
110 .then(function() { t.done(); }) 110 .then(function() { t.done(); })
111 .catch(unreached_rejection(t)); 111 .catch(unreached_rejection(t));
112 }, 'Concurrent registrations resolve to the same registration object'); 112 }, 'Concurrent registrations resolve to the same registration object');
113 113
114 </script> 114 </script>
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/serviceworker/getregistrations.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698