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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/fetch/api/basic/error-after-response.html

Issue 2778753002: Import //fetch from Web Platform Tests. (Closed)
Patch Set: Baselines. Created 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <html>
3 <head>
4 <title>Fetch: network timeout after receiving the HTTP response headers</tit le>
5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script>
7 <script src="../resources/utils.js"></script>
8 </head>
9 <body>
10 <div id="log"></div>
11 <script>
12 function checkReader(test, reader, promiseToTest)
13 {
14 return reader.read().then((value) => {
15 validateBufferFromString(value.value, "TEST_CHUNK", "Should receive firs t chunk");
16 return promise_rejects(test, new TypeError(), promiseToTest(reader));
17 });
18 }
19
20 promise_test((test) => {
21 return fetch("../resources/bad-chunk-encoding.py?count=1").then((response) = > {
22 return checkReader(test, response.body.getReader(), reader => reader.rea d());
23 });
24 }, "Response reader read() promise should reject after a network error happening after resolving fetch promise");
25
26 promise_test((test) => {
27 return fetch("../resources/bad-chunk-encoding.py?count=1").then((response) = > {
28 return checkReader(test, response.body.getReader(), reader => reader.clo sed);
29 });
30 }, "Response reader closed promise should reject after a network error happening after resolving fetch promise");
31 </script>
32 </body>
33 </html>
34
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698