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

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: Remove C++ queuing strategies 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 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4
5 <div id="container">
6 <div id="element"></div>
7 </div>
8
9 <script>
10 "use strict";
11
12 test(function () {
13 assert_equals(internals.readableStream.constructor.name, "ReadableStream");
14 }, "internals.readableStream should be a ReadableStream");
15
16 promise_test(function () {
17 const reader = internals.readableStream.getReader();
18
19 return reader.read().then(function (result1) {
20 assert_equals(result1.value, "a");
21 assert_equals(result1.done, false);
22
23 return reader.read();
24 })
25 .then(function (result2) {
26 assert_equals(result2.value, "b");
27 assert_equals(result2.done, false);
28
29 return reader.read();
30 })
31 .then(function (result3) {
32 assert_equals(result3.value, undefined);
33 assert_equals(result3.done, true);
34 });
35 }, "reading from internals.readableStream should give the expected sequence");
36
37 </script>
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/core/v8/ScriptState.h » ('j') | Source/core/streams/UnderlyingSourceBase.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698