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

Side by Side Diff: content/renderer/presentation/presentation_connection_proxy_unittest.cc

Issue 2863903002: [Presentation API] Change controller connection to 'terminated' when receiver connection terminates (Closed)
Patch Set: fix layout test failures Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <memory> 5 #include <memory>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "content/public/test/test_browser_thread_bundle.h" 9 #include "content/public/test/test_browser_thread_bundle.h"
10 #include "content/renderer/presentation/presentation_connection_proxy.h" 10 #include "content/renderer/presentation/presentation_connection_proxy.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 112
113 TEST_F(PresentationConnectionProxyTest, TestReceiverConnectionCallsClose) { 113 TEST_F(PresentationConnectionProxyTest, TestReceiverConnectionCallsClose) {
114 base::RunLoop run_loop; 114 base::RunLoop run_loop;
115 EXPECT_CALL(*controller_connection_, DidClose()); 115 EXPECT_CALL(*controller_connection_, DidClose());
116 EXPECT_CALL(*receiver_connection_, DidClose()); 116 EXPECT_CALL(*receiver_connection_, DidClose());
117 receiver_connection_proxy_->Close(); 117 receiver_connection_proxy_->Close();
118 run_loop.RunUntilIdle(); 118 run_loop.RunUntilIdle();
119 } 119 }
120 120
121 TEST_F(PresentationConnectionProxyTest, TestReceiverNotifyTargetConnection) {
122 base::RunLoop run_loop;
123 EXPECT_CALL(
124 *controller_connection_,
125 DidChangeState(blink::WebPresentationConnectionState::kTerminated));
126 receiver_connection_proxy_->NotifyTargetConnection(
127 blink::WebPresentationConnectionState::kTerminated);
128 run_loop.RunUntilIdle();
129 }
130
121 } // namespace content 131 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698