| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 private: | 101 private: |
| 102 class TestService : public test::ServiceTestClient { | 102 class TestService : public test::ServiceTestClient { |
| 103 public: | 103 public: |
| 104 explicit TestService(ConnectTest* connect_test) | 104 explicit TestService(ConnectTest* connect_test) |
| 105 : test::ServiceTestClient(connect_test), | 105 : test::ServiceTestClient(connect_test), |
| 106 connect_test_(connect_test) {} | 106 connect_test_(connect_test) {} |
| 107 ~TestService() override {} | 107 ~TestService() override {} |
| 108 | 108 |
| 109 private: | 109 private: |
| 110 bool OnConnect(Connection* connection) override { | 110 bool OnConnect(const Identity& remote_identity, |
| 111 connection->AddInterface<test::mojom::ExposedInterface>(connect_test_); | 111 InterfaceRegistry* registry) override { |
| 112 registry->AddInterface<test::mojom::ExposedInterface>(connect_test_); |
| 112 return true; | 113 return true; |
| 113 } | 114 } |
| 114 | 115 |
| 115 ConnectTest* connect_test_; | 116 ConnectTest* connect_test_; |
| 116 | 117 |
| 117 DISALLOW_COPY_AND_ASSIGN(TestService); | 118 DISALLOW_COPY_AND_ASSIGN(TestService); |
| 118 }; | 119 }; |
| 119 | 120 |
| 120 // test::ServiceTest: | 121 // test::ServiceTest: |
| 121 void SetUp() override { | 122 void SetUp() override { |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 base::RunLoop loop; | 406 base::RunLoop loop; |
| 406 inherit_connection->AddConnectionCompletedClosure( | 407 inherit_connection->AddConnectionCompletedClosure( |
| 407 base::Bind(&QuitLoop, &loop)); | 408 base::Bind(&QuitLoop, &loop)); |
| 408 loop.Run(); | 409 loop.Run(); |
| 409 EXPECT_EQ(inherit_connection->GetRemoteIdentity().user_id(), | 410 EXPECT_EQ(inherit_connection->GetRemoteIdentity().user_id(), |
| 410 connection->GetRemoteIdentity().user_id()); | 411 connection->GetRemoteIdentity().user_id()); |
| 411 } | 412 } |
| 412 } | 413 } |
| 413 | 414 |
| 414 } // namespace shell | 415 } // namespace shell |
| OLD | NEW |