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

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

Issue 1725353003: Eliminate mojo::Shell client lib class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@15connector
Patch Set: . Created 4 years, 9 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 | « mash/wm/window_manager_apptest.cc ('k') | media/mojo/services/mojo_media_application.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 #include <utility> 6 #include <utility>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 class MediaAppTest : public mojo::test::ApplicationTestBase { 52 class MediaAppTest : public mojo::test::ApplicationTestBase {
53 public: 53 public:
54 MediaAppTest() 54 MediaAppTest()
55 : renderer_client_binding_(&renderer_client_), 55 : renderer_client_binding_(&renderer_client_),
56 video_demuxer_stream_(DemuxerStream::VIDEO) {} 56 video_demuxer_stream_(DemuxerStream::VIDEO) {}
57 ~MediaAppTest() override {} 57 ~MediaAppTest() override {}
58 58
59 void SetUp() override { 59 void SetUp() override {
60 ApplicationTestBase::SetUp(); 60 ApplicationTestBase::SetUp();
61 61
62 connection_ = shell()->Connect("mojo:media"); 62 connection_ = connector()->Connect("mojo:media");
63 connection_->SetRemoteInterfaceProviderConnectionErrorHandler( 63 connection_->SetRemoteInterfaceProviderConnectionErrorHandler(
64 base::Bind(&MediaAppTest::ConnectionClosed, base::Unretained(this))); 64 base::Bind(&MediaAppTest::ConnectionClosed, base::Unretained(this)));
65 65
66 connection_->GetInterface(&service_factory_); 66 connection_->GetInterface(&service_factory_);
67 service_factory_->CreateCdm(mojo::GetProxy(&cdm_)); 67 service_factory_->CreateCdm(mojo::GetProxy(&cdm_));
68 service_factory_->CreateRenderer(mojo::GetProxy(&renderer_)); 68 service_factory_->CreateRenderer(mojo::GetProxy(&renderer_));
69 69
70 run_loop_.reset(new base::RunLoop()); 70 run_loop_.reset(new base::RunLoop());
71 } 71 }
72 72
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // close the connection. 162 // close the connection.
163 EXPECT_CALL(*this, ConnectionClosed()) 163 EXPECT_CALL(*this, ConnectionClosed())
164 .Times(Exactly(1)) 164 .Times(Exactly(1))
165 .WillOnce(Invoke(run_loop_.get(), &base::RunLoop::Quit)); 165 .WillOnce(Invoke(run_loop_.get(), &base::RunLoop::Quit));
166 service_factory_.reset(); 166 service_factory_.reset();
167 167
168 run_loop_->Run(); 168 run_loop_->Run();
169 } 169 }
170 170
171 } // namespace media 171 } // namespace media
OLDNEW
« no previous file with comments | « mash/wm/window_manager_apptest.cc ('k') | media/mojo/services/mojo_media_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698