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

Unified Diff: content/shell/browser/layout_test/layout_test_android.h

Issue 2540603004: [Android] Redirect std{in,out,err} to sockets for layout tests. (Closed)
Patch Set: Fix server_process_constructor name. Created 4 years 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
Index: content/shell/browser/layout_test/layout_test_android.h
diff --git a/content/shell/browser/layout_test/layout_test_android.h b/content/shell/browser/layout_test/layout_test_android.h
index dbcc38aa24e52644c5abed418e525a247849795f..08ee9c73f49ff6708b1e412d3670879d1f40b897 100644
--- a/content/shell/browser/layout_test/layout_test_android.h
+++ b/content/shell/browser/layout_test/layout_test_android.h
@@ -6,9 +6,34 @@
#define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_ANDROID_H_
#include <string>
+#include <vector>
+
+namespace net {
+class SocketPosix;
+}
namespace content {
+class ScopedAndroidConfiguration {
+ public:
+ ScopedAndroidConfiguration();
+ ~ScopedAndroidConfiguration();
+
+ // Initializes the android test paths and the ui message pump.
+ void Initialize();
+
+ // Redirects stdin, stdout, and stderr to the ports specified on the command
+ // line.
+ void RedirectStreams();
+
+ private:
+ // Adds |socket| to |sockets_|.
+ void AddSocket(std::unique_ptr<net::SocketPosix> socket);
+
+ // The sockets to which the IO streams are being redirected.
+ std::vector<std::unique_ptr<net::SocketPosix>> sockets_;
+};
+
// Initialize the nested message loop and FIFOs for Android, and verify that
// all has been set up using a few appropriate CHECK()s.
void EnsureInitializeForAndroidLayoutTests();

Powered by Google App Engine
This is Rietveld 408576698