| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This class sets up the environment for running the native tests inside an | 5 // This class sets up the environment for running the native tests inside an |
| 6 // android application. It outputs (to a fifo) markers identifying the | 6 // android application. It outputs (to a fifo) markers identifying the |
| 7 // START/PASSED/CRASH of the test suite, FAILURE/SUCCESS of individual tests, | 7 // START/PASSED/CRASH of the test suite, FAILURE/SUCCESS of individual tests, |
| 8 // etc. | 8 // etc. |
| 9 // These markers are read by the test runner script to generate test results. | 9 // These markers are read by the test runner script to generate test results. |
| 10 // It installs signal handlers to detect crashes. | 10 // It installs signal handlers to detect crashes. |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 ScopedMainEntryLogger scoped_main_entry_logger; | 184 ScopedMainEntryLogger scoped_main_entry_logger; |
| 185 main(argc, &argv[0]); | 185 main(argc, &argv[0]); |
| 186 } | 186 } |
| 187 | 187 |
| 188 // This is called by the VM when the shared library is first loaded. | 188 // This is called by the VM when the shared library is first loaded. |
| 189 JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) { | 189 JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) { |
| 190 // Install signal handlers to detect crashes. | 190 // Install signal handlers to detect crashes. |
| 191 InstallHandlers(); | 191 InstallHandlers(); |
| 192 | 192 |
| 193 base::android::InitVM(vm); | 193 base::android::InitVM(vm); |
| 194 JNIEnv* env = base::android::AttachCurrentThread(); | |
| 195 if (!RegisterNativesImpl(env)) { | |
| 196 return -1; | |
| 197 } | |
| 198 | 194 |
| 199 return JNI_VERSION_1_4; | 195 return JNI_VERSION_1_4; |
| 200 } | 196 } |
| OLD | NEW |