Index: third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/request.js |
diff --git a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/request.js b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/request.js |
index f8dd8e83067e2f04fb1cbbd42cf0b6f078f5f308..9cd67290e28792a24144c8bca5219acfa0316bcd 100644 |
--- a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/request.js |
+++ b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/request.js |
@@ -60,6 +60,10 @@ test(function() { |
new Request(URL, {mode: ' cors'}), |
new Request(URL, {mode: 'co rs'}), |
new Request(URL, {mode: 'CORS'}), |
+ new Request(URL, {mode: 'navigate\0'}), |
+ new Request(URL, {mode: ' navigate'}), |
+ new Request(URL, {mode: 'navi gate'}), |
+ new Request(URL, {mode: 'NAVIGATE'}), |
new Request(URL, {mode: '\0'.repeat(100000)}), |
new Request(URL, {mode: 'x'.repeat(100000)}), |
new Request(URL, {credentials: null}), |
@@ -294,6 +298,15 @@ test(function() { |
}, 'Request method name throw test'); |
test(function() { |
+ assert_throws( |
+ {name: 'TypeError'}, |
+ function() { |
+ var request = new Request(URL, {mode: 'navigate'}); |
+ }, |
+ 'new Request with a navigate mode should throw'); |
+ }, 'Request mode throw test'); |
+ |
+test(function() { |
var url = 'http://example.com'; |
TO_BE_NORMALIZED_METHOD_NAMES.forEach( |
function(method) { |