<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[182942] trunk/LayoutTests</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/182942">182942</a></dd>
<dt>Author</dt> <dd>calvaris@igalia.com</dd>
<dt>Date</dt> <dd>2015-04-17 03:03:35 -0700 (Fri, 17 Apr 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>streams/reference-implementation/readable-stream.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=143778

Unreviewed.

Comment out flaky subtests while working on a more complete
solution.

The problem with these tests is that they set a timeout before the
calling done() and this causes some tests to behave
undeterministically, specilly code related to promise
resolution. This could even cause indetermination if the tests
were expected to run correctly.

We think it is better to comment them out and find a more long
term solution that could involve submitting change requests to the
reference tests in the spec. This will be tackled in bug 143774.


* streams/reference-implementation/readable-stream-expected.txt:
* streams/reference-implementation/readable-stream-reader-expected.txt:
* streams/reference-implementation/readable-stream-reader.html:
* streams/reference-implementation/readable-stream-templated-expected.txt:
* streams/reference-implementation/readable-stream-templated.html:
* streams/reference-implementation/readable-stream.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationreadablestreamexpectedtxt">trunk/LayoutTests/streams/reference-implementation/readable-stream-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationreadablestreamreaderexpectedtxt">trunk/LayoutTests/streams/reference-implementation/readable-stream-reader-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationreadablestreamreaderhtml">trunk/LayoutTests/streams/reference-implementation/readable-stream-reader.html</a></li>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationreadablestreamtemplatedexpectedtxt">trunk/LayoutTests/streams/reference-implementation/readable-stream-templated-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationreadablestreamtemplatedhtml">trunk/LayoutTests/streams/reference-implementation/readable-stream-templated.html</a></li>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationreadablestreamhtml">trunk/LayoutTests/streams/reference-implementation/readable-stream.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (182941 => 182942)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-04-17 06:50:47 UTC (rev 182941)
+++ trunk/LayoutTests/ChangeLog        2015-04-17 10:03:35 UTC (rev 182942)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2015-04-17  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt; and Xabier Rodriguez Calvar &lt;calvaris@igalia.com&gt;
+
+        streams/reference-implementation/readable-stream.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=143778
+
+        Unreviewed.
+
+        Comment out flaky subtests while working on a more complete
+        solution.
+
+        The problem with these tests is that they set a timeout before the
+        calling done() and this causes some tests to behave
+        undeterministically, specilly code related to promise
+        resolution. This could even cause indetermination if the tests
+        were expected to run correctly.
+
+        We think it is better to comment them out and find a more long
+        term solution that could involve submitting change requests to the
+        reference tests in the spec. This will be tackled in bug 143774.
+
+        * streams/reference-implementation/readable-stream-expected.txt:
+        * streams/reference-implementation/readable-stream-reader-expected.txt:
+        * streams/reference-implementation/readable-stream-reader.html:
+        * streams/reference-implementation/readable-stream-templated-expected.txt:
+        * streams/reference-implementation/readable-stream-templated.html:
+        * streams/reference-implementation/readable-stream.html:
+
</ins><span class="cx"> 2015-04-16  Xabier Rodriguez Calvar  &lt;calvaris@igalia.com&gt; and Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt;
</span><span class="cx"> 
</span><span class="cx">         streams/readablestream-reader.html test should really test collected stream case.
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationreadablestreamexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/readable-stream-expected.txt (182941 => 182942)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/readable-stream-expected.txt        2015-04-17 06:50:47 UTC (rev 182941)
+++ trunk/LayoutTests/streams/reference-implementation/readable-stream-expected.txt        2015-04-17 10:03:35 UTC (rev 182942)
</span><span class="lines">@@ -10,14 +10,7 @@
</span><span class="cx"> FAIL ReadableStream should be able to enqueue different objects. read is not implemented
</span><span class="cx"> PASS ReadableStream: if start throws an error, it should be re-thrown 
</span><span class="cx"> FAIL ReadableStream: if pull rejects, it should error the stream read is not implemented
</span><del>-FAIL ReadableStream: should only call pull once upon starting the stream assert_equals: pull should be called once start finishes expected 1 but got 0
-FAIL ReadableStream: should only call pull once for a forever-empty stream, even after reading read is not implemented
-FAIL ReadableStream: should only call pull once on a non-empty stream read from before start fulfills read is not implemented
-FAIL ReadableStream: should only call pull twice on a non-empty stream read from after start fulfills assert_equals: pull should be called once start finishes expected 1 but got 0
-FAIL ReadableStream: should call pull in reaction to read()ing the last chunk, if not draining assert_equals: pull should have been called once after read expected 1 but got 0
-FAIL ReadableStream: should not call pull() in reaction to read()ing the last chunk, if draining assert_equals: pull should have been called once after read expected 1 but got 0
</del><span class="cx"> FAIL ReadableStream: should not call pull until the previous pull call's promise fulfills read is not implemented
</span><del>-FAIL ReadableStream: should pull after start, and after every read read is not implemented
</del><span class="cx"> FAIL ReadableStream: should not call pull after start if the stream is now closed read is not implemented
</span><span class="cx"> FAIL ReadableStream: should call pull after enqueueing from inside pull (with no read requests), if strategy allows assert_equals: pull() should have been called four times expected 4 but got 0
</span><span class="cx"> TIMEOUT ReadableStream pull should be able to close a stream. Test timed out
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationreadablestreamreaderexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/readable-stream-reader-expected.txt (182941 => 182942)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/readable-stream-reader-expected.txt        2015-04-17 06:50:47 UTC (rev 182941)
+++ trunk/LayoutTests/streams/reference-implementation/readable-stream-reader-expected.txt        2015-04-17 10:03:35 UTC (rev 182942)
</span><span class="lines">@@ -13,8 +13,6 @@
</span><span class="cx"> FAIL cancel() on a reader releases the reader before calling through cancel is not implemented
</span><span class="cx"> TIMEOUT closed should be fulfilled after stream is closed (.closed access before acquiring) Test timed out
</span><span class="cx"> FAIL closed should be fulfilled after reader releases its lock (multiple stream locks) releaseLock is not implemented
</span><del>-FAIL Multiple readers can access the stream in sequence read is not implemented
</del><span class="cx"> FAIL Cannot use an already-released reader to unlock a stream again releaseLock is not implemented
</span><del>-FAIL cancel() on a released reader is a no-op and does not pass through releaseLock is not implemented
</del><span class="cx"> FAIL Getting a second reader after erroring the stream should succeed read is not implemented
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationreadablestreamreaderhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/readable-stream-reader.html (182941 => 182942)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/readable-stream-reader.html        2015-04-17 06:50:47 UTC (rev 182941)
+++ trunk/LayoutTests/streams/reference-implementation/readable-stream-reader.html        2015-04-17 10:03:35 UTC (rev 182942)
</span><span class="lines">@@ -190,36 +190,36 @@
</span><span class="cx">     }));
</span><span class="cx"> });
</span><span class="cx"> 
</span><del>-var test5 = async_test('Multiple readers can access the stream in sequence');
-test5.step(function() {
-    var readCount = 0;
-    var rs = new ReadableStream({
-        start: function(c) {
-            c.enqueue('a');
-            c.enqueue('b');
-            c.close();
-        }
-    });
</del><ins>+// var test5 = async_test('Multiple readers can access the stream in sequence');
+// test5.step(function() {
+//     var readCount = 0;
+//     var rs = new ReadableStream({
+//         start: function(c) {
+//             c.enqueue('a');
+//             c.enqueue('b');
+//             c.close();
+//         }
+//     });
</ins><span class="cx"> 
</span><del>-    var reader1 = rs.getReader();
-    reader1.read().then(test5.step_func(function(r) {
-        assert_object_equals(r, { value: 'a', done: false }, 'reading the first chunk from reader1 works');
-        ++readCount;
-    }));
-    reader1.releaseLock();
</del><ins>+//     var reader1 = rs.getReader();
+//     reader1.read().then(test5.step_func(function(r) {
+//         assert_object_equals(r, { value: 'a', done: false }, 'reading the first chunk from reader1 works');
+//         ++readCount;
+//     }));
+//     reader1.releaseLock();
</ins><span class="cx"> 
</span><del>-    var reader2 = rs.getReader();
-    reader2.read().then(test5.step_func(function(r) {
-        assert_object_equals(r, { value: 'b', done: false }, 'reading the second chunk from reader2 works');
-        ++readCount;
-    }));
-    reader2.releaseLock();
</del><ins>+//     var reader2 = rs.getReader();
+//     reader2.read().then(test5.step_func(function(r) {
+//         assert_object_equals(r, { value: 'b', done: false }, 'reading the second chunk from reader2 works');
+//         ++readCount;
+//     }));
+//     reader2.releaseLock();
</ins><span class="cx"> 
</span><del>-    setTimeout(test5.step_func(function() {
-        assert_equals(readCount, 2);
-        test5.done();
-    }), standardTimeout);
-});
</del><ins>+//     setTimeout(test5.step_func(function() {
+//         assert_equals(readCount, 2);
+//         test5.done();
+//     }), standardTimeout);
+// });
</ins><span class="cx"> 
</span><span class="cx"> var test6 = async_test('Cannot use an already-released reader to unlock a stream again');
</span><span class="cx"> test6.step(function() {
</span><span class="lines">@@ -241,38 +241,38 @@
</span><span class="cx">     }));
</span><span class="cx"> });
</span><span class="cx"> 
</span><del>-var test7 = async_test('cancel() on a released reader is a no-op and does not pass through');
-test7.step(function() {
-    var readCounts = 0;
-    var cancelled = false;
-    var rs = new ReadableStream({
-        start: function(c) {
-            c.enqueue('a');
-        },
-        cancel: function() {
-            assert_unreached('underlying source cancel should not be called');
-        }
-    });
</del><ins>+// var test7 = async_test('cancel() on a released reader is a no-op and does not pass through');
+// test7.step(function() {
+//     var readCounts = 0;
+//     var cancelled = false;
+//     var rs = new ReadableStream({
+//         start: function(c) {
+//             c.enqueue('a');
+//         },
+//         cancel: function() {
+//             assert_unreached('underlying source cancel should not be called');
+//         }
+//     });
</ins><span class="cx"> 
</span><del>-    var reader = rs.getReader();
-    reader.releaseLock();
-    reader.cancel().then(test7.step_func(function(v) {
-        assert_equals(v, undefined, 'cancel() on the reader should fulfill with undefined')
-        cancelled = true;
-    }));
</del><ins>+//     var reader = rs.getReader();
+//     reader.releaseLock();
+//     reader.cancel().then(test7.step_func(function(v) {
+//         assert_equals(v, undefined, 'cancel() on the reader should fulfill with undefined')
+//         cancelled = true;
+//     }));
</ins><span class="cx"> 
</span><del>-    var reader2 = rs.getReader();
-    reader2.read().then(test7.step_func(function(r) {
-        assert_object_equals(r, { value: 'a', done: false }, 'a new reader should be able to read a chunk');
-        ++readCounts;
-    }));
</del><ins>+//     var reader2 = rs.getReader();
+//     reader2.read().then(test7.step_func(function(r) {
+//         assert_object_equals(r, { value: 'a', done: false }, 'a new reader should be able to read a chunk');
+//         ++readCounts;
+//     }));
</ins><span class="cx"> 
</span><del>-    setTimeout(test7.step_func(function() {
-        assert_true(cancelled);
-        assert_equals(readCounts, 1);
-        test7.done();
-    }), standardTimeout);
-});
</del><ins>+//     setTimeout(test7.step_func(function() {
+//         assert_true(cancelled);
+//         assert_equals(readCounts, 1);
+//         test7.done();
+//     }), standardTimeout);
+// });
</ins><span class="cx"> 
</span><span class="cx"> var test8 = async_test('Getting a second reader after erroring the stream should succeed');
</span><span class="cx"> test8.step(function() {
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationreadablestreamtemplatedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/readable-stream-templated-expected.txt (182941 => 182942)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/readable-stream-templated-expected.txt        2015-04-17 06:50:47 UTC (rev 182941)
+++ trunk/LayoutTests/streams/reference-implementation/readable-stream-templated-expected.txt        2015-04-17 10:03:35 UTC (rev 182942)
</span><span class="lines">@@ -3,11 +3,8 @@
</span><span class="cx"> PASS instances have the correct methods and properties 
</span><span class="cx"> PASS Running templatedRSEmptyReader with ReadableStream (empty) reader 
</span><span class="cx"> PASS instances have the correct methods and properties 
</span><del>-FAIL read() should never settle read is not implemented
-FAIL two read()s should both never settle read is not implemented
</del><span class="cx"> FAIL read() should return distinct promises each time read is not implemented
</span><span class="cx"> PASS getReader() again on the stream should fail 
</span><del>-FAIL releasing the lock with pending read requests should throw but the read requests should stay pending read is not implemented
</del><span class="cx"> FAIL releasing the lock should cause further read() calls to resolve as if the stream is closed releaseLock is not implemented
</span><span class="cx"> FAIL releasing the lock should cause closed to fulfill releaseLock is not implemented
</span><span class="cx"> FAIL canceling via the reader should cause the reader to act closed cancel is not implemented
</span><span class="lines">@@ -19,7 +16,6 @@
</span><span class="cx"> PASS Running templatedRSClosedReader with ReadableStream (closed via call in start) reader 
</span><span class="cx"> FAIL read() should fulfill with { value: undefined, done: true } read is not implemented
</span><span class="cx"> TIMEOUT closed should fulfill with undefined Test timed out
</span><del>-FAIL cancel() should return a distinct fulfilled promise each time cancel is not implemented
</del><span class="cx"> PASS Running templatedRSClosed with ReadableStream (closed via cancel) 
</span><span class="cx"> FAIL cancel() should return a distinct fulfilled promise each time cancel is not implemented
</span><span class="cx"> FAIL getReader() should be OK cancel is not implemented
</span><span class="lines">@@ -27,7 +23,6 @@
</span><span class="cx"> PASS Running templatedRSClosedReader with ReadableStream (closed via cancel) reader 
</span><span class="cx"> FAIL read() should fulfill with { value: undefined, done: true } cancel is not implemented
</span><span class="cx"> FAIL closed should fulfill with undefined cancel is not implemented
</span><del>-FAIL cancel() should return a distinct fulfilled promise each time cancel is not implemented
</del><span class="cx"> PASS Running templatedRSErrored with ReadableStream (errored via call in start) 
</span><span class="cx"> FAIL getReader() should return a reader that acts errored read is not implemented
</span><span class="cx"> PASS Running templatedRSErroredSyncOnly with ReadableStream (errored via call in start) 
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationreadablestreamtemplatedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/readable-stream-templated.html (182941 => 182942)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/readable-stream-templated.html        2015-04-17 06:50:47 UTC (rev 182941)
+++ trunk/LayoutTests/streams/reference-implementation/readable-stream-templated.html        2015-04-17 10:03:35 UTC (rev 182942)
</span><span class="lines">@@ -150,34 +150,34 @@
</span><span class="cx">         assert_equals(typeof reader.releaseLock, 'function', 'has a releaseLock method');
</span><span class="cx">     }, 'instances have the correct methods and properties');
</span><span class="cx"> 
</span><del>-    var test1 = async_test('read() should never settle');
-    test1.step(function() {
-        var { reader } = factory();
</del><ins>+    // var test1 = async_test('read() should never settle');
+    // test1.step(function() {
+    //     var { reader } = factory();
</ins><span class="cx"> 
</span><del>-        reader.read().then(
-            test1.step_func(function() { assert_unreached('read() should not fulfill'); }),
-            test1.step_func(function() { assert_unreached('read() should not reject'); })
-        );
</del><ins>+    //     reader.read().then(
+    //         test1.step_func(function() { assert_unreached('read() should not fulfill'); }),
+    //         test1.step_func(function() { assert_unreached('read() should not reject'); })
+    //     );
</ins><span class="cx"> 
</span><del>-        setTimeout(test1.step_func(function() { test1.done(); }), standardTimeout);
-    });
</del><ins>+    //     setTimeout(test1.step_func(function() { test1.done(); }), standardTimeout);
+    // });
</ins><span class="cx"> 
</span><del>-    var test2 = async_test('two read()s should both never settle');
-    test2.step(function() {
-        var { reader } = factory();
</del><ins>+    // var test2 = async_test('two read()s should both never settle');
+    // test2.step(function() {
+    //     var { reader } = factory();
</ins><span class="cx"> 
</span><del>-        reader.read().then(
-            test2.step_func(function() { assert_unreached('first read() should not fulfill'); }),
-            test2.step_func(function() { assert_unreached('first read() should not reject'); })
-        );
</del><ins>+    //     reader.read().then(
+    //         test2.step_func(function() { assert_unreached('first read() should not fulfill'); }),
+    //         test2.step_func(function() { assert_unreached('first read() should not reject'); })
+    //     );
</ins><span class="cx"> 
</span><del>-        reader.read().then(
-            test2.step_func(function() { assert_unreached('second read() should not fulfill'); }),
-            test2.step_func(function() { assert_unreached('second read() should not reject'); })
-        );
</del><ins>+    //     reader.read().then(
+    //         test2.step_func(function() { assert_unreached('second read() should not fulfill'); }),
+    //         test2.step_func(function() { assert_unreached('second read() should not reject'); })
+    //     );
</ins><span class="cx"> 
</span><del>-        setTimeout(test2.step_func(function() { test2.done(); }), standardTimeout);
-    });
</del><ins>+    //     setTimeout(test2.step_func(function() { test2.done(); }), standardTimeout);
+    // });
</ins><span class="cx"> 
</span><span class="cx">     test(function() {
</span><span class="cx">         var { reader } = factory();
</span><span class="lines">@@ -191,29 +191,29 @@
</span><span class="cx">         assert_throws(new TypeError(), function() { stream.getReader(); }, 'stream.getReader() should throw a TypeError');
</span><span class="cx">     }, 'getReader() again on the stream should fail');
</span><span class="cx"> 
</span><del>-    var test3 = async_test('releasing the lock with pending read requests should throw but the read requests should stay pending');
-    test3.step(function() {
-        var { reader } = factory();
</del><ins>+    // var test3 = async_test('releasing the lock with pending read requests should throw but the read requests should stay pending');
+    // test3.step(function() {
+    //     var { reader } = factory();
</ins><span class="cx"> 
</span><del>-        reader.read().then(
-            test3.step_func(function() { assert_unreached('first read() should not fulfill'); }),
-            test3.step_func(function() { assert_unreached('first read() should not reject'); })
-        );
</del><ins>+    //     reader.read().then(
+    //         test3.step_func(function() { assert_unreached('first read() should not fulfill'); }),
+    //         test3.step_func(function() { assert_unreached('first read() should not reject'); })
+    //     );
</ins><span class="cx"> 
</span><del>-        reader.read().then(
-            test3.step_func(function() { assert_unreached('second read() should not fulfill'); }),
-            test3.step_func(function() { assert_unreached('second read() should not reject'); })
-        );
</del><ins>+    //     reader.read().then(
+    //         test3.step_func(function() { assert_unreached('second read() should not fulfill'); }),
+    //         test3.step_func(function() { assert_unreached('second read() should not reject'); })
+    //     );
</ins><span class="cx"> 
</span><del>-        reader.closed.then(
-            test3.step_func(function() { assert_unreached('closed should not fulfill'); }),
-            test3.step_func(function() { assert_unreached('closed should not reject'); })
-        );
</del><ins>+    //     reader.closed.then(
+    //         test3.step_func(function() { assert_unreached('closed should not fulfill'); }),
+    //         test3.step_func(function() { assert_unreached('closed should not reject'); })
+    //     );
</ins><span class="cx"> 
</span><del>-        assert_throws(new TypeError(), test3.step_func(function() { reader.releaseLock(); }, 'releaseLock should throw a TypeError'));
</del><ins>+    //     assert_throws(new TypeError(), test3.step_func(function() { reader.releaseLock(); }, 'releaseLock should throw a TypeError'));
</ins><span class="cx"> 
</span><del>-        setTimeout(test3.step_func(function() { test3.done(); }), standardTimeout);
-    });
</del><ins>+    //     setTimeout(test3.step_func(function() { test3.done(); }), standardTimeout);
+    // });
</ins><span class="cx"> 
</span><span class="cx">     var test4 = async_test('releasing the lock should cause further read() calls to resolve as if the stream is closed');
</span><span class="cx">     test4.step(function() {
</span><span class="lines">@@ -304,32 +304,32 @@
</span><span class="cx">         );
</span><span class="cx">     });
</span><span class="cx"> 
</span><del>-    var test3 = async_test('cancel() should return a distinct fulfilled promise each time');
-    test3.step(function() {
-        var { reader } = factory();
-        var promiseCount = 0;
</del><ins>+    // var test3 = async_test('cancel() should return a distinct fulfilled promise each time');
+    // test3.step(function() {
+    //     var { reader } = factory();
+    //     var promiseCount = 0;
</ins><span class="cx"> 
</span><del>-        var cancelPromise1 = reader.cancel();
-        var cancelPromise2 = reader.cancel();
-        var closedReaderPromise = reader.closed;
</del><ins>+    //     var cancelPromise1 = reader.cancel();
+    //     var cancelPromise2 = reader.cancel();
+    //     var closedReaderPromise = reader.closed;
</ins><span class="cx"> 
</span><del>-        cancelPromise1.then(test3.step_func(function(v) {
-            assert_equals(v, undefined, 'first cancel() call should fulfill with undefined');
-            ++promiseCount;
-        }));
-        cancelPromise2.then(test3.step_func(function(v) {
-            assert_equals(v, undefined, 'second cancel() call should fulfill with undefined');
-            ++promiseCount;
-        }));
-        assert_not_equals(cancelPromise1, cancelPromise2, 'cancel() calls should return distinct promises');
-        assert_not_equals(cancelPromise1, closedReaderPromise, 'cancel() promise 1 should be distinct from reader.closed');
-        assert_not_equals(cancelPromise2, closedReaderPromise, 'cancel() promise 2 should be distinct from reader.closed');
</del><ins>+    //     cancelPromise1.then(test3.step_func(function(v) {
+    //         assert_equals(v, undefined, 'first cancel() call should fulfill with undefined');
+    //         ++promiseCount;
+    //     }));
+    //     cancelPromise2.then(test3.step_func(function(v) {
+    //         assert_equals(v, undefined, 'second cancel() call should fulfill with undefined');
+    //         ++promiseCount;
+    //     }));
+    //     assert_not_equals(cancelPromise1, cancelPromise2, 'cancel() calls should return distinct promises');
+    //     assert_not_equals(cancelPromise1, closedReaderPromise, 'cancel() promise 1 should be distinct from reader.closed');
+    //     assert_not_equals(cancelPromise2, closedReaderPromise, 'cancel() promise 2 should be distinct from reader.closed');
</ins><span class="cx"> 
</span><del>-        setTimeout(test3.step_func(function() {
-            assert_equals(promiseCount, 2);
-            test3.done();
-        }), standardTimeout);
-    });
</del><ins>+    //     setTimeout(test3.step_func(function() {
+    //         assert_equals(promiseCount, 2);
+    //         test3.done();
+    //     }), standardTimeout);
+    // });
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> function templatedRSErroredReader(label, factory, error) {
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationreadablestreamhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/readable-stream.html (182941 => 182942)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/readable-stream.html        2015-04-17 06:50:47 UTC (rev 182941)
+++ trunk/LayoutTests/streams/reference-implementation/readable-stream.html        2015-04-17 10:03:35 UTC (rev 182942)
</span><span class="lines">@@ -174,199 +174,199 @@
</span><span class="cx">     }));
</span><span class="cx"> });
</span><span class="cx"> 
</span><del>-var test5 = async_test('ReadableStream: should only call pull once upon starting the stream');
-test5.step(function() {
-    var pullCount = 0;
-    var startPromise = Promise.resolve();
-    var rs = new ReadableStream({
-        start: function() {
-            return startPromise;
-        },
-        pull: function() {
-            pullCount++;
-        }
-    });
</del><ins>+// var test5 = async_test('ReadableStream: should only call pull once upon starting the stream');
+// test5.step(function() {
+//     var pullCount = 0;
+//     var startPromise = Promise.resolve();
+//     var rs = new ReadableStream({
+//         start: function() {
+//             return startPromise;
+//         },
+//         pull: function() {
+//             pullCount++;
+//         }
+//     });
</ins><span class="cx"> 
</span><del>-    startPromise.then(test5.step_func(function() {
-        assert_equals(pullCount, 1, 'pull should be called once start finishes');
-    }));
</del><ins>+//     startPromise.then(test5.step_func(function() {
+//         assert_equals(pullCount, 1, 'pull should be called once start finishes');
+//     }));
</ins><span class="cx"> 
</span><del>-    setTimeout(test5.step_func(function() {
-        assert_equals(pullCount, 1, 'pull should be called exactly once');
-        test5.done();
-    }), standardTimeout);
-});
</del><ins>+//     setTimeout(test5.step_func(function() {
+//         assert_equals(pullCount, 1, 'pull should be called exactly once');
+//         test5.done();
+//     }), standardTimeout);
+// });
</ins><span class="cx"> 
</span><del>-var test6 = async_test('ReadableStream: should only call pull once for a forever-empty stream, even after reading');
-test6.step(function() {
-    var pullCount = 0;
-    var startPromise = Promise.resolve();
-    var rs = new ReadableStream({
-        start: function() {
-            return startPromise;
-        },
-        pull: function() {
-            pullCount++;
-        }
-    });
</del><ins>+// var test6 = async_test('ReadableStream: should only call pull once for a forever-empty stream, even after reading');
+// test6.step(function() {
+//     var pullCount = 0;
+//     var startPromise = Promise.resolve();
+//     var rs = new ReadableStream({
+//         start: function() {
+//             return startPromise;
+//         },
+//         pull: function() {
+//             pullCount++;
+//         }
+//     });
</ins><span class="cx"> 
</span><del>-    startPromise.then(test6.step_func(function() {
-        assert_equals(pullCount, 1, 'pull should be called once start finishes');
-    }));
</del><ins>+//     startPromise.then(test6.step_func(function() {
+//         assert_equals(pullCount, 1, 'pull should be called once start finishes');
+//     }));
</ins><span class="cx"> 
</span><del>-    rs.getReader().read();
</del><ins>+//     rs.getReader().read();
</ins><span class="cx"> 
</span><del>-    setTimeout(test6.step_func(function() {
-        assert_equals(pullCount, 1, 'pull should be called exactly once');
-        test6.done();
-    }), standardTimeout);
-});
</del><ins>+//     setTimeout(test6.step_func(function() {
+//         assert_equals(pullCount, 1, 'pull should be called exactly once');
+//         test6.done();
+//     }), standardTimeout);
+// });
</ins><span class="cx"> 
</span><del>-var test7 = async_test('ReadableStream: should only call pull once on a non-empty stream read from before start fulfills');
-test7.step(function() {
-    var pullCount = 0;
-    var startPromise = Promise.resolve();
-    var rs = new ReadableStream({
-        start: function(c) {
-            c.enqueue('a');
-            return startPromise;
-        },
-        pull: function() {
-            pullCount++;
-        }
-    });
</del><ins>+// var test7 = async_test('ReadableStream: should only call pull once on a non-empty stream read from before start fulfills');
+// test7.step(function() {
+//     var pullCount = 0;
+//     var startPromise = Promise.resolve();
+//     var rs = new ReadableStream({
+//         start: function(c) {
+//             c.enqueue('a');
+//             return startPromise;
+//         },
+//         pull: function() {
+//             pullCount++;
+//         }
+//     });
</ins><span class="cx"> 
</span><del>-    startPromise.then(test7.step_func(function() {
-        assert_equals(pullCount, 1, 'pull should be called once start finishes');
-    }));
</del><ins>+//     startPromise.then(test7.step_func(function() {
+//         assert_equals(pullCount, 1, 'pull should be called once start finishes');
+//     }));
</ins><span class="cx"> 
</span><del>-    rs.getReader().read().then(test7.step_func(function(r) {
-        assert_object_equals(r, { value: 'a', done: false }, 'first read() should return first chunk');
-        assert_equals(pullCount, 1, 'pull should not have been called again');
-    }));
</del><ins>+//     rs.getReader().read().then(test7.step_func(function(r) {
+//         assert_object_equals(r, { value: 'a', done: false }, 'first read() should return first chunk');
+//         assert_equals(pullCount, 1, 'pull should not have been called again');
+//     }));
</ins><span class="cx"> 
</span><del>-    assert_equals(pullCount, 0, 'calling read() should not cause pull to be called yet');
</del><ins>+//     assert_equals(pullCount, 0, 'calling read() should not cause pull to be called yet');
</ins><span class="cx"> 
</span><del>-    setTimeout(test7.step_func(function() {
-        assert_equals(pullCount, 1, 'pull should be called exactly once');
-        test7.done();
-    }), standardTimeout);
-});
</del><ins>+//     setTimeout(test7.step_func(function() {
+//         assert_equals(pullCount, 1, 'pull should be called exactly once');
+//         test7.done();
+//     }), standardTimeout);
+// });
</ins><span class="cx"> 
</span><del>-var test8 = async_test('ReadableStream: should only call pull twice on a non-empty stream read from after start fulfills');
-test8.step(function() {
-    var pullCount = 0;
-    var startPromise = Promise.resolve();
-    var rs = new ReadableStream({
-        start: function(c) {
-            c.enqueue('a');
-            return startPromise;
-        },
-        pull: function() {
-            pullCount++;
-        }
-    });
</del><ins>+// var test8 = async_test('ReadableStream: should only call pull twice on a non-empty stream read from after start fulfills');
+// test8.step(function() {
+//     var pullCount = 0;
+//     var startPromise = Promise.resolve();
+//     var rs = new ReadableStream({
+//         start: function(c) {
+//             c.enqueue('a');
+//             return startPromise;
+//         },
+//         pull: function() {
+//             pullCount++;
+//         }
+//     });
</ins><span class="cx"> 
</span><del>-    startPromise.then(test8.step_func(function() {
-        assert_equals(pullCount, 1, 'pull should be called once start finishes');
</del><ins>+//     startPromise.then(test8.step_func(function() {
+//         assert_equals(pullCount, 1, 'pull should be called once start finishes');
</ins><span class="cx"> 
</span><del>-        rs.getReader().read().then(test8.step_func(function(r) {
-            assert_object_equals(r, { value: 'a', done: false }, 'first read() should return first chunk');
-            assert_equals(pullCount, 2, 'pull should be called again once read fulfills');
-        }));
-    }));
</del><ins>+//         rs.getReader().read().then(test8.step_func(function(r) {
+//             assert_object_equals(r, { value: 'a', done: false }, 'first read() should return first chunk');
+//             assert_equals(pullCount, 2, 'pull should be called again once read fulfills');
+//         }));
+//     }));
</ins><span class="cx"> 
</span><del>-    assert_equals(pullCount, 0, 'calling read() should not cause pull to be called yet');
</del><ins>+//     assert_equals(pullCount, 0, 'calling read() should not cause pull to be called yet');
</ins><span class="cx"> 
</span><del>-    setTimeout(test8.step_func(function() {
-        assert_equals(pullCount, 2, 'pull should be called exactly twice')
-        test8.done();
-    }), standardTimeout);
-});
</del><ins>+//     setTimeout(test8.step_func(function() {
+//         assert_equals(pullCount, 2, 'pull should be called exactly twice')
+//         test8.done();
+//     }), standardTimeout);
+// });
</ins><span class="cx"> 
</span><del>-var test9 = async_test('ReadableStream: should call pull in reaction to read()ing the last chunk, if not draining');
-test9.step(function() {
-    var pullCount = 0;
-    var controller;
-    var startPromise = Promise.resolve();
-    var pullPromise = Promise.resolve();
-    var rs = new ReadableStream({
-        start: function(c) {
-            controller = c;
-            return startPromise;
-        },
-        pull: function() {
-            ++pullCount;
-            return pullPromise;
-        }
-    });
</del><ins>+// var test9 = async_test('ReadableStream: should call pull in reaction to read()ing the last chunk, if not draining');
+// test9.step(function() {
+//     var pullCount = 0;
+//     var controller;
+//     var startPromise = Promise.resolve();
+//     var pullPromise = Promise.resolve();
+//     var rs = new ReadableStream({
+//         start: function(c) {
+//             controller = c;
+//             return startPromise;
+//         },
+//         pull: function() {
+//             ++pullCount;
+//             return pullPromise;
+//         }
+//     });
</ins><span class="cx"> 
</span><del>-    var reader = rs.getReader();
</del><ins>+//     var reader = rs.getReader();
</ins><span class="cx"> 
</span><del>-    startPromise.then(test9.step_func(function() {
-        assert_equals(pullCount, 1, 'pull should have been called once after read');
</del><ins>+//     startPromise.then(test9.step_func(function() {
+//         assert_equals(pullCount, 1, 'pull should have been called once after read');
</ins><span class="cx"> 
</span><del>-        controller.enqueue('a');
</del><ins>+//         controller.enqueue('a');
</ins><span class="cx"> 
</span><del>-        return pullPromise.then(test9.step_func(function() {
-            assert_equals(pullCount, 2, 'pull should have been called a second time after enqueue');
</del><ins>+//         return pullPromise.then(test9.step_func(function() {
+//             assert_equals(pullCount, 2, 'pull should have been called a second time after enqueue');
</ins><span class="cx"> 
</span><del>-            return reader.read().then(test9.step_func(function() {
-                assert_equals(pullCount, 3, 'pull should have been called a third time after read');
-            }));
-        }));
-    })).catch(test9.step_func(function(e) {
-        assert_unreached(e);
-    }));
</del><ins>+//             return reader.read().then(test9.step_func(function() {
+//                 assert_equals(pullCount, 3, 'pull should have been called a third time after read');
+//             }));
+//         }));
+//     })).catch(test9.step_func(function(e) {
+//         assert_unreached(e);
+//     }));
</ins><span class="cx"> 
</span><del>-    setTimeout(test9.step_func(function() {
-        assert_equals(pullCount, 3, 'pull should be called exactly thrice')
-        test9.done();
-    }), standardTimeout);
-});
</del><ins>+//     setTimeout(test9.step_func(function() {
+//         assert_equals(pullCount, 3, 'pull should be called exactly thrice')
+//         test9.done();
+//     }), standardTimeout);
+// });
</ins><span class="cx"> 
</span><del>-var test10 = async_test('ReadableStream: should not call pull() in reaction to read()ing the last chunk, if draining');
-test10.step(function() {
-    var pullCount = 0;
-    var controller;
-    var startPromise = Promise.resolve();
-    var pullPromise = Promise.resolve();
-    var rs = new ReadableStream({
-        start: function(c) {
-            controller = c;
-            return startPromise;
-        },
-        pull: function() {
-            ++pullCount;
-            return pullPromise;
-        }
-    });
</del><ins>+// var test10 = async_test('ReadableStream: should not call pull() in reaction to read()ing the last chunk, if draining');
+// test10.step(function() {
+//     var pullCount = 0;
+//     var controller;
+//     var startPromise = Promise.resolve();
+//     var pullPromise = Promise.resolve();
+//     var rs = new ReadableStream({
+//         start: function(c) {
+//             controller = c;
+//             return startPromise;
+//         },
+//         pull: function() {
+//             ++pullCount;
+//             return pullPromise;
+//         }
+//     });
</ins><span class="cx"> 
</span><del>-    var reader = rs.getReader();
</del><ins>+//     var reader = rs.getReader();
</ins><span class="cx"> 
</span><del>-    startPromise.then(test10.step_func(function() {
-        assert_equals(pullCount, 1, 'pull should have been called once after read');
</del><ins>+//     startPromise.then(test10.step_func(function() {
+//         assert_equals(pullCount, 1, 'pull should have been called once after read');
</ins><span class="cx"> 
</span><del>-        controller.enqueue('a');
</del><ins>+//         controller.enqueue('a');
</ins><span class="cx"> 
</span><del>-        return pullPromise.then(test10.step_func(function() {
-            assert_equals(pullCount, 2, 'pull should have been called a second time after enqueue');
</del><ins>+//         return pullPromise.then(test10.step_func(function() {
+//             assert_equals(pullCount, 2, 'pull should have been called a second time after enqueue');
</ins><span class="cx"> 
</span><del>-            controller.close();
</del><ins>+//             controller.close();
</ins><span class="cx"> 
</span><del>-            return reader.read().then(test10.step_func(function() {
-                assert_equals(pullCount, 2, 'pull should not have been called a third time after read');
-            }));
-        }));
-    })).catch(test10.step_func(function(e) {
-        assert_unreached(e)
-    }));
</del><ins>+//             return reader.read().then(test10.step_func(function() {
+//                 assert_equals(pullCount, 2, 'pull should not have been called a third time after read');
+//             }));
+//         }));
+//     })).catch(test10.step_func(function(e) {
+//         assert_unreached(e)
+//     }));
</ins><span class="cx"> 
</span><del>-    setTimeout(test10.step_func(function() {
-        assert_equals(pullCount, 2, 'pull should be called exactly twice')
-        test10.done();
-    }), standardTimeout);
-});
</del><ins>+//     setTimeout(test10.step_func(function() {
+//         assert_equals(pullCount, 2, 'pull should be called exactly twice')
+//         test10.done();
+//     }), standardTimeout);
+// });
</ins><span class="cx"> 
</span><span class="cx"> var test11 = async_test('ReadableStream: should not call pull until the previous pull call\'s promise fulfills');
</span><span class="cx"> test11.step(function() {
</span><span class="lines">@@ -408,51 +408,51 @@
</span><span class="cx">     }));
</span><span class="cx"> });
</span><span class="cx"> 
</span><del>-var test12 = async_test('ReadableStream: should pull after start, and after every read');
-test12.step(function() {
-    var timesCalled = 0;
-    var startPromise = Promise.resolve();
-    var rs = new ReadableStream({
-        start: function(c) {
-            c.enqueue('a');
-            c.enqueue('b');
-            c.enqueue('c');
-            return startPromise;
-        },
-        pull: function() {
-            ++timesCalled;
-        },
-        strategy: {
-            size: function() {
-                return 1;
-            },
-            shouldApplyBackpressure: function() {
-                return false;
-            }
-        }
-    });
-    var reader = rs.getReader();
</del><ins>+// var test12 = async_test('ReadableStream: should pull after start, and after every read');
+// test12.step(function() {
+//     var timesCalled = 0;
+//     var startPromise = Promise.resolve();
+//     var rs = new ReadableStream({
+//         start: function(c) {
+//             c.enqueue('a');
+//             c.enqueue('b');
+//             c.enqueue('c');
+//             return startPromise;
+//         },
+//         pull: function() {
+//             ++timesCalled;
+//         },
+//         strategy: {
+//             size: function() {
+//                 return 1;
+//             },
+//             shouldApplyBackpressure: function() {
+//                 return false;
+//             }
+//         }
+//     });
+//     var reader = rs.getReader();
</ins><span class="cx"> 
</span><del>-    startPromise.then(test12.step_func(function() {
-        return reader.read().then(test12.step_func(function(result1) {
-            assert_object_equals(result1, { value: 'a', done: false }, 'first chunk should be as expected');
</del><ins>+//     startPromise.then(test12.step_func(function() {
+//         return reader.read().then(test12.step_func(function(result1) {
+//             assert_object_equals(result1, { value: 'a', done: false }, 'first chunk should be as expected');
</ins><span class="cx"> 
</span><del>-            return reader.read().then(test12.step_func(function(result2) {
-                assert_object_equals(result2, { value: 'b', done: false }, 'second chunk should be as expected');
</del><ins>+//             return reader.read().then(test12.step_func(function(result2) {
+//                 assert_object_equals(result2, { value: 'b', done: false }, 'second chunk should be as expected');
</ins><span class="cx"> 
</span><del>-                return reader.read().then(test12.step_func(function(result3) {
-                    assert_object_equals(result3, { value: 'c', done: false }, 'third chunk should be as expected');
</del><ins>+//                 return reader.read().then(test12.step_func(function(result3) {
+//                     assert_object_equals(result3, { value: 'c', done: false }, 'third chunk should be as expected');
</ins><span class="cx"> 
</span><del>-                    setTimeout(test12.step_func(function() {
-                        // Once for after start, and once for every read.
-                        assert_equals(timesCalled, 4, 'pull() should be called exactly four times');
-                        test12.done();
-                    }), standardTimeout);
-                }));
-            }));
-        }));
-    })).catch(test12.step_func(function(e) { assert_unreached(e); }));
-});
</del><ins>+//                     setTimeout(test12.step_func(function() {
+//                         // Once for after start, and once for every read.
+//                         assert_equals(timesCalled, 4, 'pull() should be called exactly four times');
+//                         test12.done();
+//                     }), standardTimeout);
+//                 }));
+//             }));
+//         }));
+//     })).catch(test12.step_func(function(e) { assert_unreached(e); }));
+// });
</ins><span class="cx"> 
</span><span class="cx"> var test13 = async_test('ReadableStream: should not call pull after start if the stream is now closed');
</span><span class="cx"> test13.step(function() {
</span></span></pre>
</div>
</div>

</body>
</html>