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

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

Issue 2540603004: [Android] Redirect std{in,out,err} to sockets for layout tests. (Closed)
Patch Set: peter comments after layout_test_android -> scoped_android_configuration 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/scoped_android_configuration.h
diff --git a/content/shell/browser/layout_test/scoped_android_configuration.h b/content/shell/browser/layout_test/scoped_android_configuration.h
new file mode 100644
index 0000000000000000000000000000000000000000..4732cce40b574b37aa11af922ab2325ae832748a
--- /dev/null
+++ b/content/shell/browser/layout_test/scoped_android_configuration.h
@@ -0,0 +1,37 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
Peter Beverloo 2016/12/13 12:15:34 micro nit: 2016
jbudorick 2016/12/14 02:21:59 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_SCOPED_ANDROID_CONFIGURATION_H_
+#define CONTENT_SHELL_BROWSER_LAYOUT_TEST_SCOPED_ANDROID_CONFIGURATION_H_
+
+#include <memory>
+#include <string>
+#include <vector>
+
+namespace net {
+class SocketPosix;
+}
+
+namespace content {
+
+class ScopedAndroidConfiguration {
+ public:
+ ScopedAndroidConfiguration();
+ ~ScopedAndroidConfiguration();
+
+ // 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_;
+};
Peter Beverloo 2016/12/13 12:15:34 micro nit: DISALLOW_COPY_AND_ASSIGN(ScopedAndro
jbudorick 2016/12/14 02:21:59 Done.
+
+} // namespace content
+
+#endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_SCOPED_ANDROID_CONFIGURATION_H_

Powered by Google App Engine
This is Rietveld 408576698