| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 133 |
| 134 mojom::RendererClientAssociatedPtrInfo client_ptr_info; | 134 mojom::RendererClientAssociatedPtrInfo client_ptr_info; |
| 135 renderer_client_binding_.Bind(&client_ptr_info, | 135 renderer_client_binding_.Bind(&client_ptr_info, |
| 136 renderer_.associated_group()); | 136 renderer_.associated_group()); |
| 137 | 137 |
| 138 EXPECT_CALL(*this, OnRendererInitialized(expected_result)) | 138 EXPECT_CALL(*this, OnRendererInitialized(expected_result)) |
| 139 .Times(Exactly(1)) | 139 .Times(Exactly(1)) |
| 140 .WillOnce(InvokeWithoutArgs(run_loop_.get(), &base::RunLoop::Quit)); | 140 .WillOnce(InvokeWithoutArgs(run_loop_.get(), &base::RunLoop::Quit)); |
| 141 std::vector<mojom::DemuxerStreamPtr> streams; | 141 std::vector<mojom::DemuxerStreamPtr> streams; |
| 142 streams.push_back(std::move(video_stream_proxy)); | 142 streams.push_back(std::move(video_stream_proxy)); |
| 143 renderer_->Initialize(std::move(client_ptr_info), std::move(streams), | 143 renderer_->Initialize(std::move(client_ptr_info), |
| 144 MediaResource::kInvalidRemoteId, std::move(streams), |
| 144 nullptr, nullptr, base::nullopt, base::nullopt, | 145 nullptr, nullptr, base::nullopt, base::nullopt, |
| 145 base::Bind(&MediaServiceTest::OnRendererInitialized, | 146 base::Bind(&MediaServiceTest::OnRendererInitialized, |
| 146 base::Unretained(this))); | 147 base::Unretained(this))); |
| 147 } | 148 } |
| 148 | 149 |
| 149 MOCK_METHOD0(ConnectionClosed, void()); | 150 MOCK_METHOD0(ConnectionClosed, void()); |
| 150 | 151 |
| 151 protected: | 152 protected: |
| 152 std::unique_ptr<service_manager::Connection> connection_; | 153 std::unique_ptr<service_manager::Connection> connection_; |
| 153 std::unique_ptr<base::RunLoop> run_loop_; | 154 std::unique_ptr<base::RunLoop> run_loop_; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 // close the connection. | 215 // close the connection. |
| 215 EXPECT_CALL(*this, ConnectionClosed()) | 216 EXPECT_CALL(*this, ConnectionClosed()) |
| 216 .Times(Exactly(1)) | 217 .Times(Exactly(1)) |
| 217 .WillOnce(Invoke(run_loop_.get(), &base::RunLoop::Quit)); | 218 .WillOnce(Invoke(run_loop_.get(), &base::RunLoop::Quit)); |
| 218 interface_factory_.reset(); | 219 interface_factory_.reset(); |
| 219 | 220 |
| 220 run_loop_->Run(); | 221 run_loop_->Run(); |
| 221 } | 222 } |
| 222 | 223 |
| 223 } // namespace media | 224 } // namespace media |
| OLD | NEW |