OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "content/shell/browser/layout_test/layout_test_android.h" | 5 #include "content/shell/browser/layout_test/layout_test_android.h" |
6 | 6 |
7 #include "base/android/context_utils.h" | 7 #include "base/android/context_utils.h" |
8 #include "base/android/fifo_utils.h" | 8 #include "base/android/fifo_utils.h" |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/memory/scoped_ptr.h" |
13 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
14 #include "content/public/test/nested_message_pump_android.h" | 15 #include "content/public/test/nested_message_pump_android.h" |
15 #include "content/shell/common/shell_switches.h" | 16 #include "content/shell/common/shell_switches.h" |
16 #include "jni/ShellLayoutTestUtils_jni.h" | 17 #include "jni/ShellLayoutTestUtils_jni.h" |
17 #include "url/gurl.h" | 18 #include "url/gurl.h" |
18 | 19 |
19 namespace { | 20 namespace { |
20 | 21 |
21 base::FilePath GetTestFilesDirectory(JNIEnv* env) { | 22 base::FilePath GetTestFilesDirectory(JNIEnv* env) { |
22 ScopedJavaLocalRef<jstring> directory = | 23 ScopedJavaLocalRef<jstring> directory = |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // Redirecting stdout needs to happen before redirecting stdin, which needs | 66 // Redirecting stdout needs to happen before redirecting stdin, which needs |
66 // to happen before redirecting stderr. | 67 // to happen before redirecting stderr. |
67 success = base::android::RedirectStream(stdout, stdout_fifo, "w") && | 68 success = base::android::RedirectStream(stdout, stdout_fifo, "w") && |
68 base::android::RedirectStream(stdin, stdin_fifo, "r") && | 69 base::android::RedirectStream(stdin, stdin_fifo, "r") && |
69 base::android::RedirectStream(stderr, stderr_fifo, "w"); | 70 base::android::RedirectStream(stderr, stderr_fifo, "w"); |
70 | 71 |
71 CHECK(success) << "Unable to initialize the Android FIFOs."; | 72 CHECK(success) << "Unable to initialize the Android FIFOs."; |
72 } | 73 } |
73 | 74 |
74 } // namespace content | 75 } // namespace content |
OLD | NEW |