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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/streams/chromium/err-invalid-hwm.html

Issue 2933853003: Streams: Fix exception message for NaN HWM (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/streams/ReadableStream.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <meta charset="utf-8">
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <script>
6 // These are a regression tests for
7 // https://bugs.chromium.org/p/chromium/issues/detail?id=719763. Checking the
8 // message text of exceptions is not normally good practice but here it is the
9 // only way to verify that the bug is fixed.
10
11 test(() => {
12 try {
13 new ReadableStream({}, {highWaterMark: NaN});
14 assert_unreached('constructing with invalid highWaterMark should throw');
15 } catch (e) {
16 assert_equals(
17 e.message,
18 'A queueing strategy\'s highWaterMark property must be a nonnegative,' +
19 ' non-NaN number',
20 'message should be relevant');
21 }
22 }, 'ReadableStream RangeError on invalid highWaterMark should have an ' +
23 'appropriate message');
24
25 test(() => {
26 try {
27 new WritableStream({}, {highWaterMark: NaN});
28 assert_unreached('constructing with invalid highWaterMark should throw');
29 } catch (e) {
30 assert_equals(
31 e.message,
32 'A queueing strategy\'s highWaterMark property must be a nonnegative,' +
33 ' non-NaN number',
34 'message should be relevant');
35 }
36 }, 'WritableStream RangeError on invalid highWaterMark should have an ' +
37 'appropriate message');
38 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/streams/ReadableStream.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698