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

Side by Side Diff: LayoutTests/http/tests/serviceworker/resources/headers-worker.js

Issue 647493002: Move promise_test and assert_promise_rejects out of worker-test-harness. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@geofencing_serviceworker
Patch Set: rebase Created 6 years, 2 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 importScripts('worker-test-harness.js'); 1 importScripts('worker-testharness.js');
2 2
3 test(function() { 3 test(function() {
4 function size(headers) { 4 function size(headers) {
5 var count = 0; 5 var count = 0;
6 for (var header of headers) { 6 for (var header of headers) {
7 ++count; 7 ++count;
8 } 8 }
9 return count; 9 return count;
10 } 10 }
11 11
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 assert_throws({name:'TypeError'}, 196 assert_throws({name:'TypeError'},
197 function() { var headers = new Headers([['a']]); }, 197 function() { var headers = new Headers([['a']]); },
198 'new Headers with a sequence with less than two strings should throw'); 198 'new Headers with a sequence with less than two strings should throw');
199 assert_throws({name:'TypeError'}, 199 assert_throws({name:'TypeError'},
200 function() { var headers = new Headers([['a', 'b'], []]); }, 200 function() { var headers = new Headers([['a', 'b'], []]); },
201 'new Headers with a sequence with less than two strings should throw'); 201 'new Headers with a sequence with less than two strings should throw');
202 assert_throws({name:'TypeError'}, 202 assert_throws({name:'TypeError'},
203 function() { var headers = new Headers([['a', 'b'], ['x', 'y', 'z']]); }, 203 function() { var headers = new Headers([['a', 'b'], ['x', 'y', 'z']]); },
204 'new Headers with a sequence with more than two strings should throw'); 204 'new Headers with a sequence with more than two strings should throw');
205 }, 'Headers in ServiceWorkerGlobalScope'); 205 }, 'Headers in ServiceWorkerGlobalScope');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698