OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/files/scoped_temp_dir.h" | 5 #include "base/files/scoped_temp_dir.h" |
6 #include "shell/application_manager/application_manager.h" | 6 #include "shell/application_manager/application_manager.h" |
| 7 #include "shell/application_manager/native_application_options.h" |
7 #include "shell/context.h" | 8 #include "shell/context.h" |
8 #include "shell/filename_util.h" | 9 #include "shell/filename_util.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
10 | 11 |
11 namespace shell { | 12 namespace shell { |
12 namespace { | 13 namespace { |
13 | 14 |
14 struct TestState { | 15 struct TestState { |
15 TestState() | 16 TestState() |
16 : runner_was_created(false), | 17 : runner_was_created(false), |
(...skipping 21 matching lines...) Expand all Loading... |
38 } | 39 } |
39 | 40 |
40 private: | 41 private: |
41 TestState* state_; | 42 TestState* state_; |
42 }; | 43 }; |
43 | 44 |
44 class TestNativeRunnerFactory : public NativeRunnerFactory { | 45 class TestNativeRunnerFactory : public NativeRunnerFactory { |
45 public: | 46 public: |
46 explicit TestNativeRunnerFactory(TestState* state) : state_(state) {} | 47 explicit TestNativeRunnerFactory(TestState* state) : state_(state) {} |
47 ~TestNativeRunnerFactory() override {} | 48 ~TestNativeRunnerFactory() override {} |
48 scoped_ptr<NativeRunner> Create(const Options& options) override { | 49 scoped_ptr<NativeRunner> Create( |
| 50 const NativeApplicationOptions& /*options*/) override { |
49 return scoped_ptr<NativeRunner>(new TestNativeRunner(state_)); | 51 return scoped_ptr<NativeRunner>(new TestNativeRunner(state_)); |
50 } | 52 } |
51 | 53 |
52 private: | 54 private: |
53 TestState* state_; | 55 TestState* state_; |
54 }; | 56 }; |
55 | 57 |
56 class NativeApplicationLoaderTest : public testing::Test, | 58 class NativeApplicationLoaderTest : public testing::Test, |
57 public ApplicationManager::Delegate { | 59 public ApplicationManager::Delegate { |
58 public: | 60 public: |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 mojo::ServiceProviderPtr service_provider; | 92 mojo::ServiceProviderPtr service_provider; |
91 application_manager_.ConnectToApplication( | 93 application_manager_.ConnectToApplication( |
92 url, GURL(), services.Pass(), service_provider.Pass(), base::Closure()); | 94 url, GURL(), services.Pass(), service_provider.Pass(), base::Closure()); |
93 EXPECT_FALSE(state_.runner_was_created); | 95 EXPECT_FALSE(state_.runner_was_created); |
94 EXPECT_FALSE(state_.runner_was_started); | 96 EXPECT_FALSE(state_.runner_was_started); |
95 EXPECT_FALSE(state_.runner_was_destroyed); | 97 EXPECT_FALSE(state_.runner_was_destroyed); |
96 } | 98 } |
97 | 99 |
98 } // namespace | 100 } // namespace |
99 } // namespace shell | 101 } // namespace shell |
OLD | NEW |