| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/test/launcher/unit_test_launcher.h" | 6 #include "base/test/launcher/unit_test_launcher.h" |
| 7 #include "base/test/test_suite.h" | 7 #include "base/test/test_suite.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "mojo/edk/embedder/embedder.h" | 9 #include "mojo/edk/embedder/embedder.h" |
| 10 | 10 |
| 11 #if defined(OS_ANDROID) | 11 #if defined(OS_ANDROID) |
| 12 #include "base/android/jni_android.h" | 12 #include "base/android/jni_android.h" |
| 13 #include "device/bluetooth/android/bluetooth_jni_registrar.h" | 13 #include "device/bluetooth/android/bluetooth_jni_registrar.h" |
| 14 #include "device/geolocation/android/geolocation_jni_registrar.h" |
| 14 #include "device/power_save_blocker/power_save_blocker_jni_registrar.h" | 15 #include "device/power_save_blocker/power_save_blocker_jni_registrar.h" |
| 15 #include "device/usb/android/usb_jni_registrar.h" | 16 #include "device/usb/android/usb_jni_registrar.h" |
| 16 #endif | 17 #endif |
| 17 | 18 |
| 18 int main(int argc, char** argv) { | 19 int main(int argc, char** argv) { |
| 19 #if defined(OS_ANDROID) | 20 #if defined(OS_ANDROID) |
| 20 device::android::RegisterBluetoothJni(base::android::AttachCurrentThread()); | 21 device::android::RegisterBluetoothJni(base::android::AttachCurrentThread()); |
| 22 device::android::RegisterGeolocationJni(base::android::AttachCurrentThread()); |
| 21 device::android::RegisterPowerSaveBlockerJni( | 23 device::android::RegisterPowerSaveBlockerJni( |
| 22 base::android::AttachCurrentThread()); | 24 base::android::AttachCurrentThread()); |
| 23 device::android::RegisterUsbJni(base::android::AttachCurrentThread()); | 25 device::android::RegisterUsbJni(base::android::AttachCurrentThread()); |
| 24 #endif | 26 #endif |
| 25 | 27 |
| 26 base::TestSuite test_suite(argc, argv); | 28 base::TestSuite test_suite(argc, argv); |
| 27 | 29 |
| 28 mojo::edk::Init(); | 30 mojo::edk::Init(); |
| 29 return base::LaunchUnitTests( | 31 return base::LaunchUnitTests( |
| 30 argc, | 32 argc, |
| 31 argv, | 33 argv, |
| 32 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite))); | 34 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite))); |
| 33 } | 35 } |
| OLD | NEW |