Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: mojo/runner/native_runner_unittest.cc

Issue 1419293003: Allow mojo_runner to connect to arbitrary executables. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/runner/in_process_native_runner.cc ('k') | mojo/runner/out_of_process_native_runner.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « mojo/runner/in_process_native_runner.cc ('k') | mojo/runner/out_of_process_native_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698