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

Unified Diff: LayoutTests/http/tests/fetch/script-tests/request.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
« no previous file with comments | « no previous file | Source/modules/fetch/FetchManager.cpp » ('j') | Source/modules/fetch/FetchManager.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/fetch/script-tests/request.js
diff --git a/LayoutTests/http/tests/fetch/script-tests/request.js b/LayoutTests/http/tests/fetch/script-tests/request.js
index 1f736874cf3220723030df931858383b83f64ee1..6b19b43bdfba5702d006c3df39418ec1b9d135ef 100644
--- a/LayoutTests/http/tests/fetch/script-tests/request.js
+++ b/LayoutTests/http/tests/fetch/script-tests/request.js
@@ -715,4 +715,26 @@ promise_test(function(t) {
});
}, 'Extract a MIME type (2)');
+
+// Tests for requests context.
+promise_test(function(t) {
+ var req = new Request('http://localhost/',
+ {method: 'POST', body: ''});
+ return req.blob()
jsbell 2015/04/06 17:04:15 Extracting the body of the request here should not
shiva.jm 2015/04/09 09:16:22 Done.
+ .then(function(blob) {
+ assert_equals(req.context, '');
jsbell 2015/04/06 17:04:14 Please add a message to the assertion, e.g. "Reque
shiva.jm 2015/04/09 09:16:22 Done.
+ });
+ }, 'requests context');
jsbell 2015/04/06 17:04:14 Please give the test a more descriptive name, e.g.
shiva.jm 2015/04/09 09:16:22 Done.
+
+promise_test(function(t) {
jsbell 2015/04/06 17:04:14 What is this test verifying that's different than
shiva.jm 2015/04/09 09:16:22 Done.
+ var req = new Request('http://localhost/',
+ {method: 'POST',
+ body: new Blob([''], {type: 'Text/Plain'}),
+ headers: [['Content-Type', 'Text/Html']]});
+ return req.blob()
+ .then(function(blob) {
+ assert_equals(req.context, '');
+ });
+ }, 'requests context');
+
done();
« no previous file with comments | « no previous file | Source/modules/fetch/FetchManager.cpp » ('j') | Source/modules/fetch/FetchManager.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698