summaryrefslogtreecommitdiffstats
path: root/mojo/shell
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-25 17:38:18 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-25 17:38:18 +0000
commit38b07d57b9069e3fd44b15bb5883432202ddf78a (patch)
tree26bec7d98bb46ebd0bff2f29da31bfcec431fe02 /mojo/shell
parent1acb01f0dfdde8588ad995c6cb9128b160eabf79 (diff)
downloadchromium_src-38b07d57b9069e3fd44b15bb5883432202ddf78a.zip
chromium_src-38b07d57b9069e3fd44b15bb5883432202ddf78a.tar.gz
chromium_src-38b07d57b9069e3fd44b15bb5883432202ddf78a.tar.bz2
Mojo: Make mojo_test_service a loadable_module and make mojo_shell_tests depend on it.
I still need to make sure this works properly on Mac (it may not: the file extension of the library may change). But we don't currently run mojo_shell_tests on any bots so I can do that separately. R=yzshen@chromium.org Review URL: https://codereview.chromium.org/348843011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279747 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/shell')
-rw-r--r--mojo/shell/shell_test_base.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/mojo/shell/shell_test_base.cc b/mojo/shell/shell_test_base.cc
index 83403c4..e83f746 100644
--- a/mojo/shell/shell_test_base.cc
+++ b/mojo/shell/shell_test_base.cc
@@ -27,18 +27,14 @@ void ShellTestBase::LaunchServiceInProcess(
const GURL& service_url,
const std::string& service_name,
ScopedMessagePipeHandle client_handle) {
- base::FilePath base_dir;
- CHECK(PathService::Get(base::DIR_EXE, &base_dir));
- // On android, the library is bundled with the app.
#if defined(OS_ANDROID)
+ // On Android, the library is bundled with the app.
base::FilePath service_dir;
CHECK(PathService::Get(base::DIR_MODULE, &service_dir));
- // On Mac and Windows, libraries are dumped beside the executables.
-#elif defined(OS_MACOSX) || defined(OS_WIN)
- base::FilePath service_dir(base_dir);
#else
- // On Linux, they're under lib/.
- base::FilePath service_dir(base_dir.AppendASCII("lib"));
+ // On other platforms, "loadable modules" are dumped beside the executables.
+ base::FilePath service_dir;
+ CHECK(PathService::Get(base::DIR_EXE, &service_dir));
#endif
shell_context_.mojo_url_resolver()->set_origin(
net::FilePathToFileURL(service_dir).spec());