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

Unified Diff: trunk/src/chrome/test/base/view_event_test_base.cc

Issue 22648006: Revert 216780 "Clean up compositor initialization/destruction." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 4 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
Index: trunk/src/chrome/test/base/view_event_test_base.cc
===================================================================
--- trunk/src/chrome/test/base/view_event_test_base.cc (revision 216906)
+++ trunk/src/chrome/test/base/view_event_test_base.cc (working copy)
@@ -22,10 +22,7 @@
#include "ash/shell.h"
#include "ash/test/test_session_state_delegate.h"
#include "ash/test/test_shell_delegate.h"
-#if defined(OS_WIN)
-#include "ui/compositor/compositor.h"
#endif
-#endif
#if defined(USE_AURA)
#include "ui/aura/client/event_client.h"
@@ -104,26 +101,20 @@
// interactive_ui_tests is brought up on that platform.
gfx::Screen::SetScreenInstance(
gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen());
-
- // The ContextFactory must exist before any Compositors are created. The
- // ash::Shell code path below handles this, but since we skip it we must
- // do this here.
- bool allow_test_contexts = true;
- ui::Compositor::InitializeContextFactoryForTests(allow_test_contexts);
-#else // !OS_WIN
+#else
// Ash Shell can't just live on its own without a browser process, we need to
// also create the message center.
message_center::MessageCenter::Initialize();
#if defined(OS_CHROMEOS)
chromeos::CrasAudioHandler::InitializeForTesting();
-#endif // OS_CHROMEOS
+#endif
ash::test::TestShellDelegate* shell_delegate =
new ash::test::TestShellDelegate();
ash::Shell::CreateInstance(shell_delegate);
shell_delegate->test_session_state_delegate()
->SetActiveUserSessionStarted(true);
context = ash::Shell::GetPrimaryRootWindow();
-#endif // !OS_WIN
+#endif
#elif defined(USE_AURA)
// Instead of using the ash shell, use an AuraTestHelper to create and manage
// the test screen.
@@ -131,7 +122,7 @@
new aura::test::AuraTestHelper(base::MessageLoopForUI::current()));
aura_test_helper_->SetUp();
context = aura_test_helper_->root_window();
-#endif // USE_AURA
+#endif
window_ = views::Widget::CreateWindowWithContext(this, context);
}
« no previous file with comments | « trunk/src/chrome/test/base/test_launcher_utils.cc ('k') | trunk/src/chrome/test/gpu/gpu_feature_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698