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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/headers.js

Issue 2559273005: [Fetch API] Implement combining of Headers with same keys. (Closed)
Patch Set: fix Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/headers.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/headers.js b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/headers.js
index a87a75febb4649089b93afcb12235d1a2b5a4113..10af63cfa9c84e06b8aa0a0e0f46f608f334e6c8 100644
--- a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/headers.js
+++ b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/headers.js
@@ -239,6 +239,8 @@ test(function(t) {
headers.set('a', '1');
headers.set('b', '2');
headers.set('c', '3');
+ headers.append('a', '2');
+ headers.append('a', '3');
const iterator = headers.entries();
@@ -246,11 +248,16 @@ test(function(t) {
headers.set('d', '4');
const keys = [];
- for (let [key, value] of iterator)
+ const values = [];
+ for (let [key, value] of iterator){
jsbell 2016/12/12 22:38:31 nit: space between ) and {
keys.push(key);
+ values.push(value);
+ }
jsbell 2016/12/12 22:38:31 nit: } should line up with for
assert_array_equals(keys, ['a', 'b', 'c'],
'The pairs to iterate over should be the return ' +
'value of an algorithm that implicitly makes a copy.');
+ assert_array_equals(values, ['1,2,3', '2', '3'],
+ "The values should be combined and separated by ','.");
}, 'Iteration mutation');
done();
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698