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

Side by Side Diff: mojo/public/cpp/bindings/tests/versioning_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, 10 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/test/pipeline_integration_test.cc ('k') | mojo/services/network/cookie_store_impl.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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "mojo/public/cpp/system/macros.h" 8 #include "mojo/public/cpp/system/macros.h"
9 #include "mojo/public/interfaces/bindings/tests/versioning_test_client.mojom.h" 9 #include "mojo/public/interfaces/bindings/tests/versioning_test_client.mojom.h"
10 #include "mojo/shell/public/cpp/application_test_base.h" 10 #include "mojo/shell/public/cpp/application_test_base.h"
11 #include "mojo/shell/public/cpp/shell.h" 11 #include "mojo/shell/public/cpp/connector.h"
12 12
13 namespace mojo { 13 namespace mojo {
14 namespace test { 14 namespace test {
15 namespace versioning { 15 namespace versioning {
16 16
17 class VersioningApplicationTest : public ApplicationTestBase { 17 class VersioningApplicationTest : public ApplicationTestBase {
18 public: 18 public:
19 VersioningApplicationTest() : ApplicationTestBase() {} 19 VersioningApplicationTest() : ApplicationTestBase() {}
20 ~VersioningApplicationTest() override {} 20 ~VersioningApplicationTest() override {}
21 21
22 protected: 22 protected:
23 // ApplicationTestBase overrides. 23 // ApplicationTestBase overrides.
24 void SetUp() override { 24 void SetUp() override {
25 ApplicationTestBase::SetUp(); 25 ApplicationTestBase::SetUp();
26 26
27 shell()->ConnectToInterface("mojo:versioning_test_service", &database_); 27 connector()->ConnectToInterface("mojo:versioning_test_service", &database_);
28 } 28 }
29 29
30 HumanResourceDatabasePtr database_; 30 HumanResourceDatabasePtr database_;
31 31
32 private: 32 private:
33 MOJO_DISALLOW_COPY_AND_ASSIGN(VersioningApplicationTest); 33 MOJO_DISALLOW_COPY_AND_ASSIGN(VersioningApplicationTest);
34 }; 34 };
35 35
36 TEST_F(VersioningApplicationTest, Struct) { 36 TEST_F(VersioningApplicationTest, Struct) {
37 // The service side uses a newer version of Employee defintion. 37 // The service side uses a newer version of Employee defintion.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // Calling a version 2 method (which the service side doesn't support) closes 114 // Calling a version 2 method (which the service side doesn't support) closes
115 // the pipe. 115 // the pipe.
116 database_->ListEmployeeIds([](Array<uint64_t> ids) { EXPECT_TRUE(false); }); 116 database_->ListEmployeeIds([](Array<uint64_t> ids) { EXPECT_TRUE(false); });
117 database_.WaitForIncomingResponse(); 117 database_.WaitForIncomingResponse();
118 EXPECT_TRUE(database_.encountered_error()); 118 EXPECT_TRUE(database_.encountered_error());
119 } 119 }
120 120
121 } // namespace versioning 121 } // namespace versioning
122 } // namespace examples 122 } // namespace examples
123 } // namespace mojo 123 } // namespace mojo
OLDNEW
« no previous file with comments | « media/test/pipeline_integration_test.cc ('k') | mojo/services/network/cookie_store_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698