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

Side by Side Diff: shell/native_runner_unittest.cc

Issue 1088533003: Adding URLResponse Disk Cache to mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 5 years, 7 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 | « shell/native_application_support.cc ('k') | shell/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 "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 14 matching lines...) Expand all
25 class TestNativeRunner : public NativeRunner { 25 class TestNativeRunner : public NativeRunner {
26 public: 26 public:
27 explicit TestNativeRunner(TestState* state) : state_(state) { 27 explicit TestNativeRunner(TestState* state) : state_(state) {
28 state_->runner_was_created = true; 28 state_->runner_was_created = true;
29 } 29 }
30 ~TestNativeRunner() override { 30 ~TestNativeRunner() override {
31 state_->runner_was_destroyed = true; 31 state_->runner_was_destroyed = true;
32 base::MessageLoop::current()->Quit(); 32 base::MessageLoop::current()->Quit();
33 } 33 }
34 void Start(const base::FilePath& app_path, 34 void Start(const base::FilePath& app_path,
35 NativeApplicationCleanup cleanup,
36 mojo::InterfaceRequest<mojo::Application> application_request, 35 mojo::InterfaceRequest<mojo::Application> application_request,
37 const base::Closure& app_completed_callback) override { 36 const base::Closure& app_completed_callback) override {
38 state_->runner_was_started = true; 37 state_->runner_was_started = true;
39 } 38 }
40 39
41 private: 40 private:
42 TestState* state_; 41 TestState* state_;
43 }; 42 };
44 43
45 class TestNativeRunnerFactory : public NativeRunnerFactory { 44 class TestNativeRunnerFactory : public NativeRunnerFactory {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 mojo::ServiceProviderPtr service_provider; 89 mojo::ServiceProviderPtr service_provider;
91 application_manager_.ConnectToApplication( 90 application_manager_.ConnectToApplication(
92 url, GURL(), services.Pass(), service_provider.Pass(), base::Closure()); 91 url, GURL(), services.Pass(), service_provider.Pass(), base::Closure());
93 EXPECT_FALSE(state_.runner_was_created); 92 EXPECT_FALSE(state_.runner_was_created);
94 EXPECT_FALSE(state_.runner_was_started); 93 EXPECT_FALSE(state_.runner_was_started);
95 EXPECT_FALSE(state_.runner_was_destroyed); 94 EXPECT_FALSE(state_.runner_was_destroyed);
96 } 95 }
97 96
98 } // namespace 97 } // namespace
99 } // namespace shell 98 } // namespace shell
OLDNEW
« no previous file with comments | « shell/native_application_support.cc ('k') | shell/out_of_process_native_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698