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 "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "mojo/package_manager/package_manager_impl.h" | 7 #include "mojo/package_manager/package_manager_impl.h" |
8 #include "mojo/runner/context.h" | 8 #include "mojo/runner/context.h" |
9 #include "mojo/shell/application_manager.h" | 9 #include "mojo/shell/application_manager.h" |
10 #include "mojo/util/filename_util.h" | 10 #include "mojo/util/filename_util.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 } | 43 } |
44 | 44 |
45 private: | 45 private: |
46 TestState* state_; | 46 TestState* state_; |
47 }; | 47 }; |
48 | 48 |
49 class TestNativeRunnerFactory : public shell::NativeRunnerFactory { | 49 class TestNativeRunnerFactory : public shell::NativeRunnerFactory { |
50 public: | 50 public: |
51 explicit TestNativeRunnerFactory(TestState* state) : state_(state) {} | 51 explicit TestNativeRunnerFactory(TestState* state) : state_(state) {} |
52 ~TestNativeRunnerFactory() override {} | 52 ~TestNativeRunnerFactory() override {} |
53 scoped_ptr<shell::NativeRunner> Create() override { | 53 scoped_ptr<shell::NativeRunner> Create(const base::FilePath& path) override { |
54 return scoped_ptr<shell::NativeRunner>(new TestNativeRunner(state_)); | 54 return scoped_ptr<shell::NativeRunner>(new TestNativeRunner(state_)); |
55 } | 55 } |
56 | 56 |
57 private: | 57 private: |
58 TestState* state_; | 58 TestState* state_; |
59 }; | 59 }; |
60 | 60 |
61 class NativeApplicationLoaderTest : public testing::Test { | 61 class NativeApplicationLoaderTest : public testing::Test { |
62 public: | 62 public: |
63 NativeApplicationLoaderTest() { | 63 NativeApplicationLoaderTest() { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 params->SetTargetURL(url); | 95 params->SetTargetURL(url); |
96 application_manager_->ConnectToApplication(params.Pass()); | 96 application_manager_->ConnectToApplication(params.Pass()); |
97 EXPECT_FALSE(state_.runner_was_created); | 97 EXPECT_FALSE(state_.runner_was_created); |
98 EXPECT_FALSE(state_.runner_was_started); | 98 EXPECT_FALSE(state_.runner_was_started); |
99 EXPECT_FALSE(state_.runner_was_destroyed); | 99 EXPECT_FALSE(state_.runner_was_destroyed); |
100 } | 100 } |
101 | 101 |
102 } // namespace | 102 } // namespace |
103 } // namespace runner | 103 } // namespace runner |
104 } // namespace mojo | 104 } // namespace mojo |
OLD | NEW |