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