blob: a139ff6f1e71d3839c167f5ee8fa77d026fd2ca5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
promise_test(() => fetch("resources/access-control-expose-headers.json").then(res => res.json()).then(runTests), "Loading JSON…");
function runTests(allTestData) {
allTestData.forEach(testData => {
const encodedInput = encodeURIComponent(testData.input);
promise_test(() => {
const relativeURL = "resources/expose-headers.py?expose=" + encodedInput,
url = new URL(relativeURL, location.href).href.replace("://", "://élève.");
return fetch(url).then(res => {
assert_equals(res.headers.get("content-language"), "mkay");
assert_equals(res.headers.get("bb-8"), (testData.exposed ? "hey" : null));
});
}, "Parsing: " + encodedInput);
})
}
|