summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--mojo/mojo.gyp1
-rw-r--r--mojo/mojo_services.gypi2
-rw-r--r--mojo/shell/shell_test_base.cc12
3 files changed, 6 insertions, 9 deletions
diff --git a/mojo/mojo.gyp b/mojo/mojo.gyp
index cdf2371..14221e6 100644
--- a/mojo/mojo.gyp
+++ b/mojo/mojo.gyp
@@ -610,6 +610,7 @@
'mojo_service_manager',
'mojo_shell_lib',
'mojo_system_impl',
+ 'mojo_test_service',
'mojo_test_service_bindings',
],
'sources': [
diff --git a/mojo/mojo_services.gypi b/mojo/mojo_services.gypi
index bf751ac3..5a66968 100644
--- a/mojo/mojo_services.gypi
+++ b/mojo/mojo_services.gypi
@@ -396,7 +396,7 @@
},
{
'target_name': 'mojo_test_service',
- 'type': 'shared_library',
+ 'type': 'loadable_module',
'dependencies': [
'../base/base.gyp:base',
'mojo_application',
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());