| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 mojom::RendererClientAssociatedPtrInfo client_ptr_info; | 120 mojom::RendererClientAssociatedPtrInfo client_ptr_info; |
| 121 renderer_client_binding_.Bind(&client_ptr_info, | 121 renderer_client_binding_.Bind(&client_ptr_info, |
| 122 renderer_.associated_group()); | 122 renderer_.associated_group()); |
| 123 | 123 |
| 124 EXPECT_CALL(*this, OnRendererInitialized(expected_result)) | 124 EXPECT_CALL(*this, OnRendererInitialized(expected_result)) |
| 125 .Times(Exactly(1)) | 125 .Times(Exactly(1)) |
| 126 .WillOnce(InvokeWithoutArgs(run_loop_.get(), &base::RunLoop::Quit)); | 126 .WillOnce(InvokeWithoutArgs(run_loop_.get(), &base::RunLoop::Quit)); |
| 127 renderer_->Initialize(std::move(client_ptr_info), nullptr, | 127 renderer_->Initialize(std::move(client_ptr_info), nullptr, |
| 128 std::move(video_stream_proxy), base::nullopt, | 128 std::move(video_stream_proxy), base::nullopt, |
| 129 base::nullopt, |
| 129 base::Bind(&MediaServiceTest::OnRendererInitialized, | 130 base::Bind(&MediaServiceTest::OnRendererInitialized, |
| 130 base::Unretained(this))); | 131 base::Unretained(this))); |
| 131 } | 132 } |
| 132 | 133 |
| 133 MOCK_METHOD0(ConnectionClosed, void()); | 134 MOCK_METHOD0(ConnectionClosed, void()); |
| 134 | 135 |
| 135 protected: | 136 protected: |
| 136 std::unique_ptr<base::RunLoop> run_loop_; | 137 std::unique_ptr<base::RunLoop> run_loop_; |
| 137 | 138 |
| 138 mojom::ServiceFactoryPtr service_factory_; | 139 mojom::ServiceFactoryPtr service_factory_; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 // close the connection. | 197 // close the connection. |
| 197 EXPECT_CALL(*this, ConnectionClosed()) | 198 EXPECT_CALL(*this, ConnectionClosed()) |
| 198 .Times(Exactly(1)) | 199 .Times(Exactly(1)) |
| 199 .WillOnce(Invoke(run_loop_.get(), &base::RunLoop::Quit)); | 200 .WillOnce(Invoke(run_loop_.get(), &base::RunLoop::Quit)); |
| 200 service_factory_.reset(); | 201 service_factory_.reset(); |
| 201 | 202 |
| 202 run_loop_->Run(); | 203 run_loop_->Run(); |
| 203 } | 204 } |
| 204 | 205 |
| 205 } // namespace media | 206 } // namespace media |
| OLD | NEW |