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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/streams/resources/rs-test-templates.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/resources/rs-test-templates.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/streams/resources/rs-test-templates.js b/third_party/WebKit/LayoutTests/http/tests/streams/resources/rs-test-templates.js
index 23e44ec1d35ce5c7c3010d84ad09571bf176c208..6fe86a246ea591502c079e4724c6bce8b97a05bc 100644
--- a/third_party/WebKit/LayoutTests/http/tests/streams/resources/rs-test-templates.js
+++ b/third_party/WebKit/LayoutTests/http/tests/streams/resources/rs-test-templates.js
@@ -17,6 +17,16 @@ self.templatedRSEmpty = (label, factory) => {
assert_equals(typeof rs.tee, 'function', 'has a tee method');
}, 'instances have the correct methods and properties');
+
+ test(() => {
+ const rs = factory();
+
+ assert_throws(new RangeError(), () => rs.getReader({ mode: '' }), 'empty string mode should throw');
+ assert_throws(new RangeError(), () => rs.getReader({ mode: null }), 'null mode should throw');
+ assert_throws(new RangeError(), () => rs.getReader({ mode: 'asdf' }), 'asdf mode should throw');
+ assert_throws(new TypeError(), () => rs.getReader(null), 'null should throw');
+
+ }, 'calling getReader with invalid arguments should throw appropriate errors');
};
self.templatedRSClosed = (label, factory) => {

Powered by Google App Engine
This is Rietveld 408576698