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

Unified Diff: chrome/browser/chrome_browser_main_extra_parts_aura.cc

Issue 8805033: Makes tests either use mock compositor or mock WebGraphicsContext3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaks Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chrome_browser_main_extra_parts_aura.cc
diff --git a/chrome/browser/chrome_browser_main_extra_parts_aura.cc b/chrome/browser/chrome_browser_main_extra_parts_aura.cc
index 0ce66bdd945add6f9d028045f8d1612c2267fcf9..898bff2019cb21944e874d7f89fca61571a93425 100644
--- a/chrome/browser/chrome_browser_main_extra_parts_aura.cc
+++ b/chrome/browser/chrome_browser_main_extra_parts_aura.cc
@@ -3,8 +3,11 @@
// found in the LICENSE file.
#include "chrome/browser/chrome_browser_main_extra_parts_aura.h"
+
+#include "base/command_line.h"
#include "chrome/browser/ui/views/aura/chrome_shell_delegate.h"
#include "chrome/browser/ui/views/aura/screen_orientation_listener.h"
+#include "chrome/common/chrome_switches.h"
#include "ui/aura/desktop.h"
#include "ui/aura_shell/shell.h"
@@ -12,11 +15,25 @@
#include "chrome/browser/chromeos/system/runtime_environment.h"
#endif
+#if defined(USE_WEBKIT_COMPOSITOR)
+#include "ui/gfx/compositor/compositor_setup.h"
+#else
+#include "ui/gfx/test/gfx_test_utils.h"
+#endif
+
ChromeBrowserMainExtraPartsAura::ChromeBrowserMainExtraPartsAura()
: ChromeBrowserMainExtraParts() {
}
void ChromeBrowserMainExtraPartsAura::PostBrowserProcessInit() {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestCompositor)) {
+#if defined(USE_WEBKIT_COMPOSITOR)
+ ui::SetupTestCompositor();
+#else
+ ui::gfx_test_utils::SetupTestCompositor();
+#endif
+ }
+
#if defined(OS_CHROMEOS)
if (chromeos::system::runtime_environment::IsRunningOnChromeOS())
aura::Desktop::set_use_fullscreen_host_window(true);
« no previous file with comments | « build/all.gyp ('k') | chrome/chrome_exe.gypi » ('j') | content/content_tests.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698