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

Side by Side Diff: media/mojo/services/media_mojo_unittest.cc

Issue 2230583002: Add MediaPlayerRenderer/MediaPlayerRendererClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added MEDIA_EXPORT. Created 4 years, 4 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
« no previous file with comments | « media/mojo/interfaces/renderer.mojom ('k') | media/mojo/services/mojo_renderer_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « media/mojo/interfaces/renderer.mojom ('k') | media/mojo/services/mojo_renderer_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698