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())); |