mirror of
https://github.com/servo/servo
synced 2026-05-11 01:22:19 +02:00
14 lines
366 B
JavaScript
14 lines
366 B
JavaScript
// META: global=window,worker
|
|
|
|
// https://fetch.spec.whatwg.org/#forbidden-method
|
|
for (const method of [
|
|
'CONNECT', 'TRACE', 'TRACK',
|
|
'connect', 'trace', 'track'
|
|
]) {
|
|
test(function() {
|
|
assert_throws_js(TypeError,
|
|
function() { new Request('./', {method: method}); }
|
|
);
|
|
}, 'Request() with a forbidden method ' + method + ' must throw.');
|
|
}
|