Bug 1346313 - Part 2: Update wpt test to verify our implementation align with spec. r=baku

This commit is contained in:
Tom Tung 2017-04-07 15:35:29 +08:00
Родитель 06823a6bd8
Коммит a571613bda
1 изменённых файлов: 4 добавлений и 6 удалений

Просмотреть файл

@ -18,15 +18,14 @@
["triple", "tripleValue3"]
];
var expectedDict = {"single": "singleValue",
"double": "doubleValue1,doubleValue2",
"triple": "tripleValue1,tripleValue2,tripleValue3"
"double": "doubleValue1, doubleValue2",
"triple": "tripleValue1, tripleValue2, tripleValue3"
};
test(function() {
var headers = new Headers(headerSeqCombine);
for (name in expectedDict)
assert_equals(headers.get(name), expectedDict[name],
"name: " + name + " has value: " + expectedDict[name]);
assert_equals(headers.get(name), expectedDict[name]);
}, "Create headers using same name for different values");
test(function() {
@ -51,8 +50,7 @@
for (name in expectedDict) {
var value = headers.get(name);
headers.append(name,"newSingleValue");
assert_equals(headers.get(name), (value + "," + "newSingleValue"),
"name: " + name + " has value: " + headers.get(name));
assert_equals(headers.get(name), (value + ", " + "newSingleValue"));
}
}, "Check append methods when called with already used name");
</script>