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

Side by Side Diff: mojo/public/cpp/bindings/tests/versioning_apptest.cc

Issue 1916233002: Mark ApplicationImpl::ConnectTo{Application,Service}() as deprecated. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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
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 "mojo/public/cpp/application/application_impl.h" 5 #include "mojo/public/cpp/application/application_impl.h"
6 #include "mojo/public/cpp/application/application_test_base.h" 6 #include "mojo/public/cpp/application/application_test_base.h"
7 #include "mojo/public/cpp/system/macros.h" 7 #include "mojo/public/cpp/system/macros.h"
8 #include "mojo/public/interfaces/bindings/tests/versioning_test_client.mojom.h" 8 #include "mojo/public/interfaces/bindings/tests/versioning_test_client.mojom.h"
9 9
10 namespace mojo { 10 namespace mojo {
11 namespace test { 11 namespace test {
12 namespace versioning { 12 namespace versioning {
13 13
14 class VersioningApplicationTest : public ApplicationTestBase { 14 class VersioningApplicationTest : public ApplicationTestBase {
15 public: 15 public:
16 VersioningApplicationTest() : ApplicationTestBase() {} 16 VersioningApplicationTest() : ApplicationTestBase() {}
17 ~VersioningApplicationTest() override {} 17 ~VersioningApplicationTest() override {}
18 18
19 protected: 19 protected:
20 // ApplicationTestBase overrides. 20 // ApplicationTestBase overrides.
21 void SetUp() override { 21 void SetUp() override {
22 ApplicationTestBase::SetUp(); 22 ApplicationTestBase::SetUp();
23 23
24 application_impl()->ConnectToService("mojo:versioning_test_service", 24 application_impl()->ConnectToServiceDeprecated(
25 &database_); 25 "mojo:versioning_test_service", &database_);
26 } 26 }
27 27
28 HumanResourceDatabasePtr database_; 28 HumanResourceDatabasePtr database_;
29 29
30 private: 30 private:
31 MOJO_DISALLOW_COPY_AND_ASSIGN(VersioningApplicationTest); 31 MOJO_DISALLOW_COPY_AND_ASSIGN(VersioningApplicationTest);
32 }; 32 };
33 33
34 TEST_F(VersioningApplicationTest, Struct) { 34 TEST_F(VersioningApplicationTest, Struct) {
35 // The service side uses a newer version of Employee defintion. 35 // The service side uses a newer version of Employee defintion.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // Calling a version 2 method (which the service side doesn't support) closes 112 // Calling a version 2 method (which the service side doesn't support) closes
113 // the pipe. 113 // the pipe.
114 database_->ListEmployeeIds([](Array<uint64_t> ids) { EXPECT_TRUE(false); }); 114 database_->ListEmployeeIds([](Array<uint64_t> ids) { EXPECT_TRUE(false); });
115 database_.WaitForIncomingResponse(); 115 database_.WaitForIncomingResponse();
116 EXPECT_TRUE(database_.encountered_error()); 116 EXPECT_TRUE(database_.encountered_error());
117 } 117 }
118 118
119 } // namespace versioning 119 } // namespace versioning
120 } // namespace examples 120 } // namespace examples
121 } // namespace mojo 121 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/application/lib/application_impl.cc ('k') | mojo/services/files/c/tests/mojio_impl_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698