| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  109     video_stream_.set_video_decoder_config(video_config); |  109     video_stream_.set_video_decoder_config(video_config); | 
|  110  |  110  | 
|  111     mojom::DemuxerStreamPtr video_stream_proxy; |  111     mojom::DemuxerStreamPtr video_stream_proxy; | 
|  112     mojo_video_stream_.reset(new MojoDemuxerStreamImpl( |  112     mojo_video_stream_.reset(new MojoDemuxerStreamImpl( | 
|  113         &video_stream_, GetProxy(&video_stream_proxy))); |  113         &video_stream_, GetProxy(&video_stream_proxy))); | 
|  114  |  114  | 
|  115     EXPECT_CALL(*this, OnRendererInitialized(expected_result)) |  115     EXPECT_CALL(*this, OnRendererInitialized(expected_result)) | 
|  116         .Times(Exactly(1)) |  116         .Times(Exactly(1)) | 
|  117         .WillOnce(InvokeWithoutArgs(run_loop_.get(), &base::RunLoop::Quit)); |  117         .WillOnce(InvokeWithoutArgs(run_loop_.get(), &base::RunLoop::Quit)); | 
|  118     renderer_->Initialize(renderer_client_binding_.CreateInterfacePtrAndBind(), |  118     renderer_->Initialize(renderer_client_binding_.CreateInterfacePtrAndBind(), | 
|  119                           nullptr, std::move(video_stream_proxy), |  119                           nullptr, std::move(video_stream_proxy), base::nullopt, | 
|  120                           base::Bind(&MediaServiceTest::OnRendererInitialized, |  120                           base::Bind(&MediaServiceTest::OnRendererInitialized, | 
|  121                                      base::Unretained(this))); |  121                                      base::Unretained(this))); | 
|  122   } |  122   } | 
|  123  |  123  | 
|  124   MOCK_METHOD0(ConnectionClosed, void()); |  124   MOCK_METHOD0(ConnectionClosed, void()); | 
|  125  |  125  | 
|  126  protected: |  126  protected: | 
|  127   std::unique_ptr<base::RunLoop> run_loop_; |  127   std::unique_ptr<base::RunLoop> run_loop_; | 
|  128  |  128  | 
|  129   mojom::ServiceFactoryPtr service_factory_; |  129   mojom::ServiceFactoryPtr service_factory_; | 
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  187   // close the connection. |  187   // close the connection. | 
|  188   EXPECT_CALL(*this, ConnectionClosed()) |  188   EXPECT_CALL(*this, ConnectionClosed()) | 
|  189       .Times(Exactly(1)) |  189       .Times(Exactly(1)) | 
|  190       .WillOnce(Invoke(run_loop_.get(), &base::RunLoop::Quit)); |  190       .WillOnce(Invoke(run_loop_.get(), &base::RunLoop::Quit)); | 
|  191   service_factory_.reset(); |  191   service_factory_.reset(); | 
|  192  |  192  | 
|  193   run_loop_->Run(); |  193   run_loop_->Run(); | 
|  194 } |  194 } | 
|  195  |  195  | 
|  196 }  // namespace media |  196 }  // namespace media | 
| OLD | NEW |