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

Side by Side Diff: testing/android/native_test/native_test_launcher.cc

Issue 2057223002: Roll base to 0032c8e1a72eb85d947d8df8de503caa62b4d0a8. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « net/cert/x509_util_android.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 void AndroidLog(int priority, const char* format, ...) { 63 void AndroidLog(int priority, const char* format, ...) {
64 va_list args; 64 va_list args;
65 va_start(args, format); 65 va_start(args, format);
66 __android_log_vprint(priority, kLogTag, format, args); 66 __android_log_vprint(priority, kLogTag, format, args);
67 va_end(args); 67 va_end(args);
68 } 68 }
69 69
70 } // namespace 70 } // namespace
71 71
72 static void RunTests(JNIEnv* env, 72 static void RunTests(JNIEnv* env,
73 jobject obj, 73 const JavaParamRef<jobject>& obj,
74 jstring jcommand_line_flags, 74 const JavaParamRef<jstring>& jcommand_line_flags,
75 jstring jcommand_line_file_path, 75 const JavaParamRef<jstring>& jcommand_line_file_path,
76 jstring jstdout_file_path, 76 const JavaParamRef<jstring>& jstdout_file_path,
77 jboolean jstdout_fifo, 77 jboolean jstdout_fifo,
78 jobject app_context) { 78 const JavaParamRef<jobject>& app_context) {
79 // Command line initialized basically, will be fully initialized later. 79 // Command line initialized basically, will be fully initialized later.
80 static const char* const kInitialArgv[] = { "ChromeTestActivity" }; 80 static const char* const kInitialArgv[] = { "ChromeTestActivity" };
81 base::CommandLine::Init(arraysize(kInitialArgv), kInitialArgv); 81 base::CommandLine::Init(arraysize(kInitialArgv), kInitialArgv);
82 82
83 // Set the application context in base. 83 // Set the application context in base.
84 base::android::ScopedJavaLocalRef<jobject> scoped_context( 84 base::android::ScopedJavaLocalRef<jobject> scoped_context(
85 env, env->NewLocalRef(app_context)); 85 env, env->NewLocalRef(app_context));
86 base::android::InitApplicationContext(env, scoped_context); 86 base::android::InitApplicationContext(env, scoped_context);
87 base::android::RegisterJni(env); 87 base::android::RegisterJni(env);
88 88
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 sa.sa_sigaction = SignalHandler; 152 sa.sa_sigaction = SignalHandler;
153 sa.sa_flags = SA_SIGINFO; 153 sa.sa_flags = SA_SIGINFO;
154 154
155 for (unsigned int i = 0; kExceptionSignals[i] != -1; ++i) { 155 for (unsigned int i = 0; kExceptionSignals[i] != -1; ++i) {
156 sigaction(kExceptionSignals[i], &sa, &g_old_sa[kExceptionSignals[i]]); 156 sigaction(kExceptionSignals[i], &sa, &g_old_sa[kExceptionSignals[i]]);
157 } 157 }
158 } 158 }
159 159
160 } // namespace android 160 } // namespace android
161 } // namespace testing 161 } // namespace testing
OLDNEW
« no previous file with comments | « net/cert/x509_util_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698