| 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/context.h" | 7 #include "shell/context.h" |
| 8 #include "shell/filename_util.h" | 8 #include "shell/filename_util.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 } | 40 } |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 TestState* state_; | 43 TestState* state_; |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 class TestNativeRunnerFactory : public NativeRunnerFactory { | 46 class TestNativeRunnerFactory : public NativeRunnerFactory { |
| 47 public: | 47 public: |
| 48 explicit TestNativeRunnerFactory(TestState* state) : state_(state) {} | 48 explicit TestNativeRunnerFactory(TestState* state) : state_(state) {} |
| 49 ~TestNativeRunnerFactory() override {} | 49 ~TestNativeRunnerFactory() override {} |
| 50 scoped_ptr<NativeRunner> Create() override { | 50 scoped_ptr<NativeRunner> Create(const Options& options) override { |
| 51 return scoped_ptr<NativeRunner>(new TestNativeRunner(state_)); | 51 return scoped_ptr<NativeRunner>(new TestNativeRunner(state_)); |
| 52 } | 52 } |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 TestState* state_; | 55 TestState* state_; |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace | 58 } // namespace |
| 59 | 59 |
| 60 class NativeApplicationLoaderTest : public testing::Test, | 60 class NativeApplicationLoaderTest : public testing::Test, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 InterfaceRequest<ServiceProvider> services; | 95 InterfaceRequest<ServiceProvider> services; |
| 96 ServiceProviderPtr service_provider; | 96 ServiceProviderPtr service_provider; |
| 97 application_manager_.ConnectToApplication(url, GURL(), services.Pass(), | 97 application_manager_.ConnectToApplication(url, GURL(), services.Pass(), |
| 98 service_provider.Pass()); | 98 service_provider.Pass()); |
| 99 EXPECT_FALSE(state_.runner_was_created); | 99 EXPECT_FALSE(state_.runner_was_created); |
| 100 EXPECT_FALSE(state_.runner_was_started); | 100 EXPECT_FALSE(state_.runner_was_started); |
| 101 EXPECT_FALSE(state_.runner_was_destroyed); | 101 EXPECT_FALSE(state_.runner_was_destroyed); |
| 102 } | 102 } |
| 103 | 103 |
| 104 } // namespace mojo | 104 } // namespace mojo |
| OLD | NEW |