<!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>[190167] 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/190167">190167</a></dd>
<dt>Author</dt> <dd>calvaris@igalia.com</dd>
<dt>Date</dt> <dd>2015-09-23 04:33:41 -0700 (Wed, 23 Sep 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Streams API] Add transform stream general tests
https://bugs.webkit.org/show_bug.cgi?id=149267

Reviewed by Darin Adler.

* streams/reference-implementation/transform-stream-expected.txt: Added.
* streams/reference-implementation/transform-stream.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationtransformstreamexpectedtxt">trunk/LayoutTests/streams/reference-implementation/transform-stream-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationtransformstreamhtml">trunk/LayoutTests/streams/reference-implementation/transform-stream.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (190166 => 190167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-09-23 11:27:58 UTC (rev 190166)
+++ trunk/LayoutTests/ChangeLog        2015-09-23 11:33:41 UTC (rev 190167)
</span><span class="lines">@@ -1,5 +1,15 @@
</span><span class="cx"> 2015-09-23  Xabier Rodriguez Calvar  &lt;calvaris@igalia.com&gt;
</span><span class="cx"> 
</span><ins>+        [Streams API] Add transform stream general tests
+        https://bugs.webkit.org/show_bug.cgi?id=149267
+
+        Reviewed by Darin Adler.
+
+        * streams/reference-implementation/transform-stream-expected.txt: Added.
+        * streams/reference-implementation/transform-stream.html: Added.
+
+2015-09-23  Xabier Rodriguez Calvar  &lt;calvaris@igalia.com&gt;
+
</ins><span class="cx">         [Streams API] Added transform stream error tests
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=149266
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationtransformstreamexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/streams/reference-implementation/transform-stream-expected.txt (0 => 190167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/transform-stream-expected.txt                                (rev 0)
+++ trunk/LayoutTests/streams/reference-implementation/transform-stream-expected.txt        2015-09-23 11:33:41 UTC (rev 190167)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+
+FAIL TransformStream can be constructed with a transform function Can't find variable: TransformStream
+FAIL TransformStream cannot be constructed with no transform function assert_throws: TransformStream cannot be constructed with no arguments function &quot;function () { new TransformStream(); }&quot; threw object &quot;ReferenceError: Can't find variable: TransformStream&quot; (&quot;ReferenceError&quot;) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL TransformStream instances must have writable and readable properties of the correct types Can't find variable: TransformStream
+FAIL TransformStream writable starts in the writable state Can't find variable: TransformStream
+FAIL Pass-through sync TransformStream: can read from readable what is put into writable Can't find variable: TransformStream
+FAIL Uppercaser sync TransformStream: can read from readable transformed version of what is put into writable Can't find variable: TransformStream
+FAIL Uppercaser-doubler sync TransformStream: can read both chunks put into the readable Can't find variable: TransformStream
+FAIL Uppercaser async TransformStream: can read from readable transformed version of what is put into writable Can't find variable: TransformStream
+FAIL Uppercaser-doubler async TransformStream: can read both chunks put into the readable Can't find variable: TransformStream
+FAIL TransformStream: by default, closing the writable closes the readable (when there are no queued writes) Can't find variable: TransformStream
+FAIL TransformStream: by default, closing the writable waits for transforms to finish before closing both Can't find variable: TransformStream
+FAIL TransformStream: by default, closing the writable closes the readable after sync enqueues and async done Can't find variable: TransformStream
+FAIL TransformStream: by default, closing the writable closes the readable after async enqueues and async done Can't find variable: TransformStream
+FAIL TransformStream flush is called immediately when the writable is closed, if no writes are queued Can't find variable: TransformStream
+FAIL TransformStream flush is called after all queued writes finish, once the writable is closed Can't find variable: TransformStream
+FAIL TransformStream flush gets a chance to enqueue more into the readable Can't find variable: TransformStream
+FAIL TransformStream flush gets a chance to enqueue more into the readable, and can then async close Can't find variable: TransformStream
+FAIL Transform stream should call transformer methods as methods Can't find variable: TransformStream
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationtransformstreamhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/streams/reference-implementation/transform-stream.html (0 => 190167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/transform-stream.html                                (rev 0)
+++ trunk/LayoutTests/streams/reference-implementation/transform-stream.html        2015-09-23 11:33:41 UTC (rev 190167)
</span><span class="lines">@@ -0,0 +1,401 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;script src='../../resources/testharness.js'&gt;&lt;/script&gt;
+&lt;script src='../../resources/testharnessreport.js'&gt;&lt;/script&gt;
+&lt;script src='resources/streams-utils.js'&gt;&lt;/script&gt;
+&lt;script&gt;
+// This is updated till https://github.com/whatwg/streams/commit/ec5ffa036308d9f6350d2946560d48cdbf090939
+
+test(function() {
+    new TransformStream({ transform: function() { } }); // TransformStream constructed with no errors.
+}, 'TransformStream can be constructed with a transform function');
+
+test(function() {
+    assert_throws(new TypeError(), function() { new TransformStream(); }, 'TransformStream cannot be constructed with no arguments');
+    assert_throws(new TypeError(), function() { new TransformStream({}); }, 'TransformStream cannot be constructed with an empty object');
+}, 'TransformStream cannot be constructed with no transform function');
+
+test(function() {
+    var ts = new TransformStream({ transform: function() { } });
+
+    assert_true(Object.prototype.hasOwnProperty.call(ts, 'writable'), 'it has a writable property');
+    assert_true(ts.writable instanceof WritableStream, 'writable is an instance of WritableStream');
+
+    assert_true(Object.prototype.hasOwnProperty.call(ts, 'readable'), 'it has a readable property');
+    assert_true(ts.readable instanceof ReadableStream, 'readable is an instance of ReadableStream');
+}, 'TransformStream instances must have writable and readable properties of the correct types');
+
+test(function() {
+    var ts = new TransformStream({ transform: function() { } });
+
+    assert_equals(ts.writable.state, 'writable', 'writable starts writable');
+}, 'TransformStream writable starts in the writable state');
+
+var test1 = async_test('Pass-through sync TransformStream: can read from readable what is put into writable');
+test1.step(function()
+{
+    var ts = new TransformStream({
+        transform: function(chunk, enqueue, done) {
+            enqueue(chunk);
+            done();
+        }
+    });
+
+    ts.writable.write('a');
+
+    assert_equals(ts.writable.state, 'waiting', 'writable is waiting after one write');
+    ts.readable.getReader().read().then(test1.step_func(function(result) {
+        assert_object_equals(result, { value: 'a', done: false }, 'result from reading the readable is the same as was written to writable');
+
+        return ts.writable.ready.then(test1.step_func(function() {
+            assert_equals(ts.writable.state, 'writable', 'writable becomes writable again');
+            test1.done();
+        }));
+    })).catch(test1.step_func(function(e) { assert_unreached(e); }));
+});
+
+var test2 = async_test('Uppercaser sync TransformStream: can read from readable transformed version of what is put into writable');
+test2.step(function()
+{
+    var ts = new TransformStream({
+        transform: function(chunk, enqueue, done) {
+            enqueue(chunk.toUpperCase());
+            done();
+        }
+    });
+
+    ts.writable.write('a');
+
+    assert_equals(ts.writable.state, 'waiting', 'writable is waiting after one write');
+
+    ts.readable.getReader().read().then(test2.step_func(function(result) {
+        assert_object_equals(result, { value: 'A', done: false },
+                             'result from reading the readable is the transformation of what was written to writable');
+
+        return ts.writable.ready.then(test2.step_func(function() {
+            assert_equals(ts.writable.state, 'writable', 'writable becomes writable again');
+            test2.done();
+        }));
+    })).catch(test2.step_func(function(e) { assert_unreached(e); }));
+});
+
+var test3 = async_test('Uppercaser-doubler sync TransformStream: can read both chunks put into the readable');
+test3.step(function()
+{
+    var ts = new TransformStream({
+        transform: function(chunk, enqueue, done) {
+            enqueue(chunk.toUpperCase());
+            enqueue(chunk.toUpperCase());
+            done();
+        }
+    });
+
+    ts.writable.write('a');
+
+    assert_equals(ts.writable.state, 'waiting', 'writable is waiting after one write');
+
+    var reader = ts.readable.getReader();
+
+    reader.read().then(test3.step_func(function(result1) {
+        assert_object_equals(result1, { value: 'A', done: false },
+                             'the first chunk read is the transformation of the single chunk written');
+
+        return reader.read().then(test3.step_func(function(result2) {
+            assert_object_equals(result2, { value: 'A', done: false },
+                                 'the second chunk read is also the transformation of the single chunk written');
+
+            return ts.writable.ready.then(test3.step_func(function() {
+                assert_equals(ts.writable.state, 'writable', 'writable becomes writable again');
+                test3.done();
+            }));
+        }));
+    })).catch(test3.step_func(function(e) { assert_unreached(e); }));
+});
+
+var test4 = async_test('Uppercaser async TransformStream: can read from readable transformed version of what is put into writable');
+test4.step(function()
+{
+    var ts = new TransformStream({
+        transform: function(chunk, enqueue, done) {
+            setTimeout(test4.step_func(function() { enqueue(chunk.toUpperCase()); }), 100);
+            setTimeout(test4.step_func(done), 500);
+        }
+    });
+
+    ts.writable.write('a');
+
+    assert_equals(ts.writable.state, 'waiting', 'writable is waiting after one write');
+
+    ts.readable.getReader().read().then(test4.step_func(function(result) {
+        assert_object_equals(result, { value: 'A', done: false },
+                             'result from reading the readable is the transformation of what was written to writable');
+
+        return ts.writable.ready.then(test4.step_func(function() {
+            assert_equals(ts.writable.state, 'writable', 'writable becomes writable again');
+            test4.done();
+        }));
+    })).catch(test4.step_func(function(e) { assert_unreached(e); }));
+});
+
+var test5 = async_test('Uppercaser-doubler async TransformStream: can read both chunks put into the readable');
+test5.step(function()
+{
+    var ts = new TransformStream({
+        transform: function(chunk, enqueue, done) {
+            setTimeout(test5.step_func(function() { enqueue(chunk.toUpperCase()); }), 100);
+            setTimeout(test5.step_func(function() { enqueue(chunk.toUpperCase()); }), 500);
+            setTimeout(test5.step_func(done), 900);
+        }
+    });
+
+    var reader = ts.readable.getReader();
+
+    ts.writable.write('a');
+
+    assert_equals(ts.writable.state, 'waiting', 'writable is waiting after one write');
+    reader.read().then(test5.step_func(function(result1) {
+        assert_object_equals(result1, { value: 'A', done: false },
+                             'the first chunk read is the transformation of the single chunk written');
+
+        return reader.read().then(test5.step_func(function(result2) {
+            assert_object_equals(result2, { value: 'A', done: false },
+                                 'the second chunk read is also the transformation of the single chunk written');
+
+            return ts.writable.ready.then(test5.step_func(function() {
+                assert_equals(ts.writable.state, 'writable', 'writable becomes writable again');
+                test5.done();
+            }));
+        }));
+    })).catch(test5.step_func(function(e) { assert_unreached(e); }));
+});
+
+var test6 = async_test('TransformStream: by default, closing the writable closes the readable (when there are no queued writes)');
+test6.step(function()
+{
+    var ts = new TransformStream({ transform: function() { } });
+
+    ts.writable.close();
+    assert_equals(ts.writable.state, 'closing', 'writable is closing');
+
+    Promise.all([ts.writable.closed, ts.readable.getReader().closed]).then(test6.step_func(function() {
+        assert_equals(ts.writable.state, 'closed', 'writable state becomes closed eventually');
+        test6.done('both writable and readable closed promises fulfill');
+    })).catch(test6.step_func(function(e) { assert_unreached(e); }));
+});
+
+var test7 = async_test('TransformStream: by default, closing the writable waits for transforms to finish before closing both');
+test7.step(function()
+{
+    var ts = new TransformStream({
+        transform: function(chunk, enqueue, done) {
+            setTimeout(test7.step_func(done), 500);
+        }
+    });
+
+    ts.writable.write('a');
+    ts.writable.close();
+    assert_equals(ts.writable.state, 'closing', 'writable is closing');
+
+    var rsClosed = false;
+    ts.readable.getReader().closed.then(test7.step_func(function() {
+        rsClosed = true;
+    }));
+
+    setTimeout(test7.step_func(function() {
+        assert_equals(rsClosed, false, 'readable is not closed after a tick');
+
+        ts.writable.closed.then(test7.step_func(function() {
+            assert_equals(ts.writable.state, 'closed', 'writable becomes closed eventually');
+            assert_true(rsClosed, 'readable is closed at that point');
+            test7.done();
+        })).catch(test7.step_func(function(e) { assert_unreached(e); }));
+    }), 0);
+});
+
+var test8 = async_test('TransformStream: by default, closing the writable closes the readable after sync enqueues and async done');
+test8.step(function()
+{
+    var ts = new TransformStream({
+        transform: function(chunk, enqueue, done) {
+            enqueue('x');
+            enqueue('y');
+            setTimeout(test8.step_func(done), 500);
+        }
+    });
+
+    ts.writable.write('a');
+    ts.writable.close();
+    assert_equals(ts.writable.state, 'closing', 'writable is closing');
+
+    ts.writable.closed.then(test8.step_func(function() {
+        assert_equals(ts.writable.state, 'closed', 'writable becomes closed eventually');
+
+        return readableStreamToArray(ts.readable).then(test8.step_func(function(chunks) {
+            assert_array_equals(chunks, ['x', 'y'], 'both enqueued chunks can be read from the readable');
+            test8.done();
+        }));
+    })).catch(test8.step_func(function(e) { assert_unreached(e); }));
+});
+
+var test9 = async_test('TransformStream: by default, closing the writable closes the readable after async enqueues and async done');
+test9.step(function()
+{
+    var ts = new TransformStream({
+        transform: function(chunk, enqueue, done) {
+            setTimeout(test9.step_func(function() { enqueue('x'); }), 100);
+            setTimeout(test9.step_func(function() { enqueue('y'); }), 500);
+            setTimeout(test9.step_func(done), 900);
+        }
+    });
+
+    ts.writable.write('a');
+    ts.writable.close();
+    assert_equals(ts.writable.state, 'closing', 'writable is closing');
+
+    ts.writable.closed.then(test9.step_func(function() {
+        assert_equals(ts.writable.state, 'closed', 'writable becomes closed eventually');
+
+        return readableStreamToArray(ts.readable).then(test9.step_func(function(chunks) {
+            assert_array_equals(chunks, ['x', 'y'], 'both enqueued chunks can be read from the readable');
+            test9.done();
+        }));
+    })).catch(test9.step_func(function(e) { assert_unreached(e); }));
+});
+
+var test10 = async_test('TransformStream flush is called immediately when the writable is closed, if no writes are queued');
+test10.step(function()
+{
+    var flushCalled = false;
+    var ts = new TransformStream({
+        transform: function() { },
+        flush: function(enqueue) {
+            flushCalled = true;
+        }
+    });
+
+    ts.writable.close().then(test10.step_func(function() {
+        assert_true(flushCalled, 'closing the writable triggers the transform flush immediately');
+        test10.done();
+    }));
+});
+
+var test11 = async_test('TransformStream flush is called after all queued writes finish, once the writable is closed');
+test11.step(function()
+{
+    var flushCalled = false;
+    var ts = new TransformStream({
+        transform: function(chunk, enqueue, done) {
+            setTimeout(test11.step_func(done), 100);
+        },
+        flush: function(enqueue) {
+            flushCalled = true;
+        }
+    });
+
+    ts.writable.write('a');
+    ts.writable.close();
+    assert_false(flushCalled, 'closing the writable does not immediately call flush if writes are not finished');
+
+    var rsClosed = false;
+    ts.readable.getReader().closed.then(test11.step_func(function() {
+        rsClosed = true;
+    }));
+
+    setTimeout(test11.step_func(function() {
+        assert_true(flushCalled, 'flush is eventually called');
+        assert_false(rsClosed, 'if flush does not call close, the readable does not become closed');
+        test11.done();
+    }), 500);
+});
+
+var test12 = async_test('TransformStream flush gets a chance to enqueue more into the readable');
+test12.step(function()
+{
+    var ts = new TransformStream({
+        transform: function(chunk, enqueue, done) {
+            done();
+        },
+        flush: function(enqueue) {
+            enqueue('x');
+            enqueue('y');
+        }
+    });
+
+    var reader = ts.readable.getReader();
+
+    ts.writable.write('a');
+    ts.writable.close();
+    reader.read().then(test12.step_func(function(result1) {
+        assert_object_equals(result1, { value: 'x', done: false }, 'the first chunk read is the first one enqueued in flush');
+
+        return reader.read().then(test12.step_func(function(result2) {
+            assert_object_equals(result2, { value: 'y', done: false }, 'the second chunk read is the second one enqueued in flush');
+            test12.done();
+        }));
+    })).catch(test12.step_func(function(e) { assert_unreached(e); }));
+});
+
+var test13 = async_test('TransformStream flush gets a chance to enqueue more into the readable, and can then async close');
+test13.step(function()
+{
+    var promiseCalls = 0;
+    var ts = new TransformStream({
+        transform: function(chunk, enqueue, done) {
+            done();
+        },
+        flush: function(enqueue, close) {
+            enqueue('x');
+            enqueue('y');
+            setTimeout(test13.step_func(close), 100);
+        }
+    });
+
+    var reader = ts.readable.getReader();
+
+    ts.writable.write('a');
+    ts.writable.close();
+    reader.read().then(test13.step_func(function(result1) {
+        assert_equals(++promiseCalls, 1);
+        assert_object_equals(result1, { value: 'x', done: false }, 'the first chunk read is the first one enqueued in flush');
+
+        return reader.read().then(test13.step_func(function(result2) {
+            assert_equals(++promiseCalls, 2);
+            assert_object_equals(result2, { value: 'y', done: false }, 'the second chunk read is the second one enqueued in flush');
+        }));
+    })).catch(test13.step_func(function(e) { assert_unreached(e); }));
+
+    reader.closed.then(test13.step_func(function() {
+        assert_equals(++promiseCalls, 3);
+        test13.done('readable reader becomes closed');
+    })).catch(test13.step_func(function(e) { assert_unreached(e); }));
+});
+
+var test14 = async_test('Transform stream should call transformer methods as methods');
+test14.step(function()
+{
+    var ts = new TransformStream({
+        suffix: '-suffix',
+
+        transform: function(chunk, enqueue, done) {
+            enqueue(chunk + this.suffix);
+            done();
+        },
+
+        flush: function(enqueue, close) {
+            enqueue('flushed' + this.suffix);
+            close();
+        }
+    });
+
+    ts.writable.write('a');
+    ts.writable.close();
+    ts.writable.closed.then(
+        test14.step_func(function() {
+            return readableStreamToArray(ts.readable).then(test14.step_func(function(chunks) {
+                assert_array_equals(chunks, ['a-suffix', 'flushed-suffix'], 'both enqueued chunks have suffixes');
+                test14.done();
+            }));
+        }),
+        test14.step_func(function(e) { assert_unreached(e); })
+    );
+});
+&lt;/script&gt;
</ins></span></pre>
</div>
</div>

</body>
</html>