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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/respond-with-response-body-with-invalid-chunk.html

Issue 2146773002: [Stream] Notify ReadObserver of Stream abortion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: done Created 4 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <meta charset="utf-8"> 2 <meta charset="utf-8">
3 <title>request body</title> 3 <title>respondWith with response body having invalid chunks</title>
4 <script src="../resources/testharness.js"></script> 4 <script src="/resources/testharness.js"></script>
5 <script src="../resources/testharnessreport.js"></script> 5 <script src="/resources/testharnessreport.js"></script>
6 <script src="resources/test-helpers.js"></script> 6 <script src="resources/test-helpers.js"></script>
7 <script> 7 <script>
8 const WORKER =
9 'resources/respond-with-response-body-with-invalid-chunk-worker.js';
10 const SCOPE =
11 'resources/respond-with-response-body-with-invalid-chunk-iframe.html';
8 var resolve_done; 12 var resolve_done;
9 var done_was_called = new Promise(resolve => resolve_done = resolve); 13 var done_was_called = new Promise(resolve => resolve_done = resolve);
10 // Called by the iframe when done. 14 // Called by the iframe when done.
11 function done(result) { resolve_done(result); } 15 function done(result) { resolve_done(result); }
12 16
13 // This test creates an controlled iframe that does a request with a request 17 // This test creates an controlled iframe that does a request with a request
14 // body blob. The service worker confirms it can read the blob and responds 18 // body blob. The service worker confirms it can read the blob and responds
falken 2016/07/14 13:00:43 This description doesn't seem to match this test.
yhirano 2016/07/14 13:30:54 Done.
15 // with 'Pass'. 19 // with 'PASS'.
16 promise_test(t => { 20 promise_test(t => {
17 var worker = 'resources/request-body-blob-worker.js'; 21 return service_worker_unregister_and_register(t, WORKER, SCOPE)
18 var scope = 'resources/request-body-blob-iframe.html';
19 return service_worker_unregister_and_register(t, worker, scope)
20 .then(reg => { 22 .then(reg => {
21 add_completion_callback(() => reg.unregister()); 23 add_completion_callback(() => reg.unregister());
22 return wait_for_state(t, reg.installing, 'activated'); 24 return wait_for_state(t, reg.installing, 'activated');
23 }) 25 })
24 .then(() => with_iframe(scope)) 26 .then(() => with_iframe(SCOPE))
25 .then(() => done_was_called) 27 .then(() => done_was_called)
26 .then(result => assert_equals(result, 'Pass')); 28 .then(result => assert_equals(result, 'PASS'));
27 }, 'Service worker can read the request body blob'); 29 }, 'Response with a ReadableStream having non-Uint8Array chunks should be tran sferred as errored');
28 </script> 30 </script>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/respond-with-response-body-with-invalid-chunk-worker.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698