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

Side by Side Diff: LayoutTests/http/tests/fetch/script-tests/request.js

Issue 1292503002: [Fetch] Unship Request.context (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Created 5 years, 4 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 unified diff | Download patch
OLDNEW
1 if (self.importScripts) { 1 if (self.importScripts) {
2 importScripts('../resources/fetch-test-helpers.js'); 2 importScripts('../resources/fetch-test-helpers.js');
3 } 3 }
4 4
5 var URL = 'https://www.example.com/test.html'; 5 var URL = 'https://www.example.com/test.html';
6 6
7 test(function() { 7 test(function() {
8 var headers = new Headers; 8 var headers = new Headers;
9 headers.set('User-Agent', 'Mozilla/5.0'); 9 headers.set('User-Agent', 'Mozilla/5.0');
10 headers.set('Accept', 'text/html'); 10 headers.set('Accept', 'text/html');
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 assert_equals(text, 'hello'); 629 assert_equals(text, 'hello');
630 var req2 = new Request(req); 630 var req2 = new Request(req);
631 assert_true(req.bodyUsed); 631 assert_true(req.bodyUsed);
632 assert_false(req2.bodyUsed); 632 assert_false(req2.bodyUsed);
633 return req2.text(); 633 return req2.text();
634 }).then(function(text) { 634 }).then(function(text) {
635 assert_equals(text, ''); 635 assert_equals(text, '');
636 }); 636 });
637 }, 'Consume and pass'); 637 }, 'Consume and pass');
638 638
639 // Tests for requests context.
640 test(function() {
641 var request = new Request('http://localhost/', {method: 'POST', body: ''});
642 assert_equals(request.context, '',
643 'Request.context should be empty string ' +
644 'for synthetic Request object');
645 }, 'RequestContext of a synthetic Request object');
646
647 done(); 639 done();
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/fetch/script-tests/fetch.js ('k') | LayoutTests/http/tests/serviceworker/fetch-request-resources.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698