Title: [194267] trunk/LayoutTests/imported/w3c
- Revision
- 194267
- Author
- calva...@igalia.com
- Date
- 2015-12-18 03:10:44 -0800 (Fri, 18 Dec 2015)
Log Message
[Streams API] imported/w3c/web-platform-tests/streams-api/readable-streams/cancel.html has a flaky test
https://bugs.webkit.org/show_bug.cgi?id=152065
Reviewed by Youenn Fablet.
https://github.com/whatwg/streams/pull/414 and https://github.com/whatwg/streams/issues/413 was closed. Changes
I did on the spec were integrated so they were brought back to the imported tests in WebKit.
* web-platform-tests/streams-api/README.txt: Updated version.
* web-platform-tests/streams-api/readable-streams/cancel-expected.txt: Expectations.
* web-platform-tests/streams-api/readable-streams/cancel.js: Changed to cancel test.
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (194266 => 194267)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2015-12-18 09:59:41 UTC (rev 194266)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2015-12-18 11:10:44 UTC (rev 194267)
@@ -1,3 +1,17 @@
+2015-12-18 Xabier Rodriguez Calvar <calva...@igalia.com>
+
+ [Streams API] imported/w3c/web-platform-tests/streams-api/readable-streams/cancel.html has a flaky test
+ https://bugs.webkit.org/show_bug.cgi?id=152065
+
+ Reviewed by Youenn Fablet.
+
+ https://github.com/whatwg/streams/pull/414 and https://github.com/whatwg/streams/issues/413 was closed. Changes
+ I did on the spec were integrated so they were brought back to the imported tests in WebKit.
+
+ * web-platform-tests/streams-api/README.txt: Updated version.
+ * web-platform-tests/streams-api/readable-streams/cancel-expected.txt: Expectations.
+ * web-platform-tests/streams-api/readable-streams/cancel.js: Changed to cancel test.
+
2015-12-17 Youenn Fablet <youenn.fab...@crf.canon.fr>
Remove temporary flakiness expectations for WPT tests introduced for bug 152257
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/README.txt (194266 => 194267)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/README.txt 2015-12-18 09:59:41 UTC (rev 194266)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/README.txt 2015-12-18 11:10:44 UTC (rev 194267)
@@ -3,4 +3,4 @@
There is a plan to move these tests to web-platform-tests repository so from that moment on this importation will be
automatic.
-Current version: https://github.com/whatwg/streams/tree/18ed463e50c189c0198e2336dfbd10b17f379081/reference-implementation/web-platform-tests
+Current version: https://github.com/whatwg/streams/tree/f7cb0eac03e6a6d045d6e8c09df1f9f8a264fdef/reference-implementation/web-platform-tests.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/cancel-expected.txt (194266 => 194267)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/cancel-expected.txt 2015-12-18 09:59:41 UTC (rev 194266)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/cancel-expected.txt 2015-12-18 11:10:44 UTC (rev 194267)
@@ -1,5 +1,5 @@
-FAIL ReadableStream cancellation: integration test on an infinite stream derived from a random push source promise_test: Unhandled rejection with value: object "Error: forced error"
+PASS ReadableStream cancellation: integration test on an infinite stream derived from a random push source
PASS ReadableStream cancellation: cancel(reason) should pass through the given reason to the underlying source
PASS ReadableStream cancellation: cancel() on a locked stream should fail and not call the underlying source cancel
PASS ReadableStream cancellation: should fulfill promise when cancel callback went fine
@@ -11,7 +11,7 @@
PASS ReadableStream cancellation: cancelling before start finishes should prevent pull() from being called
FAIL Load cancel.js with SharedWorker assert_unreached: SharedWorker is unavailable Reached unreachable code
FAIL Untitled undefined is not an object (evaluating 'navigator.serviceWorker.getRegistration')
-FAIL ReadableStream cancellation: integration test on an infinite stream derived from a random push source promise_test: Unhandled rejection with value: object "Error: forced error"
+PASS ReadableStream cancellation: integration test on an infinite stream derived from a random push source
PASS ReadableStream cancellation: cancel(reason) should pass through the given reason to the underlying source
PASS ReadableStream cancellation: cancel() on a locked stream should fail and not call the underlying source cancel
PASS ReadableStream cancellation: should fulfill promise when cancel callback went fine
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/cancel.js (194266 => 194267)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/cancel.js 2015-12-18 09:59:41 UTC (rev 194266)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/cancel.js 2015-12-18 11:10:44 UTC (rev 194267)
@@ -8,9 +8,6 @@
promise_test(() => {
- // WebKit edit. We force a failure in this tests for now because it is flaky.
- return Promise.reject(new Error("forced error"));
-
const randomSource = new RandomPushSource();
let cancellationFinished = false;
@@ -42,14 +39,17 @@
// We call delay multiple times to avoid cancelling too early for the
// source to enqueue at least one chunk.
- const cancel = delay(5).then(() => delay(5)).then(() => delay(5)).then(() => reader.cancel());
+ const cancel = delay(5).then(() => delay(5)).then(() => delay(5)).then(() => {
+ let cancelPromise = reader.cancel();
+ assert_false(cancellationFinished, 'cancellation in source should happen later');
+ return cancelPromise;
+ })
return readableStreamToArray(rs, reader).then(chunks => {
assert_greater_than(chunks.length, 0, 'at least one chunk should be read');
for (let i = 0; i < chunks.length; i++) {
assert_equals(chunks[i].length, 128, 'chunk ' + i + ' should have 128 bytes');
}
- assert_false(cancellationFinished, 'it did not wait for the cancellation process to finish before closing');
return cancel;
}).then(() => {
assert_true(cancellationFinished, 'it returns a promise that is fulfilled when the cancellation finishes');
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes