summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-07 22:17:17 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-07 22:17:17 +0000
commitb1d7488e053dd50e8b598cf288c1e24378e449c1 (patch)
tree1d5ab0773e42960e0a56155c05e49c7f7413cc01 /views
parent3510d44297fd73a97a3f204c01cfdc17d9431c3b (diff)
downloadchromium_src-b1d7488e053dd50e8b598cf288c1e24378e449c1.zip
chromium_src-b1d7488e053dd50e8b598cf288c1e24378e449c1.tar.gz
chromium_src-b1d7488e053dd50e8b598cf288c1e24378e449c1.tar.bz2
Fix the views_unittests on USE_AURA linux.
Move the factory setting for the compositor before the initialization of the desktop. BUG=none TEST=views_unittests passes TBR=sky Review URL: http://codereview.chromium.org/8206017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104577 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/test/views_test_base.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/views/test/views_test_base.cc b/views/test/views_test_base.cc
index bbd8e75..bf18dff 100644
--- a/views/test/views_test_base.cc
+++ b/views/test/views_test_base.cc
@@ -29,7 +29,10 @@ ViewsTestBase::ViewsTestBase()
OleInitialize(NULL);
#endif
#if defined(USE_AURA)
+ aura::Desktop::set_compositor_factory_for_testing(&TestCreateCompositor);
new aura::TestDesktopDelegate;
+#else
+ Widget::set_compositor_factory_for_testing(&TestCreateCompositor);
#endif
}
@@ -46,11 +49,6 @@ ViewsTestBase::~ViewsTestBase() {
void ViewsTestBase::SetUp() {
testing::Test::SetUp();
setup_called_ = true;
-#if defined(USE_AURA)
- aura::Desktop::set_compositor_factory_for_testing(&TestCreateCompositor);
-#else
- Widget::set_compositor_factory_for_testing(&TestCreateCompositor);
-#endif
if (!views_delegate_.get())
views_delegate_.reset(new TestViewsDelegate());
}