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

Unified Diff: components/view_manager/view_manager_app.cc

Issue 1305893006: view-manager: Fix some issues regarding running tests in x11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 3 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 | « components/view_manager/public/cpp/lib/args.cc ('k') | mojo/tools/data/apptests » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/view_manager/view_manager_app.cc
diff --git a/components/view_manager/view_manager_app.cc b/components/view_manager/view_manager_app.cc
index 69b3288d357e14fb4ffd4d5ac1df81667038c856..0fd9cdd05edf27f819e1b2a2246cc2b1cf33fa41 100644
--- a/components/view_manager/view_manager_app.cc
+++ b/components/view_manager/view_manager_app.cc
@@ -24,6 +24,11 @@
#include "ui/gl/gl_surface.h"
#include "ui/gl/test/gl_surface_test_support.h"
+#if defined(USE_X11)
+#include <X11/Xlib.h>
+#include "ui/platform_window/x11/x11_window.h"
+#endif
+
using mojo::ApplicationConnection;
using mojo::ApplicationImpl;
using mojo::Gpu;
@@ -51,11 +56,14 @@ void ViewManagerApp::Initialize(ApplicationImpl* app) {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
is_headless_ = command_line->HasSwitch(mojo::kUseHeadlessConfig);
if (!is_headless_) {
+#if defined(USE_X11)
+ if (command_line->HasSwitch(mojo::kUseX11TestConfig)) {
+ XInitThreads();
+ ui::test::SetUseOverrideRedirectWindowByDefault(true);
+ }
+#endif
+ gfx::GLSurface::InitializeOneOff();
event_source_ = ui::PlatformEventSource::CreateDefault();
- if (command_line->HasSwitch(mojo::kUseTestConfig))
- gfx::GLSurfaceTestSupport::InitializeOneOff();
- else
- gfx::GLSurface::InitializeOneOff();
}
#endif
« no previous file with comments | « components/view_manager/public/cpp/lib/args.cc ('k') | mojo/tools/data/apptests » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698