Title: [225906] trunk/LayoutTests
Revision
225906
Author
romain.belless...@crf.canon.fr
Date
2017-12-14 09:04:21 -0800 (Thu, 14 Dec 2017)

Log Message

[Readable Streams API] Remove properties tests covered by WPT
https://bugs.webkit.org/show_bug.cgi?id=180809

Reviewed by Youenn Fablet.

Removed WebKit properties/methods tests for ReadableByteStreamController,
ReadableStreamBYOBReader and ReadableStreamBYOBRequest. Indeed, these
tests are also present in WPT streams/readable-byte-streams/properties.js.

* streams/readable-byte-stream-controller-expected.txt: Updated expectations.
* streams/readable-byte-stream-controller.js: Remove ReadableByteStreamController properties test.
* streams/readable-stream-byob-reader-expected.txt: Updated expectations.
* streams/readable-stream-byob-reader.js: Remove ReadableStreamBYOBReader properties test.
* streams/readable-stream-byob-request-expected.txt: Updated expectations.
* streams/readable-stream-byob-request.js: Remove ReadableStreamBYOBRequest properties test.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (225905 => 225906)


--- trunk/LayoutTests/ChangeLog	2017-12-14 17:03:56 UTC (rev 225905)
+++ trunk/LayoutTests/ChangeLog	2017-12-14 17:04:21 UTC (rev 225906)
@@ -1,3 +1,21 @@
+2017-12-14  Romain Bellessort  <romain.belless...@crf.canon.fr>
+
+        [Readable Streams API] Remove properties tests covered by WPT
+        https://bugs.webkit.org/show_bug.cgi?id=180809
+
+        Reviewed by Youenn Fablet.
+
+        Removed WebKit properties/methods tests for ReadableByteStreamController,
+        ReadableStreamBYOBReader and ReadableStreamBYOBRequest. Indeed, these
+        tests are also present in WPT streams/readable-byte-streams/properties.js.
+
+        * streams/readable-byte-stream-controller-expected.txt: Updated expectations.
+        * streams/readable-byte-stream-controller.js: Remove ReadableByteStreamController properties test.
+        * streams/readable-stream-byob-reader-expected.txt: Updated expectations.
+        * streams/readable-stream-byob-reader.js: Remove ReadableStreamBYOBReader properties test.
+        * streams/readable-stream-byob-request-expected.txt: Updated expectations.
+        * streams/readable-stream-byob-request.js: Remove ReadableStreamBYOBRequest properties test.
+
 2017-12-14  Miguel Gomez  <mago...@igalia.com>
 
         [GTK] Gardening bug after r225898

Modified: trunk/LayoutTests/streams/readable-byte-stream-controller-expected.txt (225905 => 225906)


--- trunk/LayoutTests/streams/readable-byte-stream-controller-expected.txt	2017-12-14 17:03:56 UTC (rev 225905)
+++ trunk/LayoutTests/streams/readable-byte-stream-controller-expected.txt	2017-12-14 17:04:21 UTC (rev 225906)
@@ -1,6 +1,5 @@
 
 PASS Creating a ReadableStream with an underlyingSource with type property set to 'bytes' should succeed 
-PASS ReadableByteStreamController instances should have the correct list of properties 
 PASS Calling error() with a this object different from ReadableByteStreamController should throw a TypeError 
 PASS Calling close() with a this object different from ReadableByteStreamController should throw a TypeError 
 PASS Calling enqueue() with a this object different from ReadableByteStreamController should throw a TypeError 
@@ -26,7 +25,6 @@
 PASS For a ReadableStream created with a highWaterMark of 1 and a ReadableByteStreamController, calling cancel after pull has thrown an error should result in a promise rejected with the same error 
 PASS Calling cancel after creating a ReadableStream with an underlyingByteStream's start function returning a rejected promise should result in a promise rejected with the same error 
 PASS Creating a ReadableStream with an underlyingSource with type property set to 'bytes' should succeed 
