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

Unified Diff: content/shell/android/browsertests_apk/content_browser_tests_android.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/base.gypi ('k') | testing/android/native_test_launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/android/browsertests_apk/content_browser_tests_android.cc
diff --git a/content/shell/android/browsertests_apk/content_browser_tests_android.cc b/content/shell/android/browsertests_apk/content_browser_tests_android.cc
index fdfde371df4c36941b3dde553615e88f84b665e9..d8319c41123317bb190d0a23f28a0865ae94cbdd 100644
--- a/content/shell/android/browsertests_apk/content_browser_tests_android.cc
+++ b/content/shell/android/browsertests_apk/content_browser_tests_android.cc
@@ -9,6 +9,7 @@
#include <unistd.h>
#include "base/android/base_jni_registrar.h"
+#include "base/android/fifo_utils.h"
#include "base/android/jni_android.h"
#include "base/android/jni_string.h"
#include "base/android/scoped_java_ref.h"
@@ -30,9 +31,7 @@
#include "testing/android/native_test_util.h"
using testing::native_test_util::ArgsToArgv;
-using testing::native_test_util::CreateFIFO;
using testing::native_test_util::ParseArgsFromCommandLineFile;
-using testing::native_test_util::RedirectStream;
using testing::native_test_util::ScopedMainEntryLogger;
// The main function of the program to be wrapped as an apk.
@@ -49,6 +48,8 @@ static const char kCommandLineFilePath[] =
namespace content {
+// TODO(nileshagrawal): Refactor and deduplicate with
+// testing/android/native_test_launcher.cc
static void RunTests(JNIEnv* env,
jobject obj,
jstring jfiles_dir,
@@ -85,8 +86,8 @@ static void RunTests(JNIEnv* env,
base::FilePath files_dir(
base::android::ConvertJavaStringToUTF8(env, jfiles_dir));
base::FilePath fifo_path(files_dir.Append(base::FilePath("test.fifo")));
- CreateFIFO(fifo_path.value().c_str());
- RedirectStream(stdout, fifo_path.value().c_str(), "w");
+ base::android::CreateFIFO(fifo_path, 0666);
+ base::android::RedirectStream(stdout, fifo_path, "w");
dup2(STDOUT_FILENO, STDERR_FILENO);
ScopedMainEntryLogger scoped_main_entry_logger;
« no previous file with comments | « base/base.gypi ('k') | testing/android/native_test_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698