Diff
Modified: trunk/LayoutTests/ChangeLog (190315 => 190316)
--- trunk/LayoutTests/ChangeLog 2015-09-29 17:53:08 UTC (rev 190315)
+++ trunk/LayoutTests/ChangeLog 2015-09-29 18:08:05 UTC (rev 190316)
@@ -1,3 +1,20 @@
+2015-09-29 Xabier Rodriguez Calvar <calva...@igalia.com>
+
+ [Streams API] Update tests according to latest spec
+ https://bugs.webkit.org/show_bug.cgi?id=149628
+
+ Reviewed by Darin Adler.
+
+ Added checkpoints and updated all tests that don't disrupt the current implementation and the tests that are
+ passing now.
+
+ * streams/reference-implementation/bad-strategies-expected.txt:
+ * streams/reference-implementation/bad-strategies.html:
+ * streams/reference-implementation/pipe-to-options.html:
+ * streams/reference-implementation/pipe-to.html:
+ * streams/reference-implementation/writable-stream-abort.html:
+ * streams/reference-implementation/writable-stream.html:
+
2015-09-29 Brent Fulgham <bfulg...@apple.com>
[Win] Test gardening
Modified: trunk/LayoutTests/streams/reference-implementation/bad-strategies-expected.txt (190315 => 190316)
--- trunk/LayoutTests/streams/reference-implementation/bad-strategies-expected.txt 2015-09-29 17:53:08 UTC (rev 190315)
+++ trunk/LayoutTests/streams/reference-implementation/bad-strategies-expected.txt 2015-09-29 18:08:05 UTC (rev 190316)
@@ -3,7 +3,6 @@
PASS Readable stream: throwing strategy.size method
PASS Readable stream: throwing strategy.highWaterMark getter
PASS Readable stream: invalid strategy.highWaterMark
-PASS Readable stream: negative strategy.highWaterMark
PASS Readable stream: invalid strategy.size return value
FAIL Writable stream: throwing strategy.size getter assert_throws: construction should re-throw the error function "function () {
new WritableStream({}, {
@@ -16,7 +15,4 @@
FAIL Writable stream: invalid strategy.highWaterMark assert_throws: construction should throw a RangeError for -1 function "function () {
new WritableStream({}, {
..." threw object "ReferenceError: Can't find variable: WritableStream" ("ReferenceError") expected object "RangeError" ("RangeError")
-FAIL Writable stream: negative strategy.highWaterMark assert_throws: construction should throw a RangeError function "function () {
- new WritableStream({}, {
- ..." threw object "ReferenceError: Can't find variable: WritableStream" ("ReferenceError") expected object "RangeError" ("RangeError")
Modified: trunk/LayoutTests/streams/reference-implementation/bad-strategies.html (190315 => 190316)
--- trunk/LayoutTests/streams/reference-implementation/bad-strategies.html 2015-09-29 17:53:08 UTC (rev 190315)
+++ trunk/LayoutTests/streams/reference-implementation/bad-strategies.html 2015-09-29 18:08:05 UTC (rev 190316)
@@ -2,6 +2,8 @@
<script src=''></script>
<script src=''></script>
<script>
+// This is updated till ec5ffa0 of the spec.
+
test(function() {
var theError = new Error('a unique string');
@@ -77,17 +79,6 @@
}
}, 'Readable stream: invalid strategy.highWaterMark');
-test(function() {
- assert_throws(new RangeError(), function() {
- new ReadableStream({}, {
- size: function() {
- return 1;
- },
- highWaterMark: -1
- });
- }, 'construction should throw a RangeError');
-}, 'Readable stream: negative strategy.highWaterMark');
-
var test2 = async_test('Readable stream: invalid strategy.size return value');
test2.step(function() {
var numberOfCalls = 0;
@@ -240,15 +231,4 @@
}, 'construction should throw a TypeError for ' + highWaterMark);
}
}, 'Writable stream: invalid strategy.highWaterMark');
-
-test(function() {
- assert_throws(new RangeError(), function() {
- new WritableStream({}, {
- size: function() {
- return 1;
- },
- highWaterMark: -1
- });
- }, 'construction should throw a RangeError');
-}, 'Writable stream: negative strategy.highWaterMark');
</script>
Modified: trunk/LayoutTests/streams/reference-implementation/pipe-to-options.html (190315 => 190316)
--- trunk/LayoutTests/streams/reference-implementation/pipe-to-options.html 2015-09-29 17:53:08 UTC (rev 190315)
+++ trunk/LayoutTests/streams/reference-implementation/pipe-to-options.html 2015-09-29 18:08:05 UTC (rev 190316)
@@ -3,6 +3,8 @@
<script src=''></script>
<script src=''></script>
<script>
+// This is updated till ec5ffa0 of the spec.
+
var test1 = async_test('Piping with no options and a destination error');
test1.step(function() {
var cancelCalled = false;
Modified: trunk/LayoutTests/streams/reference-implementation/pipe-to.html (190315 => 190316)
--- trunk/LayoutTests/streams/reference-implementation/pipe-to.html 2015-09-29 17:53:08 UTC (rev 190315)
+++ trunk/LayoutTests/streams/reference-implementation/pipe-to.html 2015-09-29 18:08:05 UTC (rev 190316)
@@ -3,6 +3,8 @@
<script src=''></script>
<script src=''></script>
<script>
+// This is updated till ec5ffa0 of the spec.
+
var test1 = async_test('Piping from a ReadableStream from which lots of data are readable synchronously');
test1.step(function() {
var events = 0;
@@ -513,7 +515,7 @@
assert_unreached('Unexpected close call');
},
abort: function() {
- test11.done();
+ test11.done('underlying source abort was called');
}
});
ws.write('Hello');
Modified: trunk/LayoutTests/streams/reference-implementation/writable-stream-abort.html (190315 => 190316)
--- trunk/LayoutTests/streams/reference-implementation/writable-stream-abort.html 2015-09-29 17:53:08 UTC (rev 190315)
+++ trunk/LayoutTests/streams/reference-implementation/writable-stream-abort.html 2015-09-29 18:08:05 UTC (rev 190316)
@@ -3,6 +3,8 @@
<script src=''></script>
<script src=''></script>
<script>
+// This is updated till ec5ffa0 of the spec.
+
var test1 = async_test('Aborting a WritableStream immediately prevents future writes');
test1.step(function() {
var chunks = [];
Modified: trunk/LayoutTests/streams/reference-implementation/writable-stream.html (190315 => 190316)
--- trunk/LayoutTests/streams/reference-implementation/writable-stream.html 2015-09-29 17:53:08 UTC (rev 190315)
+++ trunk/LayoutTests/streams/reference-implementation/writable-stream.html 2015-09-29 18:08:05 UTC (rev 190316)
@@ -3,6 +3,8 @@
<script src=''></script>
<script src=''></script>
<script>
+// This is updated till ec5ffa0 of the spec.
+
function writeArrayToStream(array, writableStream) {
array.forEach(function(chunk) { writableStream.write(chunk); })
return writableStream.close();