summaryrefslogtreecommitdiffstats
path: root/views/test
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-07 21:02:59 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-07 21:02:59 +0000
commit87b0d82e3a7323306b3a5b7c94a01226ab601254 (patch)
tree54f9d25c8e9e71ba1fb2bdbbfad23d7e94f46190 /views/test
parent39944f52a7d6495574b27443f9d935a76c5d488a (diff)
downloadchromium_src-87b0d82e3a7323306b3a5b7c94a01226ab601254.zip
chromium_src-87b0d82e3a7323306b3a5b7c94a01226ab601254.tar.gz
chromium_src-87b0d82e3a7323306b3a5b7c94a01226ab601254.tar.bz2
Changes the way windows are parented when their parent is set to NULL.. Adds a DesktopDelegate interface implemented by the aura client. The implementor handles parenting of windows when their parent is set to NULL, and also figures out how to activate windows.. Replaces Desktop::default_parent() with this. Requires adjusting some of the tests and adding a TestDesktopDelegate implementation that reconstructs what default_parent did.BUG=noneTEST=existing unit tests
Review URL: http://codereview.chromium.org/8194004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104558 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/test')
-rw-r--r--views/test/views_test_base.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/views/test/views_test_base.cc b/views/test/views_test_base.cc
index ae20b43..bbd8e75 100644
--- a/views/test/views_test_base.cc
+++ b/views/test/views_test_base.cc
@@ -13,6 +13,7 @@
#if defined(USE_AURA)
#include "ui/aura/desktop.h"
+#include "ui/aura/test_desktop_delegate.h"
#endif
namespace views {
@@ -27,6 +28,9 @@ ViewsTestBase::ViewsTestBase()
#if defined(OS_WIN)
OleInitialize(NULL);
#endif
+#if defined(USE_AURA)
+ new aura::TestDesktopDelegate;
+#endif
}
ViewsTestBase::~ViewsTestBase() {
@@ -44,8 +48,6 @@ void ViewsTestBase::SetUp() {
setup_called_ = true;
#if defined(USE_AURA)
aura::Desktop::set_compositor_factory_for_testing(&TestCreateCompositor);
- if (!aura::Desktop::GetInstance()->default_parent())
- aura::Desktop::GetInstance()->CreateDefaultParentForTesting();
#else
Widget::set_compositor_factory_for_testing(&TestCreateCompositor);
#endif