| 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 SERVICES_SHELL_PUBLIC_CPP_SERVICE_TEST_H_ | 5 #ifndef SERVICES_SHELL_PUBLIC_CPP_SERVICE_TEST_H_ |
| 6 #define SERVICES_SHELL_PUBLIC_CPP_SERVICE_TEST_H_ | 6 #define SERVICES_SHELL_PUBLIC_CPP_SERVICE_TEST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "services/shell/public/cpp/connector.h" | 11 #include "services/shell/public/cpp/connector.h" |
| 12 #include "services/shell/public/cpp/service.h" | 12 #include "services/shell/public/cpp/service.h" |
| 13 #include "services/shell/public/cpp/shell_connection.h" | 13 #include "services/shell/public/cpp/service_context.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class MessageLoop; | 17 class MessageLoop; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace shell { | 20 namespace shell { |
| 21 | 21 |
| 22 class BackgroundShell; | 22 class BackgroundShell; |
| 23 | 23 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 void SetUp() override; | 84 void SetUp() override; |
| 85 void TearDown() override; | 85 void TearDown() override; |
| 86 | 86 |
| 87 private: | 87 private: |
| 88 friend ServiceTestClient; | 88 friend ServiceTestClient; |
| 89 | 89 |
| 90 std::unique_ptr<Service> service_; | 90 std::unique_ptr<Service> service_; |
| 91 | 91 |
| 92 std::unique_ptr<base::MessageLoop> message_loop_; | 92 std::unique_ptr<base::MessageLoop> message_loop_; |
| 93 std::unique_ptr<BackgroundShell> background_shell_; | 93 std::unique_ptr<BackgroundShell> background_shell_; |
| 94 std::unique_ptr<ShellConnection> shell_connection_; | 94 std::unique_ptr<ServiceContext> service_context_; |
| 95 | 95 |
| 96 // See constructor. | 96 // See constructor. |
| 97 std::string test_name_; | 97 std::string test_name_; |
| 98 | 98 |
| 99 Connector* connector_ = nullptr; | 99 Connector* connector_ = nullptr; |
| 100 std::string initialize_name_; | 100 std::string initialize_name_; |
| 101 std::string initialize_userid_ = shell::mojom::kInheritUserID; | 101 std::string initialize_userid_ = shell::mojom::kInheritUserID; |
| 102 uint32_t initialize_instance_id_ = shell::mojom::kInvalidInstanceID; | 102 uint32_t initialize_instance_id_ = shell::mojom::kInvalidInstanceID; |
| 103 | 103 |
| 104 base::Closure initialize_called_; | 104 base::Closure initialize_called_; |
| 105 | 105 |
| 106 DISALLOW_COPY_AND_ASSIGN(ServiceTest); | 106 DISALLOW_COPY_AND_ASSIGN(ServiceTest); |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 } // namespace test | 109 } // namespace test |
| 110 } // namespace shell | 110 } // namespace shell |
| 111 | 111 |
| 112 #endif // SERVICES_SHELL_PUBLIC_CPP_SERVICE_TEST_H_ | 112 #endif // SERVICES_SHELL_PUBLIC_CPP_SERVICE_TEST_H_ |
| OLD | NEW |