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 "mojo/shell/shell_test_base.h" | 5 #include "mojo/shell/shell_test_base.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 28 matching lines...) Expand all Loading... |
39 | 39 |
40 base::FilePath base_dir = base::MakeAbsoluteFilePath( | 40 base::FilePath base_dir = base::MakeAbsoluteFilePath( |
41 base::CommandLine::ForCurrentProcess()->GetProgram().DirName()); | 41 base::CommandLine::ForCurrentProcess()->GetProgram().DirName()); |
42 // On Mac and Windows, libraries are dumped beside the executables. | 42 // On Mac and Windows, libraries are dumped beside the executables. |
43 #if defined(OS_MACOSX) || defined(OS_WIN) | 43 #if defined(OS_MACOSX) || defined(OS_WIN) |
44 base::FilePath service_dir(base_dir); | 44 base::FilePath service_dir(base_dir); |
45 #else | 45 #else |
46 // On Linux, they're under lib/. | 46 // On Linux, they're under lib/. |
47 base::FilePath service_dir(base_dir.AppendASCII("lib")); | 47 base::FilePath service_dir(base_dir.AppendASCII("lib")); |
48 #endif | 48 #endif |
49 shell_context_->set_mojo_origin(net::FilePathToFileURL(service_dir).spec()); | 49 shell_context_->mojo_url_resolver()->set_origin( |
| 50 net::FilePathToFileURL(service_dir).spec()); |
50 | 51 |
51 shell_context_->service_manager()->ConnectToService( | 52 shell_context_->service_manager()->ConnectToService( |
52 service_url, service_name, client_handle.Pass(), GURL()); | 53 service_url, service_name, client_handle.Pass(), GURL()); |
53 } | 54 } |
54 | 55 |
55 } // namespace test | 56 } // namespace test |
56 } // namespace shell | 57 } // namespace shell |
57 } // namespace mojo | 58 } // namespace mojo |
OLD | NEW |