| Index: third_party/WebKit/LayoutTests/http/tests/streams/chromium/err-invalid-hwm.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/streams/chromium/err-invalid-hwm.html b/third_party/WebKit/LayoutTests/http/tests/streams/chromium/err-invalid-hwm.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..07dd7652381d7ad515f24f3a24ae426c00a72c3b
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/streams/chromium/err-invalid-hwm.html
|
| @@ -0,0 +1,38 @@
|
| +<!DOCTYPE html>
|
| +<meta charset="utf-8">
|
| +<script src="/resources/testharness.js"></script>
|
| +<script src="/resources/testharnessreport.js"></script>
|
| +<script>
|
| +// These are a regression tests for
|
| +// https://bugs.chromium.org/p/chromium/issues/detail?id=719763. Checking the
|
| +// message text of exceptions is not normally good practice but here it is the
|
| +// only way to verify that the bug is fixed.
|
| +
|
| +test(() => {
|
| + try {
|
| + new ReadableStream({}, {highWaterMark: NaN});
|
| + assert_unreached('constructing with invalid highWaterMark should throw');
|
| + } catch (e) {
|
| + assert_equals(
|
| + e.message,
|
| + 'A queueing strategy\'s highWaterMark property must be a nonnegative,' +
|
| + ' non-NaN number',
|
| + 'message should be relevant');
|
| + }
|
| +}, 'ReadableStream RangeError on invalid highWaterMark should have an ' +
|
| + 'appropriate message');
|
| +
|
| +test(() => {
|
| + try {
|
| + new WritableStream({}, {highWaterMark: NaN});
|
| + assert_unreached('constructing with invalid highWaterMark should throw');
|
| + } catch (e) {
|
| + assert_equals(
|
| + e.message,
|
| + 'A queueing strategy\'s highWaterMark property must be a nonnegative,' +
|
| + ' non-NaN number',
|
| + 'message should be relevant');
|
| + }
|
| +}, 'WritableStream RangeError on invalid highWaterMark should have an ' +
|
| + 'appropriate message');
|
| +</script>
|
|
|