Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/request.js

Issue 1391583002: Introduce "navigate" mode in Requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..b365e4f5566aadf48712ebad2481e96eda352ad7 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');
Mike West 2015/10/20 07:27:04 I'd also like to see a test for the copy case ("If
shiva.jm 2015/10/21 08:34:59 It's bit tricky in making layout test for these ca
hiroshige 2015/10/30 12:57:42 As mentioned above, creating layout tests is hard
shiva.jm 2015/11/02 12:06:19 The change was removed from FrameLoadRequest.h, si
+
+test(function() {
var url = 'http://example.com';
TO_BE_NORMALIZED_METHOD_NAMES.forEach(
function(method) {

Powered by Google App Engine
This is Rietveld 408576698