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

Side by Side 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: qyearsley comments 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 unified diff | Download patch
OLDNEW
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 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_ANDROID_H_ 5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_ANDROID_H_
6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_ANDROID_H_ 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_ANDROID_H_
7 7
8 #include <string> 8 #include <string>
Peter Beverloo 2016/12/06 19:24:06 micro nit: #include <memory>
jbudorick 2016/12/08 02:04:13 Done.
9 #include <vector>
10
11 namespace net {
12 class SocketPosix;
13 }
9 14
10 namespace content { 15 namespace content {
11 16
17 class ScopedAndroidConfiguration {
18 public:
19 ScopedAndroidConfiguration();
20 ~ScopedAndroidConfiguration();
21
22 // Initializes the android test paths and the ui message pump.
23 void Initialize();
24
25 // Redirects stdin, stdout, and stderr to the ports specified on the command
26 // line.
27 void RedirectStreams();
28
29 private:
30 // Adds |socket| to |sockets_|.
31 void AddSocket(std::unique_ptr<net::SocketPosix> socket);
32
33 // The sockets to which the IO streams are being redirected.
34 std::vector<std::unique_ptr<net::SocketPosix>> sockets_;
35 };
36
12 // Initialize the nested message loop and FIFOs for Android, and verify that 37 // Initialize the nested message loop and FIFOs for Android, and verify that
13 // all has been set up using a few appropriate CHECK()s. 38 // all has been set up using a few appropriate CHECK()s.
14 void EnsureInitializeForAndroidLayoutTests(); 39 void EnsureInitializeForAndroidLayoutTests();
Peter Beverloo 2016/12/06 19:24:06 This function is now unused -- can we delete it?
jbudorick 2016/12/08 02:04:13 Done.
15 40
16 } // namespace content 41 } // namespace content
17 42
18 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_ANDROID_H_ 43 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698