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

Side by Side Diff: testing/android/native_test_util.h

Issue 16599008: Move CreateFIFO() and RedirectStream() from testing/android/ to base/android/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 | Annotate | Revision Log
« no previous file with comments | « testing/android/native_test_launcher.cc ('k') | testing/android/native_test_util.cc » ('j') | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #ifndef TESTING_ANDROID_NATIVE_TEST_UTIL_ 5 #ifndef TESTING_ANDROID_NATIVE_TEST_UTIL_
6 #define TESTING_ANDROID_NATIVE_TEST_UTIL_ 6 #define TESTING_ANDROID_NATIVE_TEST_UTIL_
7 7
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 // Helper methods for setting up environment for running gtest tests 12 // Helper methods for setting up environment for running gtest tests
13 // inside an APK. 13 // inside an APK.
14 namespace testing { 14 namespace testing {
15 namespace native_test_util { 15 namespace native_test_util {
16 16
17 class ScopedMainEntryLogger { 17 class ScopedMainEntryLogger {
18 public: 18 public:
19 ScopedMainEntryLogger() { 19 ScopedMainEntryLogger() {
20 printf(">>ScopedMainEntryLogger\n"); 20 printf(">>ScopedMainEntryLogger\n");
21 } 21 }
22 22
23 ~ScopedMainEntryLogger() { 23 ~ScopedMainEntryLogger() {
24 printf("<<ScopedMainEntryLogger\n"); 24 printf("<<ScopedMainEntryLogger\n");
25 fflush(stdout); 25 fflush(stdout);
26 fflush(stderr); 26 fflush(stderr);
27 } 27 }
28 }; 28 };
29 29
30 // Creates a fifo at the given |fifo_path|.
31 void CreateFIFO(const char* fifo_path);
32 // Redirects the |stream| to the file provided by |path|.
33 void RedirectStream(FILE* stream, const char* path, const char* mode);
34 void ParseArgsFromCommandLineFile( 30 void ParseArgsFromCommandLineFile(
35 const char* path, std::vector<std::string>* args); 31 const char* path, std::vector<std::string>* args);
36 int ArgsToArgv(const std::vector<std::string>& args, std::vector<char*>* argv); 32 int ArgsToArgv(const std::vector<std::string>& args, std::vector<char*>* argv);
37 33
38 } // namespace native_test_util 34 } // namespace native_test_util
39 } // namespace testing 35 } // namespace testing
40 36
41 #endif // TESTING_ANDROID_NATIVE_TEST_UTIL_ 37 #endif // TESTING_ANDROID_NATIVE_TEST_UTIL_
OLDNEW
« no previous file with comments | « testing/android/native_test_launcher.cc ('k') | testing/android/native_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698