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

Unified Diff: services/service_manager/public/cpp/test/run_all_service_tests.cc

Issue 2774783003: [DeviceService] Add service tests for VibrationManager. (Closed)
Patch Set: Let service_test app itself register mojo JNIs Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: services/service_manager/public/cpp/test/run_all_service_tests.cc
diff --git a/services/service_manager/public/cpp/test/run_all_service_tests.cc b/services/service_manager/public/cpp/test/run_all_service_tests.cc
index 449d8ebc99e62f82fc90385d5fea9952f52de602..badfcb3e45f81e900d15a972bf765fcbd096588d 100644
--- a/services/service_manager/public/cpp/test/run_all_service_tests.cc
+++ b/services/service_manager/public/cpp/test/run_all_service_tests.cc
@@ -12,6 +12,11 @@
#include "services/catalog/catalog.h"
#include "services/service_manager/public/cpp/test/service_test_catalog.h"
+#if defined(OS_ANDROID)
+#include "base/android/jni_android.h"
+#include "mojo/android/system/mojo_jni_registrar.h"
+#endif
+
int main(int argc, char** argv) {
base::TestSuite test_suite(argc, argv);
@@ -20,6 +25,10 @@ int main(int argc, char** argv) {
mojo::edk::Init();
+#if defined(OS_ANDROID)
+ mojo::android::RegisterSystemJni(base::android::AttachCurrentThread());
+#endif
+
base::Thread ipc_thread("IPC thread");
ipc_thread.StartWithOptions(
base::Thread::Options(base::MessageLoop::TYPE_IO, 0));

Powered by Google App Engine
This is Rietveld 408576698