Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 2 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /fetch/api/basic/request-private-network-headers.tentative.any.html - WPT Dashboard Interop Dashboard
- /fetch/api/basic/request-private-network-headers.tentative.any.serviceworker.html - WPT Dashboard Interop Dashboard
- /fetch/api/basic/request-private-network-headers.tentative.any.sharedworker.html - WPT Dashboard Interop Dashboard
- /fetch/api/basic/request-private-network-headers.tentative.any.worker.html - WPT Dashboard Interop Dashboard
// META: global=window,worker
// META: script=../resources/utils.js
requestForbiddenHeaders(
'Access-Control-Request-Private-Network is a forbidden request header',
{'Access-Control-Request-Private-Network': ''});
var invalidRequestHeaders = [
["Access-Control-Request-Private-Network", "KO"],
];
invalidRequestHeaders.forEach(function(header) {
test(function() {
var request = new Request("");
request.headers.set(header[0], header[1]);
assert_equals(request.headers.get(header[0]), null);
}, "Adding invalid request header \"" + header[0] + ": " + header[1] + "\"");
});