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

Unified Diff: components/view_manager/view_manager_app.cc

Issue 1228173003: mojo: Fix running view-manager related apptests on X11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | ui/platform_window/x11/x11_window.h » ('j') | ui/platform_window/x11/x11_window.h » ('J')
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 1f9f283c6a88ae1539dff52c67b63607b0cf629c..2bce1a314c49011d6c430409238e1b7ffc210f83 100644
--- a/components/view_manager/view_manager_app.cc
+++ b/components/view_manager/view_manager_app.cc
@@ -20,6 +20,10 @@
#include "ui/events/platform/platform_event_source.h"
#include "ui/gl/gl_surface.h"
+#if defined(USE_X11)
+#include "ui/platform_window/x11/x11_window.h"
+#endif
+
using mojo::ApplicationConnection;
using mojo::ApplicationImpl;
using mojo::Gpu;
@@ -43,10 +47,16 @@ void ViewManagerApp::Initialize(ApplicationImpl* app) {
is_headless_ = command_line->HasSwitch(mojo::kUseHeadlessConfig);
if (!is_headless_) {
event_source_ = ui::PlatformEventSource::CreateDefault();
- if (command_line->HasSwitch(mojo::kUseTestConfig))
+ bool test_config = command_line->HasSwitch(mojo::kUseTestConfig);
+ if (test_config)
gfx::GLSurface::InitializeOneOffForTests();
else
gfx::GLSurface::InitializeOneOff();
+
+#if defined(USE_X11)
+ if (test_config)
+ ui::test::SetUseOverrideRedirectWindowByDefault(true);
msw 2015/07/16 19:17:50 Should this be part of gfx::GLSurface::InitializeO
sadrul 2015/07/16 19:57:14 Hm, good point. Done.
+#endif
}
#endif
« no previous file with comments | « no previous file | ui/platform_window/x11/x11_window.h » ('j') | ui/platform_window/x11/x11_window.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698