-PASS ReadableByteStreamController instances should have the correct list of properties 
 PASS Calling error() with a this object different from ReadableByteStreamController should throw a TypeError 
 PASS Calling close() with a this object different from ReadableByteStreamController should throw a TypeError 
 PASS Calling enqueue() with a this object different from ReadableByteStreamController should throw a TypeError 

Modified: trunk/LayoutTests/streams/readable-byte-stream-controller.js (225905 => 225906)


--- trunk/LayoutTests/streams/readable-byte-stream-controller.js	2017-12-14 17:03:56 UTC (rev 225905)
+++ trunk/LayoutTests/streams/readable-byte-stream-controller.js	2017-12-14 17:04:21 UTC (rev 225906)
@@ -10,50 +10,6 @@
     });
 }, "Creating a ReadableStream with an underlyingSource with type property set to 'bytes' should succeed");
 
-test(() => {
-    const methods = ['close', 'constructor', 'enqueue', 'error'];
-    const properties = methods.concat(['byobRequest', 'desiredSize']).sort();
-
-    let controller;
-
-    const rs = new ReadableStream({
-        start: function(c) {
-            controller = c;
-        },
-        type: "bytes"
-    });
-
-    const proto = Object.getPrototypeOf(controller);
-
-    assert_array_equals(Object.getOwnPropertyNames(proto).sort(), properties);
-
-    for (const m of methods) {
-        const propDesc = Object.getOwnPropertyDescriptor(proto, m);
-        assert_equals(propDesc.enumerable, false, 'method should be non-enumerable');
-        assert_equals(propDesc.configurable, true, 'method should be configurable');
-        assert_equals(propDesc.writable, true, 'method should be writable');
-        assert_equals(typeof controller[m], 'function', 'should have be a method');
-    }
-
-    const byobRequestPropDesc = Object.getOwnPropertyDescriptor(proto, 'byobRequest');
-    assert_equals(byobRequestPropDesc.enumerable, false, 'byobRequest should be non-enumerable');
-    assert_equals(byobRequestPropDesc.configurable, true, 'byobRequest should be configurable');
-    assert_not_equals(byobRequestPropDesc.get, undefined, 'byobRequest should have a getter');
-    assert_equals(byobRequestPropDesc.set, undefined, 'byobRequest should not have a setter');
-
-    const desiredSizePropDesc = Object.getOwnPropertyDescriptor(proto, 'desiredSize');
-    assert_equals(desiredSizePropDesc.enumerable, false, 'desiredSize should be non-enumerable');
-    assert_equals(desiredSizePropDesc.configurable, true, 'desiredSize should be configurable');
-    assert_not_equals(desiredSizePropDesc.get, undefined, 'desiredSize should have a getter');
-    assert_equals(desiredSizePropDesc.set, undefined, 'desiredSize should not have a setter');
-
-    assert_equals(controller.close.length, 0, 'close has 0 parameter');
-    assert_equals(controller.constructor.length, 3, 'constructor has 3 parameters');
-    assert_equals(controller.enqueue.length, 1, 'enqueue has 1 parameter');
-    assert_equals(controller.error.length, 1, 'error has 1 parameter');
-
-}, 'ReadableByteStreamController instances should have the correct list of properties');
-
 test(function() {
     let controller;
 

Modified: trunk/LayoutTests/streams/readable-stream-byob-reader-expected.txt (225905 => 225906)


--- trunk/LayoutTests/streams/readable-stream-byob-reader-expected.txt	2017-12-14 17:03:56 UTC (rev 225905)
+++ trunk/LayoutTests/streams/readable-stream-byob-reader-expected.txt	2017-12-14 17:04:21 UTC (rev 225906)
@@ -1,6 +1,5 @@
 
 PASS Getting a ReadableStreamBYOBReader should succeed 
-PASS ReadableStreamBYOBReader instances should have the correct list of properties 
 PASS Calling getReader() with a this object different from ReadableStream should throw a TypeError 
 PASS Calling getReader({ mode: 'byob' }) with a ReadableStream whose controller is a ReadableStreamDefaultController should throw a TypeError 
 PASS Calling ReadableStreamBYOBReader.cancel() with a this object different from ReadableStreamBYOBReader should be rejected 
@@ -15,7 +14,6 @@
 PASS Calling ReadableStreamBYOBReader.releaseLock() on a stream that is not readable should result in ReadableStreamBYOBReader.closed promise to be rejected with a TypeError 
 PASS Calling ReadableStreamBYOBReader.read() with a this object different from ReadableStreamBYOBReader should be rejected 
 PASS Getting a ReadableStreamBYOBReader should succeed 
-PASS ReadableStreamBYOBReader instances should have the correct list of properties 
 PASS Calling getReader() with a this object different from ReadableStream should throw a TypeError 
 PASS Calling getReader({ mode: 'byob' }) with a ReadableStream whose controller is a ReadableStreamDefaultController should throw a TypeError 
 PASS Calling ReadableStreamBYOBReader.cancel() with a this object different from ReadableStreamBYOBReader should be rejected 

Modified: trunk/LayoutTests/streams/readable-stream-byob-reader.js (225905 => 225906)


--- trunk/LayoutTests/streams/readable-stream-byob-reader.js	2017-12-14 17:03:56 UTC (rev 225905)
+++ trunk/LayoutTests/streams/readable-stream-byob-reader.js	2017-12-14 17:04:21 UTC (rev 225906)
@@ -11,38 +11,6 @@
     rs.getReader({ mode: 'byob' });
 }, "Getting a ReadableStreamBYOBReader should succeed");
 
