| 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 content browser tests | 5 // This class sets up the environment for running the content browser tests |
| 6 // inside an android application. | 6 // inside an android application. |
| 7 | 7 |
| 8 #include <android/log.h> | 8 #include <android/log.h> |
| 9 #include <unistd.h> | 9 #include <unistd.h> |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "base/strings/string_util.h" | 22 #include "base/strings/string_util.h" |
| 23 #include "base/strings/stringprintf.h" | 23 #include "base/strings/stringprintf.h" |
| 24 #include "content/public/app/android_library_loader_hooks.h" | 24 #include "content/public/app/android_library_loader_hooks.h" |
| 25 #include "content/public/app/content_main.h" | 25 #include "content/public/app/content_main.h" |
| 26 #include "content/public/common/content_switches.h" | 26 #include "content/public/common/content_switches.h" |
| 27 #include "content/public/test/nested_message_pump_android.h" | 27 #include "content/public/test/nested_message_pump_android.h" |
| 28 #include "content/public/test/test_launcher.h" | 28 #include "content/public/test/test_launcher.h" |
| 29 #include "content/shell/android/shell_jni_registrar.h" | 29 #include "content/shell/android/shell_jni_registrar.h" |
| 30 #include "content/shell/app/shell_main_delegate.h" | 30 #include "content/shell/app/shell_main_delegate.h" |
| 31 #include "jni/ContentBrowserTestsActivity_jni.h" | 31 #include "jni/ContentBrowserTestsActivity_jni.h" |
| 32 #include "media/base/media_switches.h" | |
| 33 #include "testing/android/native_test_util.h" | 32 #include "testing/android/native_test_util.h" |
| 34 | 33 |
| 35 using testing::native_test_util::ArgsToArgv; | 34 using testing::native_test_util::ArgsToArgv; |
| 36 using testing::native_test_util::ParseArgsFromCommandLineFile; | 35 using testing::native_test_util::ParseArgsFromCommandLineFile; |
| 37 using testing::native_test_util::ScopedMainEntryLogger; | 36 using testing::native_test_util::ScopedMainEntryLogger; |
| 38 | 37 |
| 39 // The main function of the program to be wrapped as an apk. | 38 // The main function of the program to be wrapped as an apk. |
| 40 extern int main(int argc, char** argv); | 39 extern int main(int argc, char** argv); |
| 41 | 40 |
| 42 namespace { | 41 namespace { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 113 |
| 115 if (!content::NestedMessagePumpAndroid::RegisterJni(env)) | 114 if (!content::NestedMessagePumpAndroid::RegisterJni(env)) |
| 116 return -1; | 115 return -1; |
| 117 | 116 |
| 118 if (!content::RegisterNativesImpl(env)) | 117 if (!content::RegisterNativesImpl(env)) |
| 119 return -1; | 118 return -1; |
| 120 | 119 |
| 121 content::SetContentMainDelegate(new content::ShellMainDelegate()); | 120 content::SetContentMainDelegate(new content::ShellMainDelegate()); |
| 122 return JNI_VERSION_1_4; | 121 return JNI_VERSION_1_4; |
| 123 } | 122 } |
| OLD | NEW |