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

Side by Side Diff: LayoutTests/streams/basic.html

Issue 1167343002: Add methods for creating V8 extras-based ReadableStreams from C++ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>basic</title>
5 <script src="../resources/testharness.js"></script>
6 <script src="../resources/testharnessreport.js"></script>
7 </head>
8 <body>
9
10 <div id="container"></div>
11 <pre id="console"></pre>
12
13 <script>
14 "use strict";
15
16 test(function () {
17 assert_equals(internals.readableStream.constructor.name, "ReadableStream");
18 }, "internals.readableStream should be a ReadableStream");
19
20 promise_test(function () {
21 const reader = internals.readableStream.getReader();
22
23 return reader.read().then(function (result1) {
24 assert_equals(result1.value, "a");
25 assert_equals(result1.done, false);
26
27 return reader.read();
28 })
29 .then(function (result2) {
30 assert_equals(result2.value, "b");
31 assert_equals(result2.done, false);
32
33 return reader.read();
34 })
35 .then(function (result3) {
36 assert_equals(result3.value, undefined);
37 assert_equals(result3.done, true);
38 });
39 }, "reading from internals.readableStream should give the expected sequence");
40
41 </script>
42 </body>
43
44 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/streams/basic-expected.txt » ('j') | Source/core/streams/QueuingStrategyBase.idl » ('J')

Powered by Google App Engine
This is Rietveld 408576698