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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/body-mixin.js

Issue 1920703002: [Fetch API] Fix leaky layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/response.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/body-mixin.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/body-mixin.js b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/body-mixin.js
index bf42d0cddae6b1e4c2748890a49cec8bf17d8361..c391b7930e48992072dad6d4a30f56cd717e5d95 100644
--- a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/body-mixin.js
+++ b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/body-mixin.js
@@ -260,32 +260,37 @@ promise_test(t => {
promise_test(t => {
var res = new Response('');
- res.body.getReader();
+ const reader = res.body.getReader();
return res.arrayBuffer().then(unreached_fulfillment(t), e => {
+ // TODO(yhirano): Use finally when it's available. Ditto below.
+ reader.releaseLock();
assert_equals(e.name, 'TypeError');
});
}, 'Locked => arrayBuffer');
promise_test(t => {
var res = new Response('');
- res.body.getReader();
+ const reader = res.body.getReader();
return res.blob().then(unreached_fulfillment(t), e => {
+ reader.releaseLock();
assert_equals(e.name, 'TypeError');
});
}, 'Locked => blob');
promise_test(t => {
var res = new Response('');
- res.body.getReader();
+ const reader = res.body.getReader();
return res.json().then(unreached_fulfillment(t), e => {
+ reader.releaseLock();
assert_equals(e.name, 'TypeError');
});
}, 'Locked => json');
promise_test(t => {
var res = new Response('');
- res.body.getReader();
+ const reader = res.body.getReader();
return res.text().then(unreached_fulfillment(t), e => {
+ reader.releaseLock();
assert_equals(e.name, 'TypeError');
});
}, 'Locked => text');
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/response.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698