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

Side by Side Diff: services/contacts/contacts_apptest.cc

Issue 1915403002: ApplicationImpl::ConnectToServiceDeprecated() -> mojo::ConnectToService() conversion, part 2. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: doh Created 4 years, 8 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 | « services/clipboard/clipboard_apptest.cc ('k') | services/dart/content_handler_main.cc » ('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 "base/run_loop.h" 5 #include "base/run_loop.h"
6 #include "mojo/public/cpp/application/application_impl.h" 6 #include "mojo/public/cpp/application/application_impl.h"
7 #include "mojo/public/cpp/application/application_test_base.h" 7 #include "mojo/public/cpp/application/application_test_base.h"
8 #include "mojo/public/cpp/application/connect.h"
8 #include "mojo/services/contacts/interfaces/contacts.mojom.h" 9 #include "mojo/services/contacts/interfaces/contacts.mojom.h"
9 10
10 namespace contacts { 11 namespace contacts {
11 12
12 class ContactAppTest : public mojo::test::ApplicationTestBase { 13 class ContactAppTest : public mojo::test::ApplicationTestBase {
13 public: 14 public:
14 ContactAppTest() : ApplicationTestBase() {} 15 ContactAppTest() : ApplicationTestBase() {}
15 ~ContactAppTest() override {} 16 ~ContactAppTest() override {}
16 17
17 void SetUp() override { 18 void SetUp() override {
18 mojo::test::ApplicationTestBase::SetUp(); 19 mojo::test::ApplicationTestBase::SetUp();
19 application_impl()->ConnectToServiceDeprecated("mojo:contacts", 20 mojo::ConnectToService(application_impl()->shell(), "mojo:contacts",
20 &contacts_service_); 21 GetProxy(&contacts_service_));
21 } 22 }
22 23
23 protected: 24 protected:
24 contacts::ContactsServicePtr contacts_service_; 25 contacts::ContactsServicePtr contacts_service_;
25 26
26 DISALLOW_COPY_AND_ASSIGN(ContactAppTest); 27 DISALLOW_COPY_AND_ASSIGN(ContactAppTest);
27 }; 28 };
28 29
29 TEST_F(ContactAppTest, Count) { 30 TEST_F(ContactAppTest, Count) {
30 uint64_t count; 31 uint64_t count;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 83
83 contacts_service_->GetPhoto(0, true, [&url](const mojo::String& u) { 84 contacts_service_->GetPhoto(0, true, [&url](const mojo::String& u) {
84 url = u; 85 url = u;
85 base::MessageLoop::current()->QuitWhenIdle(); 86 base::MessageLoop::current()->QuitWhenIdle();
86 }); 87 });
87 { base::RunLoop().Run(); }; 88 { base::RunLoop().Run(); };
88 EXPECT_TRUE(url.is_null()); 89 EXPECT_TRUE(url.is_null());
89 } 90 }
90 91
91 } // namespace contacts 92 } // namespace contacts
OLDNEW
« no previous file with comments | « services/clipboard/clipboard_apptest.cc ('k') | services/dart/content_handler_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698