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

Unified Diff: Source/core/streams/ReadableStreamTest.cpp

Issue 456233002: Use ScriptPromiseProperty::reset in ReadableStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « Source/core/streams/ReadableStream.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/streams/ReadableStreamTest.cpp
diff --git a/Source/core/streams/ReadableStreamTest.cpp b/Source/core/streams/ReadableStreamTest.cpp
index 9104acfdb4a4ed6ea52e50f34bf4c14af99ca0b2..edbc0c9ea68db308df297e055869e882da74a868 100644
--- a/Source/core/streams/ReadableStreamTest.cpp
+++ b/Source/core/streams/ReadableStreamTest.cpp
@@ -385,9 +385,7 @@ TEST_F(ReadableStreamTest, WaitAndEnqueueAndError)
stream->error(DOMException::create(NotFoundError, "error"));
EXPECT_EQ(ReadableStream::Errored, stream->state());
- // FIXME: This expectation should hold but doesn't because of
- // a ScriptPromiseProperty bug. Enable it when the defect is fixed.
- // EXPECT_NE(promise, stream->wait(scriptState()));
+ EXPECT_NE(promise, stream->wait(scriptState()));
}
TEST_F(ReadableStreamTest, CloseWhenWaiting)
@@ -515,11 +513,9 @@ TEST_F(ReadableStreamTest, EnqueuedAndRead)
ScriptPromise newPromise = stream->wait(scriptState());
newPromise.then(createCaptor(&onFulfilled), createCaptor(&onRejected));
isolate()->RunMicrotasks();
- // FIXME: Uncomment the following assertions once
- // |ScriptPromiseProperty.reset| is implemented and used.
- // EXPECT_NE(promise, newPromise);
- // EXPECT_TRUE(onFulfilled.isNull());
- // EXPECT_TRUE(onRejected.isNull());
+ EXPECT_NE(promise, newPromise);
+ EXPECT_TRUE(onFulfilled.isNull());
+ EXPECT_TRUE(onRejected.isNull());
}
TEST_F(ReadableStreamTest, EnqueTwiceAndRead)
@@ -585,9 +581,7 @@ TEST_F(ReadableStreamTest, CloseWhenReadable)
EXPECT_EQ("bye", chunk);
EXPECT_FALSE(m_exceptionState.hadException());
- // FIXME: This assertion should be enabled once
- // ScriptPromiseProperty.reset is implemented and used.
- // EXPECT_NE(promise, stream->wait(scriptState()));
+ EXPECT_NE(promise, stream->wait(scriptState()));
stream->wait(scriptState()).then(createCaptor(&onWaitFulfilled), createCaptor(&onWaitRejected));
EXPECT_EQ(ReadableStream::Closed, stream->state());
@@ -690,9 +684,7 @@ TEST_F(ReadableStreamTest, CancelWhenReadable)
EXPECT_EQ(promise, stream->cancel(scriptState(), reason));
EXPECT_EQ(ReadableStream::Closed, stream->state());
- // FIXME: Uncomment this once ScriptPromiseProperty::reset is implemented
- // and used.
- // EXPECT_NE(stream->wait(scriptState()), wait);
+ EXPECT_NE(stream->wait(scriptState()), wait);
stream->wait(scriptState()).then(createCaptor(&onFulfilled), createCaptor(&onRejected));
EXPECT_TRUE(onFulfilled.isNull());
« no previous file with comments | « Source/core/streams/ReadableStream.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698