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

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

Issue 2847523002: Android: Remove GetApplicationContext part 4 (Closed)
Patch Set: Rebase and fix build Created 3 years, 7 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
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.
11 11
12 #include <android/log.h> 12 #include <android/log.h>
13 #include <errno.h> 13 #include <errno.h>
14 #include <signal.h> 14 #include <signal.h>
15 #include <string.h> 15 #include <string.h>
16 16
17 #include "base/android/base_jni_registrar.h" 17 #include "base/android/base_jni_registrar.h"
18 #include "base/android/context_utils.h"
19 #include "base/android/jni_string.h" 18 #include "base/android/jni_string.h"
20 #include "base/android/scoped_java_ref.h" 19 #include "base/android/scoped_java_ref.h"
21 #include "base/at_exit.h" 20 #include "base/at_exit.h"
22 #include "base/base_switches.h" 21 #include "base/base_switches.h"
23 #include "base/command_line.h" 22 #include "base/command_line.h"
24 #include "base/files/file_path.h" 23 #include "base/files/file_path.h"
25 #include "base/files/file_util.h" 24 #include "base/files/file_util.h"
26 #include "base/logging.h" 25 #include "base/logging.h"
27 #include "base/strings/stringprintf.h" 26 #include "base/strings/stringprintf.h"
28 #include "base/test/test_support_android.h" 27 #include "base/test/test_support_android.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 sa.sa_sigaction = SignalHandler; 145 sa.sa_sigaction = SignalHandler;
147 sa.sa_flags = SA_SIGINFO; 146 sa.sa_flags = SA_SIGINFO;
148 147
149 for (unsigned int i = 0; kExceptionSignals[i] != -1; ++i) { 148 for (unsigned int i = 0; kExceptionSignals[i] != -1; ++i) {
150 sigaction(kExceptionSignals[i], &sa, &g_old_sa[kExceptionSignals[i]]); 149 sigaction(kExceptionSignals[i], &sa, &g_old_sa[kExceptionSignals[i]]);
151 } 150 }
152 } 151 }
153 152
154 } // namespace android 153 } // namespace android
155 } // namespace testing 154 } // namespace testing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698