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

Side by Side Diff: LayoutTests/http/tests/cachestorage/script-tests/cache-put.js

Issue 1192913007: Change BodyStreamBuffer to be FetchDataConsumerHandle-based and enable backpressure in Fetch API (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Created 5 years, 5 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
« no previous file with comments | « no previous file | Source/modules/cachestorage/Cache.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 if (self.importScripts) { 1 if (self.importScripts) {
2 importScripts('/resources/testharness.js'); 2 importScripts('/resources/testharness.js');
3 importScripts('/resources/testharness-helpers.js'); 3 importScripts('/resources/testharness-helpers.js');
4 importScripts('../resources/test-helpers.js'); 4 importScripts('../resources/test-helpers.js');
5 } 5 }
6 6
7 var test_url = 'https://example.com/foo'; 7 var test_url = 'https://example.com/foo';
8 var test_body = 'Hello world!'; 8 var test_body = 'Hello world!';
9 9
10 cache_test(function(cache) { 10 cache_test(function(cache) {
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 'Response.bodyUsed should be initially false.'); 284 'Response.bodyUsed should be initially false.');
285 return response.text().then(function() { 285 return response.text().then(function() {
286 assert_false( 286 assert_false(
287 response.bodyUsed, 287 response.bodyUsed,
288 '[https://fetch.spec.whatwg.org/#concept-body-consume-body] ' + 288 '[https://fetch.spec.whatwg.org/#concept-body-consume-body] ' +
289 'The text() method should not set "body passed" flag.'); 289 'The text() method should not set "body passed" flag.');
290 return cache.put(new Request(test_url), response); 290 return cache.put(new Request(test_url), response);
291 }); 291 });
292 }, 'Cache.put with a used response body'); 292 }, 'Cache.put with a used response body');
293 293
294 cache_test(function(cache) {
295 var response = new Response(test_body);
296 return cache.put(new Request(test_url), response)
297 .then(function() {
298 return response.body.getReader().closed;
299 });
300 }, 'getReader() after Cache.put');
301
294 done(); 302 done();
OLDNEW
« no previous file with comments | « no previous file | Source/modules/cachestorage/Cache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698