<!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>[182629] 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/182629">182629</a></dd>
<dt>Author</dt> <dd>calvaris@igalia.com</dd>
<dt>Date</dt> <dd>2015-04-10 04:20:19 -0700 (Fri, 10 Apr 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add total test test of Streams API
https://bugs.webkit.org/show_bug.cgi?id=142682

Unreviewed.

Increased the callbacks timeouts to make tests pass in slower bots
like Yosemite Debug.

* streams/reference-implementation/resources/streams-utils.js:
Created a standardTimeout variable with 100 as default.
* streams/reference-implementation/readable-stream-cancel.html:
* streams/reference-implementation/readable-stream-reader.html:
* streams/reference-implementation/readable-stream-templated.html:
* streams/reference-implementation/readable-stream.html: Used
standardTimeout for the test timeout callbacks.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationreadablestreamcancelhtml">trunk/LayoutTests/streams/reference-implementation/readable-stream-cancel.html</a></li>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationreadablestreamreaderhtml">trunk/LayoutTests/streams/reference-implementation/readable-stream-reader.html</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>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationresourcesstreamsutilsjs">trunk/LayoutTests/streams/reference-implementation/resources/streams-utils.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (182628 => 182629)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-04-10 10:51:01 UTC (rev 182628)
+++ trunk/LayoutTests/ChangeLog        2015-04-10 11:20:19 UTC (rev 182629)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2015-04-10  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt; and Xabier Rodriguez Calvar &lt;calvaris@igalia.com&gt;
+
+        Add total test test of Streams API
+        https://bugs.webkit.org/show_bug.cgi?id=142682
+
+        Unreviewed.
+
+        Increased the callbacks timeouts to make tests pass in slower bots
+        like Yosemite Debug.
+
+        * streams/reference-implementation/resources/streams-utils.js:
+        Created a standardTimeout variable with 100 as default.
+        * streams/reference-implementation/readable-stream-cancel.html:
+        * streams/reference-implementation/readable-stream-reader.html:
+        * streams/reference-implementation/readable-stream-templated.html:
+        * streams/reference-implementation/readable-stream.html: Used
+        standardTimeout for the test timeout callbacks.
+
</ins><span class="cx"> 2015-04-10  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">         Add total test test of Streams API
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationreadablestreamcancelhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/readable-stream-cancel.html (182628 => 182629)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/readable-stream-cancel.html        2015-04-10 10:51:01 UTC (rev 182628)
+++ trunk/LayoutTests/streams/reference-implementation/readable-stream-cancel.html        2015-04-10 11:20:19 UTC (rev 182629)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx">                 setTimeout(test1.step_func(function() {
</span><span class="cx">                     cancellationFinished = true;
</span><span class="cx">                     resolve();
</span><del>-                }), 50)
</del><ins>+                }), standardTimeout);
</ins><span class="cx">             }));
</span><span class="cx">         }
</span><span class="cx">     });
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx">             assert_equals(cancellationFinished, true, 'it returns a promise that is fulfilled when the cancellation finishes');
</span><span class="cx">             test1.done();
</span><span class="cx">         })).catch(test1.step_func(function(e) { assert_unreached(e); }));
</span><del>-    }), 150);
</del><ins>+    }), standardTimeout + 50);
</ins><span class="cx"> });
</span><span class="cx"> 
</span><span class="cx"> test(function() {
</span><span class="lines">@@ -133,7 +133,7 @@
</span><span class="cx"> 
</span><span class="cx">     setTimeout(test4.step_func(function() {
</span><span class="cx">         resolveSourceCancelPromise('Hello');
</span><del>-    }), 30);
</del><ins>+    }), standardTimeout);
</ins><span class="cx"> });
</span><span class="cx"> 
</span><span class="cx"> var test5 = async_test('ReadableStream cancellation: if the underlying source\'s cancel method returns a promise, the promise returned by the stream\'s cancel should reject when that one does');
</span><span class="lines">@@ -166,7 +166,7 @@
</span><span class="cx"> 
</span><span class="cx">     setTimeout(test5.step_func(function() {
</span><span class="cx">         rejectSourceCancelPromise(errorInCancel);
</span><del>-    }), 30);
</del><ins>+    }), standardTimeout);
</ins><span class="cx"> });
</span><span class="cx"> 
</span><span class="cx"> var test6 = async_test('ReadableStream cancellation: cancelling before start finishes should prevent pull() from being called');
</span><span class="lines">@@ -238,7 +238,7 @@
</span><span class="cx">             return new Promise(test9.step_func(function(resolve, reject) {
</span><span class="cx">                 setTimeout(test9.step_func(function() {
</span><span class="cx">                     resolve();
</span><del>-                }), 50);
</del><ins>+                }), standardTimeout);
</ins><span class="cx">             }))
</span><span class="cx">         }
</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 (182628 => 182629)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/readable-stream-reader.html        2015-04-10 10:51:01 UTC (rev 182628)
+++ trunk/LayoutTests/streams/reference-implementation/readable-stream-reader.html        2015-04-10 11:20:19 UTC (rev 182629)
</span><span class="lines">@@ -222,7 +222,7 @@
</span><span class="cx">     setTimeout(test5.step_func(function() {
</span><span class="cx">         assert_equals(readCount, 2);
</span><span class="cx">         test5.done();
</span><del>-    }), 50);
</del><ins>+    }), standardTimeout);
</ins><span class="cx"> });
</span><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="lines">@@ -275,7 +275,7 @@
</span><span class="cx">         assert_true(cancelled);
</span><span class="cx">         assert_equals(readCounts, 1);
</span><span class="cx">         test7.done();
</span><del>-    }), 50);
</del><ins>+    }), standardTimeout);
</ins><span class="cx"> });
</span><span class="cx"> 
</span><span class="cx"> var test8 = async_test('Getting a second reader after erroring the stream should succeed');
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationreadablestreamtemplatedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/readable-stream-templated.html (182628 => 182629)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/readable-stream-templated.html        2015-04-10 10:51:01 UTC (rev 182628)
+++ trunk/LayoutTests/streams/reference-implementation/readable-stream-templated.html        2015-04-10 11:20:19 UTC (rev 182629)
</span><span class="lines">@@ -159,7 +159,7 @@
</span><span class="cx">             test1.step_func(function() { assert_unreached('read() should not reject'); })
</span><span class="cx">         );
</span><span class="cx"> 
</span><del>-        setTimeout(test1.step_func(function() { test1.done(); }), 100);
</del><ins>+        setTimeout(test1.step_func(function() { test1.done(); }), standardTimeout);
</ins><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx">     var test2 = async_test('two read()s should both never settle');
</span><span class="lines">@@ -176,7 +176,7 @@
</span><span class="cx">             test2.step_func(function() { assert_unreached('second read() should not reject'); })
</span><span class="cx">         );
</span><span class="cx"> 
</span><del>-        setTimeout(test2.step_func(function() { test2.done(); }), 100);
</del><ins>+        setTimeout(test2.step_func(function() { test2.done(); }), standardTimeout);
</ins><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx">     test(function() {
</span><span class="lines">@@ -212,7 +212,7 @@
</span><span class="cx"> 
</span><span class="cx">         assert_throws(new TypeError(), test3.step_func(function() { reader.releaseLock(); }, 'releaseLock should throw a TypeError'));
</span><span class="cx"> 
</span><del>-        setTimeout(test3.step_func(function() { test3.done(); }), 50);
</del><ins>+        setTimeout(test3.step_func(function() { test3.done(); }), standardTimeout);
</ins><span class="cx">     });
</span><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="lines">@@ -328,7 +328,7 @@
</span><span class="cx">         setTimeout(test3.step_func(function() {
</span><span class="cx">             assert_equals(promiseCount, 2);
</span><span class="cx">             test3.done();
</span><del>-        }), 50);
</del><ins>+        }), standardTimeout);
</ins><span class="cx">     });
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationreadablestreamhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/readable-stream.html (182628 => 182629)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/readable-stream.html        2015-04-10 10:51:01 UTC (rev 182628)
+++ trunk/LayoutTests/streams/reference-implementation/readable-stream.html        2015-04-10 11:20:19 UTC (rev 182629)
</span><span class="lines">@@ -158,7 +158,7 @@
</span><span class="cx">                     c.enqueue('a');
</span><span class="cx">                     c.close();
</span><span class="cx">                     resolve();
</span><del>-                }), 50);
</del><ins>+                }), standardTimeout);
</ins><span class="cx">             }));
</span><span class="cx">         },
</span><span class="cx">     });
</span><span class="lines">@@ -185,7 +185,7 @@
</span><span class="cx">             return new Promise(test2.step_func(function(resolve, reject) {
</span><span class="cx">                 setTimeout(test2.step_func(function() {
</span><span class="cx">                     reject(theError);
</span><del>-                }), 50);
</del><ins>+                }), standardTimeout);
</ins><span class="cx">             }));
</span><span class="cx">         },
</span><span class="cx">     });
</span><span class="lines">@@ -288,7 +288,7 @@
</span><span class="cx">     setTimeout(test5.step_func(function() {
</span><span class="cx">         assert_equals(pullCount, 1, 'pull should be called exactly once');
</span><span class="cx">         test5.done();
</span><del>-    }), 50);
</del><ins>+    }), standardTimeout);
</ins><span class="cx"> });
</span><span class="cx"> 
</span><span class="cx"> var test6 = async_test('ReadableStream: should only call pull once for a forever-empty stream, even after reading');
</span><span class="lines">@@ -313,7 +313,7 @@
</span><span class="cx">     setTimeout(test6.step_func(function() {
</span><span class="cx">         assert_equals(pullCount, 1, 'pull should be called exactly once');
</span><span class="cx">         test6.done();
</span><del>-    }), 50);
</del><ins>+    }), standardTimeout);
</ins><span class="cx"> });
</span><span class="cx"> 
</span><span class="cx"> var test7 = async_test('ReadableStream: should only call pull once on a non-empty stream read from before start fulfills');
</span><span class="lines">@@ -344,7 +344,7 @@
</span><span class="cx">     setTimeout(test7.step_func(function() {
</span><span class="cx">         assert_equals(pullCount, 1, 'pull should be called exactly once');
</span><span class="cx">         test7.done();
</span><del>-    }), 50);
</del><ins>+    }), standardTimeout);
</ins><span class="cx"> });
</span><span class="cx"> 
</span><span class="cx"> var test8 = async_test('ReadableStream: should only call pull twice on a non-empty stream read from after start fulfills');
</span><span class="lines">@@ -375,7 +375,7 @@
</span><span class="cx">     setTimeout(test8.step_func(function() {
</span><span class="cx">         assert_equals(pullCount, 2, 'pull should be called exactly twice')
</span><span class="cx">         test8.done();
</span><del>-    }), 50);
</del><ins>+    }), standardTimeout);
</ins><span class="cx"> });
</span><span class="cx"> 
</span><span class="cx"> var test9 = async_test('ReadableStream: should call pull in reaction to read()ing the last chunk, if not draining');
</span><span class="lines">@@ -416,7 +416,7 @@
</span><span class="cx">     setTimeout(test9.step_func(function() {
</span><span class="cx">         assert_equals(pullCount, 3, 'pull should be called exactly thrice')
</span><span class="cx">         test9.done();
</span><del>-    }), 50);
</del><ins>+    }), standardTimeout);
</ins><span class="cx"> });
</span><span class="cx"> 
</span><span class="cx"> var test10 = async_test('ReadableStream: should not call pull() in reaction to read()ing the last chunk, if draining');
</span><span class="lines">@@ -459,7 +459,7 @@
</span><span class="cx">     setTimeout(test10.step_func(function() {
</span><span class="cx">         assert_equals(pullCount, 2, 'pull should be called exactly twice')
</span><span class="cx">         test10.done();
</span><del>-    }), 50);
</del><ins>+    }), standardTimeout);
</ins><span class="cx"> });
</span><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="lines">@@ -495,7 +495,7 @@
</span><span class="cx">                     assert_equals(timesCalled, 2, 'after the promise returned by pull is fulfilled, pull should be called a second time');
</span><span class="cx">                     test11.done();
</span><span class="cx">                 }));
</span><del>-            }), 30);
</del><ins>+            }), standardTimeout);
</ins><span class="cx">         }))
</span><span class="cx">     })).catch(test11.step_func(function(e) {
</span><span class="cx">         assert_unreached(e)
</span><span class="lines">@@ -541,7 +541,7 @@
</span><span class="cx">                         // Once for after start, and once for every read.
</span><span class="cx">                         assert_equals(timesCalled, 4, 'pull() should be called exactly four times');
</span><span class="cx">                         test12.done();
</span><del>-                    }), 50);
</del><ins>+                    }), standardTimeout);
</ins><span class="cx">                 }));
</span><span class="cx">             }));
</span><span class="cx">         }));
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationresourcesstreamsutilsjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/resources/streams-utils.js (182628 => 182629)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/resources/streams-utils.js        2015-04-10 10:51:01 UTC (rev 182628)
+++ trunk/LayoutTests/streams/reference-implementation/resources/streams-utils.js        2015-04-10 11:20:19 UTC (rev 182629)
</span><span class="lines">@@ -1,3 +1,5 @@
</span><ins>+var standardTimeout = 100;
+
</ins><span class="cx"> function RandomPushSource(toPush) {
</span><span class="cx">     this.pushed = 0;
</span><span class="cx">     this.toPush = toPush;
</span></span></pre>
</div>
</div>

</body>
</html>