forbidden-method.any.js (366B)
1 // META: global=window,worker 2 3 // https://fetch.spec.whatwg.org/#forbidden-method 4 for (const method of [ 5 'CONNECT', 'TRACE', 'TRACK', 6 'connect', 'trace', 'track' 7 ]) { 8 test(function() { 9 assert_throws_js(TypeError, 10 function() { new Request('./', {method: method}); } 11 ); 12 }, 'Request() with a forbidden method ' + method + ' must throw.'); 13 }