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 #ifndef MOJO_SHELL_PUBLIC_CPP_SHELL_TEST_H_ | 5 #ifndef MOJO_SHELL_PUBLIC_CPP_SHELL_TEST_H_ |
6 #define MOJO_SHELL_PUBLIC_CPP_SHELL_TEST_H_ | 6 #define MOJO_SHELL_PUBLIC_CPP_SHELL_TEST_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "mojo/public/cpp/system/macros.h" | 9 #include "mojo/public/cpp/system/macros.h" |
10 #include "mojo/shell/public/cpp/connector.h" | 10 #include "mojo/shell/public/cpp/connector.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 // to customize this should subclass this class instead of ShellClient, | 28 // to customize this should subclass this class instead of ShellClient, |
29 // otherwise they will have to call ShellTest::InitializeCalled() to forward | 29 // otherwise they will have to call ShellTest::InitializeCalled() to forward |
30 // metadata from Initialize() to the test. | 30 // metadata from Initialize() to the test. |
31 class ShellTestClient : public mojo::ShellClient { | 31 class ShellTestClient : public mojo::ShellClient { |
32 public: | 32 public: |
33 explicit ShellTestClient(ShellTest* test); | 33 explicit ShellTestClient(ShellTest* test); |
34 ~ShellTestClient() override; | 34 ~ShellTestClient() override; |
35 | 35 |
36 protected: | 36 protected: |
37 void Initialize(Connector* connector, | 37 void Initialize(Connector* connector, |
38 const std::string& name, | 38 const Identity& identity, |
39 const std::string& user_id, | |
40 uint32_t id) override; | 39 uint32_t id) override; |
41 | 40 |
42 private: | 41 private: |
43 ShellTest* test_; | 42 ShellTest* test_; |
44 | 43 |
45 DISALLOW_COPY_AND_ASSIGN(ShellTestClient); | 44 DISALLOW_COPY_AND_ASSIGN(ShellTestClient); |
46 }; | 45 }; |
47 | 46 |
48 class ShellTest : public testing::Test { | 47 class ShellTest : public testing::Test { |
49 public: | 48 public: |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 std::string initialize_userid_ = shell::mojom::kInheritUserID; | 98 std::string initialize_userid_ = shell::mojom::kInheritUserID; |
100 uint32_t initialize_instance_id_ = shell::mojom::kInvalidInstanceID; | 99 uint32_t initialize_instance_id_ = shell::mojom::kInvalidInstanceID; |
101 | 100 |
102 DISALLOW_COPY_AND_ASSIGN(ShellTest); | 101 DISALLOW_COPY_AND_ASSIGN(ShellTest); |
103 }; | 102 }; |
104 | 103 |
105 } // namespace test | 104 } // namespace test |
106 } // namespace mojo | 105 } // namespace mojo |
107 | 106 |
108 #endif // MOJO_SHELL_PUBLIC_CPP_SHELL_TEST_H_ | 107 #endif // MOJO_SHELL_PUBLIC_CPP_SHELL_TEST_H_ |
OLD | NEW |