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

Side by Side Diff: mojo/shell/shell_test_helper.cc

Issue 397733003: mojo: kill app_thread before unloading main app library and add tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: also service_manager_unittests Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « mojo/shell/shell_test_base_unittest.cc ('k') | no next file » | 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 "mojo/shell/shell_test_helper.h" 5 #include "mojo/shell/shell_test_helper.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 10 matching lines...) Expand all
21 } 21 }
22 22
23 ShellTestHelper::~ShellTestHelper() { 23 ShellTestHelper::~ShellTestHelper() {
24 } 24 }
25 25
26 void ShellTestHelper::Init() { 26 void ShellTestHelper::Init() {
27 context_.reset(new Context); 27 context_.reset(new Context);
28 test_api_.reset(new ServiceManager::TestAPI(context_->service_manager())); 28 test_api_.reset(new ServiceManager::TestAPI(context_->service_manager()));
29 base::FilePath service_dir; 29 base::FilePath service_dir;
30 CHECK(PathService::Get(base::DIR_MODULE, &service_dir)); 30 CHECK(PathService::Get(base::DIR_MODULE, &service_dir));
31 context_->mojo_url_resolver()->set_origin( 31 context_->mojo_url_resolver()->SetBaseURL(
32 net::FilePathToFileURL(service_dir).spec()); 32 net::FilePathToFileURL(service_dir));
33 } 33 }
34 34
35 void ShellTestHelper::SetLoaderForURL(scoped_ptr<ServiceLoader> loader, 35 void ShellTestHelper::SetLoaderForURL(scoped_ptr<ServiceLoader> loader,
36 const GURL& url) { 36 const GURL& url) {
37 context_->service_manager()->SetLoaderForURL(loader.Pass(), url); 37 context_->service_manager()->SetLoaderForURL(loader.Pass(), url);
38 } 38 }
39 39
40 } // namespace shell 40 } // namespace shell
41 } // namespace mojo 41 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/shell_test_base_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698