-test(() => {
-    const methods = ['cancel', 'constructor', 'read', 'releaseLock'];
-    const properties = methods.concat(['closed']).sort();
-
-    const rs = new ReadableStream({ type: "bytes" });
-    const reader = rs.getReader({ mode: 'byob' });
-
-    const proto = Object.getPrototypeOf(reader);
-
-    assert_array_equals(Object.getOwnPropertyNames(proto).sort(), properties);
-
-    for (const m of methods) {
-        const propDesc = Object.getOwnPropertyDescriptor(proto, m);
-        assert_equals(propDesc.enumerable, false, 'method should be non-enumerable');
-        assert_equals(propDesc.configurable, true, 'method should be configurable');
-        assert_equals(propDesc.writable, true, 'method should be writable');
-        assert_equals(typeof reader[m], 'function', 'should have be a method');
-    }
-
-    const closedPropDesc = Object.getOwnPropertyDescriptor(proto, 'closed');
-    assert_equals(closedPropDesc.enumerable, false, 'closed should be non-enumerable');
-    assert_equals(closedPropDesc.configurable, true, 'closed should be configurable');
-    assert_not_equals(closedPropDesc.get, undefined, 'closed should have a getter');
-    assert_equals(closedPropDesc.set, undefined, 'closed should not have a setter');
-
-    assert_equals(reader.cancel.length, 1, 'cancel has 1 parameter');
-    assert_equals(reader.constructor.length, 1, 'constructor has 1 parameter');
-    assert_equals(reader.read.length, 1, 'read has 1 parameter');
-    assert_equals(reader.releaseLock.length, 0, 'releaseLock has 0 parameter');
-
-}, 'ReadableStreamBYOBReader instances should have the correct list of properties');
-
 test(function() {
     const rs = new ReadableStream();
     const tmp = 12;

Modified: trunk/LayoutTests/streams/readable-stream-byob-request-expected.txt (225905 => 225906)


--- trunk/LayoutTests/streams/readable-stream-byob-request-expected.txt	2017-12-14 17:03:56 UTC (rev 225905)
+++ trunk/LayoutTests/streams/readable-stream-byob-request-expected.txt	2017-12-14 17:04:21 UTC (rev 225906)
@@ -1,5 +1,4 @@
 
-PASS ReadableStreamBYOBRequest instances should have the correct list of properties 
 PASS By default, byobRequest should be undefined 
 PASS byobRequest.view length should be equal to autoAllocateChunkSize 
 PASS Calling respond() with a this object different from ReadableStreamBYOBRequest should throw a TypeError 
@@ -16,7 +15,6 @@
 PASS When using autoAllocateChunkSize, calling respondWithNewView() should succeed if view.byteLength is equal to autoAllocateChunkSize 
 PASS When using autoAllocateChunkSize, calling respondWithNewView() should throw a RangeError if view.byteOffset is different from 0 
 PASS When using autoAllocateChunkSize, calling respondWithNewView() should throw a RangeError if view.byteLength is different from autoAllocateChunkSize 
-PASS ReadableStreamBYOBRequest instances should have the correct list of properties 
 PASS By default, byobRequest should be undefined 
 PASS byobRequest.view length should be equal to autoAllocateChunkSize 
 PASS Calling respond() with a this object different from ReadableStreamBYOBRequest should throw a TypeError 

Modified: trunk/LayoutTests/streams/readable-stream-byob-request.js (225905 => 225906)


--- trunk/LayoutTests/streams/readable-stream-byob-request.js	2017-12-14 17:03:56 UTC (rev 225905)
+++ trunk/LayoutTests/streams/readable-stream-byob-request.js	2017-12-14 17:04:21 UTC (rev 225906)
@@ -4,55 +4,12 @@
     self.importScripts('../resources/testharness.js');
 }
 
-test(() => {
-    const methods = ['constructor', 'respond', 'respondWithNewView'];
-    const properties = methods.concat(['view']).sort();
 
-    let controller;
+// FIXME: Remove next line when bug https://bugs.webkit.org/show_bug.cgi?id=167697
+// is fixed. For the moment, so that test may pass, we have to insert a reference
+// to Uint8Array here (otherwise, the private variable cannot be resolved).
+const d = new Uint8Array(1);
 
-    // FIXME: Remove next line when bug https://bugs.webkit.org/show_bug.cgi?id=167697
-    // is fixed. For the moment, so that test may pass, we have to insert a reference
-    // to Uint8Array here (otherwise, the private variable cannot be resolved).
-    const d = new Uint8Array(1);
-
-    // Specifying autoAllocateChunkSize and calling read() are steps that allow
-    // getting a ReadableStreamBYOBRequest returned instead of undefined. The
-    // purpose here is just to get such an object.
-    const rs = new ReadableStream({
-        autoAllocateChunkSize: 128,
-        start: function(c) {
-            controller = c;
-        },
-        type: "bytes"
-    });
-
-    rs.getReader().read();
-    const byobReq = controller.byobRequest;
-
-    const proto = Object.getPrototypeOf(byobReq);
-
-    assert_array_equals(Object.getOwnPropertyNames(proto).sort(), properties);
-
-    for (const m of methods) {
-        const propDesc = Object.getOwnPropertyDescriptor(proto, m);
-        assert_equals(propDesc.enumerable, false, 'method should be non-enumerable');
-        assert_equals(propDesc.configurable, true, 'method should be configurable');
-        assert_equals(propDesc.writable, true, 'method should be writable');
-        assert_equals(typeof byobReq[m], 'function', 'should have be a method');
-    }
-
-    const viewPropDesc = Object.getOwnPropertyDescriptor(proto, 'view');
-    assert_equals(viewPropDesc.enumerable, false, 'view should be non-enumerable');
-    assert_equals(viewPropDesc.configurable, true, 'view should be configurable');
-    assert_not_equals(viewPropDesc.get, undefined, 'view should have a getter');
-    assert_equals(viewPropDesc.set, undefined, 'view should not have a setter');
-
-    assert_equals(byobReq.constructor.length, 2, 'constructor has 2 parameters');
-    assert_equals(byobReq.respond.length, 1, 'respond has 1 parameter');
-    assert_equals(byobReq.respondWithNewView.length, 1, 'respondWithNewView has 1 parameter');
-
-}, 'ReadableStreamBYOBRequest instances should have the correct list of properties');
-
 test(function() {
     let controller;
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to