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

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

Issue 1344933002: Clean up some unused methods from ApplicationManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 3 months 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/native_application_support.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/fetcher/base_application_fetcher.h" 7 #include "mojo/fetcher/base_application_fetcher.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 19 matching lines...) Expand all
30 explicit TestNativeRunner(TestState* state) : state_(state) { 30 explicit TestNativeRunner(TestState* state) : state_(state) {
31 state_->runner_was_created = true; 31 state_->runner_was_created = true;
32 } 32 }
33 ~TestNativeRunner() override { 33 ~TestNativeRunner() override {
34 state_->runner_was_destroyed = true; 34 state_->runner_was_destroyed = true;
35 if (base::MessageLoop::current()->is_running()) 35 if (base::MessageLoop::current()->is_running())
36 base::MessageLoop::current()->Quit(); 36 base::MessageLoop::current()->Quit();
37 } 37 }
38 void Start(const base::FilePath& app_path, 38 void Start(const base::FilePath& app_path,
39 bool start_sandboxed, 39 bool start_sandboxed,
40 shell::NativeApplicationCleanup cleanup,
41 InterfaceRequest<Application> application_request, 40 InterfaceRequest<Application> application_request,
42 const base::Closure& app_completed_callback) override { 41 const base::Closure& app_completed_callback) override {
43 state_->runner_was_started = true; 42 state_->runner_was_started = true;
44 } 43 }
45 44
46 private: 45 private:
47 TestState* state_; 46 TestState* state_;
48 }; 47 };
49 48
50 class TestNativeRunnerFactory : public shell::NativeRunnerFactory { 49 class TestNativeRunnerFactory : public shell::NativeRunnerFactory {
51 public: 50 public:
52 explicit TestNativeRunnerFactory(TestState* state) : state_(state) {} 51 explicit TestNativeRunnerFactory(TestState* state) : state_(state) {}
53 ~TestNativeRunnerFactory() override {} 52 ~TestNativeRunnerFactory() override {}
54 scoped_ptr<shell::NativeRunner> Create(const Options& options) override { 53 scoped_ptr<shell::NativeRunner> Create() override {
55 return scoped_ptr<shell::NativeRunner>(new TestNativeRunner(state_)); 54 return scoped_ptr<shell::NativeRunner>(new TestNativeRunner(state_));
56 } 55 }
57 56
58 private: 57 private:
59 TestState* state_; 58 TestState* state_;
60 }; 59 };
61 60
62 class NativeApplicationLoaderTest : public testing::Test { 61 class NativeApplicationLoaderTest : public testing::Test {
63 public: 62 public:
64 NativeApplicationLoaderTest() { 63 NativeApplicationLoaderTest() {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 service_provider.Pass(), shell::GetPermissiveCapabilityFilter(), 100 service_provider.Pass(), shell::GetPermissiveCapabilityFilter(),
102 base::Closure(), shell::EmptyConnectCallback()); 101 base::Closure(), shell::EmptyConnectCallback());
103 EXPECT_FALSE(state_.runner_was_created); 102 EXPECT_FALSE(state_.runner_was_created);
104 EXPECT_FALSE(state_.runner_was_started); 103 EXPECT_FALSE(state_.runner_was_started);
105 EXPECT_FALSE(state_.runner_was_destroyed); 104 EXPECT_FALSE(state_.runner_was_destroyed);
106 } 105 }
107 106
108 } // namespace 107 } // namespace
109 } // namespace runner 108 } // namespace runner
110 } // namespace mojo 109 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/runner/native_application_support.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