OLD | NEW |
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 Loading... |
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'); |
OLD | NEW |