Title: [195924] trunk/LayoutTests/imported/w3c
- Revision
- 195924
- Author
- [email protected]
- Date
- 2016-01-31 01:20:05 -0800 (Sun, 31 Jan 2016)
Log Message
imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection.html asserts frequently
https://bugs.webkit.org/show_bug.cgi?id=152436
Reviewed by Darin Adler.
GCController is not available in Worker environments, explaining probably why garbage-collection-2.html is not crashing at all.
Inlining half of the tests in garbage-collection-2.html (runned in window) to compare with garbage-collection-1.html.
* web-platform-tests/streams-api/readable-streams/garbage-collection-2-expected.txt:
* web-platform-tests/streams-api/readable-streams/garbage-collection-2.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (195923 => 195924)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2016-01-31 05:57:01 UTC (rev 195923)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2016-01-31 09:20:05 UTC (rev 195924)
@@ -1,3 +1,16 @@
+2016-01-31 Youenn Fablet <[email protected]>
+
+ imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection.html asserts frequently
+ https://bugs.webkit.org/show_bug.cgi?id=152436
+
+ Reviewed by Darin Adler.
+
+ GCController is not available in Worker environments, explaining probably why garbage-collection-2.html is not crashing at all.
+ Inlining half of the tests in garbage-collection-2.html (runned in window) to compare with garbage-collection-1.html.
+
+ * web-platform-tests/streams-api/readable-streams/garbage-collection-2-expected.txt:
+ * web-platform-tests/streams-api/readable-streams/garbage-collection-2.html:
+
2016-01-30 Chris Dumez <[email protected]>
[JS Bindings] prototype.constructor should be writable
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection-2-expected.txt (195923 => 195924)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection-2-expected.txt 2016-01-31 05:57:01 UTC (rev 195923)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection-2-expected.txt 2016-01-31 09:20:05 UTC (rev 195924)
@@ -1,6 +1,4 @@
PASS ReadableStreamController methods should continue working properly when scripts lose their reference to the readable stream
PASS ReadableStream closed promise should fulfill even if the stream and reader JS references are lost
-PASS ReadableStream closed promise should reject even if stream and reader JS references are lost
-PASS Garbage-collecting a ReadableStreamReader should not unlock its stream
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection-2.html (195923 => 195924)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection-2.html 2016-01-31 05:57:01 UTC (rev 195923)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection-2.html 2016-01-31 09:20:05 UTC (rev 195924)
@@ -9,5 +9,40 @@
<!-- File to be removed once https://bugs.webkit.org/show_bug.cgi?id=152436 is resolved -->
<script>
'use strict';
-fetch_tests_from_worker(new Worker('garbage-collection.js'));
+
+promise_test(() => {
+
+ let controller;
+ new ReadableStream({
+ start(c) {
+ controller = c;
+ }
+ });
+
+ garbageCollect();
+
+ return delay(50).then(() => {
+ controller.close();
+ assert_throws(new TypeError(), () => controller.close(), 'close should throw a TypeError the second time');
+ assert_throws(new TypeError(), () => controller.error(), 'error should throw a TypeError on a closed stream');
+ });
+
+}, 'ReadableStreamController methods should continue working properly when scripts lose their reference to the ' +
+ 'readable stream');
+
+promise_test(() => {
+
+ let controller;
+
+ const closedPromise = new ReadableStream({
+ start(c) {
+ controller = c;
+ }
+ }).getReader().closed;
+
+ garbageCollect();
+
+ return delay(50).then(() => controller.close()).then(() => closedPromise);
+
+}, 'ReadableStream closed promise should fulfill even if the stream and reader JS references are lost');
</script>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes