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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/streams/readable-streams/bad-underlying-sources.js

Issue 1902673003: Reflect recent spec changes to V8 Extra ReadableStream impl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed build Created 4 years, 7 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
Index: third_party/WebKit/LayoutTests/http/tests/streams/readable-streams/bad-underlying-sources.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/streams/readable-streams/bad-underlying-sources.js b/third_party/WebKit/LayoutTests/http/tests/streams/readable-streams/bad-underlying-sources.js
index f2fd0fdc9299d5d5de4f5628dd19d59fd29300da..b95b54bc7fc9a6f1446b06b85a47efe9c2dc9611 100644
--- a/third_party/WebKit/LayoutTests/http/tests/streams/readable-streams/bad-underlying-sources.js
+++ b/third_party/WebKit/LayoutTests/http/tests/streams/readable-streams/bad-underlying-sources.js
@@ -153,11 +153,11 @@ promise_test(() => {
});
rs.cancel();
- controller.enqueue('a'); // Calling enqueue after canceling should not throw anything.
+ assert_throws(new TypeError, () => controller.enqueue('a'), 'Calling enqueue after canceling should throw');
return rs.getReader().closed;
-}, 'Underlying source: calling enqueue on an empty canceled stream should not throw');
+}, 'Underlying source: calling enqueue on an empty canceled stream should throw');
promise_test(() => {
@@ -171,11 +171,11 @@ promise_test(() => {
});
rs.cancel();
- controller.enqueue('c'); // Calling enqueue after canceling should not throw anything.
+ assert_throws(new TypeError, () => controller.enqueue('c'), 'Calling enqueue after canceling should throw');
return rs.getReader().closed;
-}, 'Underlying source: calling enqueue on a non-empty canceled stream should not throw');
+}, 'Underlying source: calling enqueue on a non-empty canceled stream should throw');
promise_test(() => {
@@ -194,7 +194,7 @@ promise_test(t => {
const closed = new ReadableStream({
start(c) {
c.error(theError);
- assert_throws(theError, () => c.enqueue('a'), 'call to enqueue should throw the error');
+ assert_throws(new TypeError(), () => c.enqueue('a'), 'call to enqueue should throw the error');
}
}).getReader().closed;
@@ -251,13 +251,13 @@ promise_test(() => {
});
rs.cancel();
- controller.close(); // Calling close after canceling should not throw anything.
+ assert_throws(new TypeError(), () => controller.close(), 'Calling close after canceling should throw');
return rs.getReader().closed.then(() => {
assert_true(startCalled);
});
-}, 'Underlying source: calling close on an empty canceled stream should not throw');
+}, 'Underlying source: calling close on an empty canceled stream should throw');
promise_test(() => {
@@ -272,13 +272,13 @@ promise_test(() => {
});
rs.cancel();
- controller.close(); // Calling close after canceling should not throw anything.
+ assert_throws(new TypeError(), () => controller.close(), 'Calling close after canceling should throw');
return rs.getReader().closed.then(() => {
assert_true(startCalled);
});
-}, 'Underlying source: calling close on a non-empty canceled stream should not throw');
+}, 'Underlying source: calling close on a non-empty canceled stream should throw');
promise_test(() => {

Powered by Google App Engine
This is Rietveld 408576698