| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |