Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/streams/readable-streams/garbage-collection.js

Issue 2808853003: Remove Blink copies of readable-streams layout tests (Closed)
Patch Set: Restore rs-utils.js as it is used by fetch tests Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/streams/readable-streams/garbage-collection.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/streams/readable-streams/garbage-collection.js b/third_party/WebKit/LayoutTests/http/tests/streams/readable-streams/garbage-collection.js
deleted file mode 100644
index fb00c946bbb52b23ef6ed8fcd340db90fe39de81..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/http/tests/streams/readable-streams/garbage-collection.js
+++ /dev/null
@@ -1,75 +0,0 @@
-'use strict';
-
-if (self.importScripts) {
- self.importScripts('../resources/test-utils.js');
- self.importScripts('/resources/testharness.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');
-
-promise_test(t => {
-
- const theError = new Error('boo');
- let controller;
-
- const closedPromise = new ReadableStream({
- start(c) {
- controller = c;
- }
- }).getReader().closed;
-
- garbageCollect();
-
- return delay(50).then(() => controller.error(theError))
- .then(() => promise_rejects(t, theError, closedPromise));
-
-}, 'ReadableStream closed promise should reject even if stream and reader JS references are lost');
-
-promise_test(() => {
-
- const rs = new ReadableStream({});
-
- rs.getReader();
-
- garbageCollect();
-
- return delay(50).then(() => assert_throws(new TypeError(), () => rs.getReader(),
- 'old reader should still be locking the stream even after garbage collection'));
-
-}, 'Garbage-collecting a ReadableStreamReader should not unlock its stream');
-
-done();

Powered by Google App Engine
This is Rietveld 408576698