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

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

Issue 1060033002: Implement Request.context for Fetch API (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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: LayoutTests/http/tests/fetch/script-tests/fetch.js
diff --git a/LayoutTests/http/tests/fetch/script-tests/fetch.js b/LayoutTests/http/tests/fetch/script-tests/fetch.js
index caa2174f1aa5ab7c73d16b41ac3a35c603cce60e..b73e7e4efa9698b823d3560cb62b96a56545dc43 100644
--- a/LayoutTests/http/tests/fetch/script-tests/fetch.js
+++ b/LayoutTests/http/tests/fetch/script-tests/fetch.js
@@ -55,6 +55,7 @@ sequential_promise_test(function(t) {
// serialized with the exclude fragment flag set.
assert_equals(request.url,
BASE_ORIGIN + '/serviceworker/resources/fetch-status.php?status=200');
+ assert_equals(request.context, '');
return fetch(request)
.then(function(response) {
@@ -66,6 +67,7 @@ sequential_promise_test(function(t) {
assert_equals(response.url,
BASE_ORIGIN +
'/serviceworker/resources/fetch-status.php?status=200');
+ assert_equals(request.context, '');
});
}, 'Request/response url attribute getter with fragment');
@@ -79,6 +81,7 @@ sequential_promise_test(function(t) {
var request = new Request(redirect_original_url);
assert_equals(request.url, redirect_original_url,
'Request\'s url is the original URL');
+ assert_equals(request.context, '');
return fetch(request)
.then(function(response) {
@@ -88,6 +91,7 @@ sequential_promise_test(function(t) {
'Response\'s url is locationURL');
assert_equals(request.url, redirect_original_url,
'Request\'s url remains the original URL');
+ assert_equals(request.context, '');
});
}, 'Request/response url attribute getter with redirect');
@@ -106,12 +110,14 @@ sequential_promise_test(function(t) {
method: 'POST',
body: new Blob(['Test Blob'], {type: 'test/type'})
});
+ assert_equals(request.context, '');
return fetch(request)
.then(function(response) { return response.text(); })
.then(evalJsonp)
.then(function(result) {
assert_equals(result.method, 'POST');
assert_equals(result.body, 'Test Blob');
+ assert_equals(request.context, '');
});
}, 'Fetch with Blob body test');
« no previous file with comments | « no previous file | LayoutTests/http/tests/fetch/script-tests/request.js » ('j') | Source/modules/fetch/Request.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698