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

Unified Diff: ash/test/ash_test_base.cc

Issue 190663012: Run ContentMain in a browser_test's browser process. This removes duplication of code in the browse… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: try to fix android by restoring old path just for it Created 6 years, 9 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 | « ash/test/ash_test_base.h ('k') | ash/wm/ash_native_cursor_manager_interactive_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/ash_test_base.cc
===================================================================
--- ash/test/ash_test_base.cc (revision 257432)
+++ ash/test/ash_test_base.cc (working copy)
@@ -48,6 +48,10 @@
#include "win8/test/test_registrar_constants.h"
#endif
+#if defined(USE_X11)
+#include <X11/Xlib.h>
+#endif
+
namespace ash {
namespace test {
namespace {
@@ -90,6 +94,14 @@
: setup_called_(false),
teardown_called_(false),
start_session_(true) {
+#if defined(USE_X11)
+ // This is needed for tests which use this base class but are run in browser
+ // test binaries so don't get the default initialization in the unit test
+ // suite.
+ XInitThreads();
+#endif
+
+ thread_bundle_.reset(new content::TestBrowserThreadBundle);
// Must initialize |ash_test_helper_| here because some tests rely on
// AshTestBase methods before they call AshTestBase::SetUp().
ash_test_helper_.reset(new AshTestHelper(base::MessageLoopForUI::current()));
« no previous file with comments | « ash/test/ash_test_base.h ('k') | ash/wm/ash_native_cursor_manager_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698