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

Unified Diff: content/browser/presentation/presentation_service_impl_unittest.cc

Issue 2661053002: [Presentation API] Fix race condition in which state change is lost. (Closed)
Patch Set: Created 3 years, 11 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: content/browser/presentation/presentation_service_impl_unittest.cc
diff --git a/content/browser/presentation/presentation_service_impl_unittest.cc b/content/browser/presentation/presentation_service_impl_unittest.cc
index e0028b71ae41a94645f6dd5197e8a02d0e39d9db..79d9f63581ff416b968631edaf4f5df527cae800 100644
--- a/content/browser/presentation/presentation_service_impl_unittest.cc
+++ b/content/browser/presentation/presentation_service_impl_unittest.cc
@@ -544,7 +544,7 @@ TEST_F(PresentationServiceImplTest, SetDefaultPresentationUrls) {
}
TEST_F(PresentationServiceImplTest,
- ListenForConnectionStateChangeAndChangeState) {
+ ListenForConnectionStateChange) {
content::PresentationSessionInfo connection(presentation_url1_,
kPresentationId);
content::PresentationConnectionStateChangedCallback state_changed_cb;
@@ -555,11 +555,7 @@ TEST_F(PresentationServiceImplTest,
EXPECT_CALL(mock_delegate_, ListenForConnectionStateChange(_, _, _, _))
.WillOnce(SaveArg<3>(&state_changed_cb));
- EXPECT_CALL(mock_client_,
- OnConnectionStateChanged(
- SessionInfoEquals(ByRef(presentation_connection)),
- blink::mojom::PresentationConnectionState::CONNECTED));
- service_impl_->ListenForConnectionStateChangeAndChangeState(connection);
+ service_impl_->ListenForConnectionStateChange(connection);
{
base::RunLoop run_loop;
@@ -580,7 +576,7 @@ TEST_F(PresentationServiceImplTest, ListenForConnectionClose) {
content::PresentationConnectionStateChangedCallback state_changed_cb;
EXPECT_CALL(mock_delegate_, ListenForConnectionStateChange(_, _, _, _))
.WillOnce(SaveArg<3>(&state_changed_cb));
- service_impl_->ListenForConnectionStateChangeAndChangeState(connection);
+ service_impl_->ListenForConnectionStateChange(connection);
// Trigger connection close. It should be propagated back up to
// |mock_client_|.

Powered by Google App Engine
This is Rietveld 408576698