summaryrefslogtreecommitdiffstats
path: root/ash/test/ash_test_base.cc
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-01 01:48:45 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-01 01:48:45 +0000
commit52a49920649f6a29d17dc91b7101ff82b9a2ba96 (patch)
tree8e1b6b067018b19fb78669ae6c9d53725feefa63 /ash/test/ash_test_base.cc
parent7c083e491d5ce120b2864ae767230f56c55d3876 (diff)
downloadchromium_src-52a49920649f6a29d17dc91b7101ff82b9a2ba96.zip
chromium_src-52a49920649f6a29d17dc91b7101ff82b9a2ba96.tar.gz
chromium_src-52a49920649f6a29d17dc91b7101ff82b9a2ba96.tar.bz2
Use WS_POPUP for ash_unittests
- Layout test windows starting from (1,1) and move mouse to (0,0) so that they don't overlap unless test moves the cursor. - Enabled disabled tests. - RootWindowHostWin::SetBounds should move the window and call OnHostResized when the scale factor has changed. This also seems to fix the desktop size limitation issue (148691) probably because a popup window can be larger than the desktop size. BUG=150986,157817,141577,148691 TEST=none Review URL: https://chromiumcodereview.appspot.com/11428066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170621 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/test/ash_test_base.cc')
-rw-r--r--ash/test/ash_test_base.cc18
1 files changed, 15 insertions, 3 deletions
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc
index 479bc40..e8d3514 100644
--- a/ash/test/ash_test_base.cc
+++ b/ash/test/ash_test_base.cc
@@ -26,6 +26,10 @@
#include "ui/gfx/display.h"
#include "ui/gfx/screen.h"
+#if defined(OS_WIN)
+#include "ui/aura/root_window_host_win.h"
+#endif
+
namespace ash {
namespace test {
@@ -43,8 +47,13 @@ AshTestBase::~AshTestBase() {
}
void AshTestBase::SetUp() {
+ // Use the origin (1,1) so that it doesn't over
+ // lap with the native mouse cursor.
CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kAuraHostWindowSize, "0+0-800x600");
+ switches::kAuraHostWindowSize, "1+1-800x600");
+#if defined(OS_WIN)
+ aura::test::SetUsePopupAsRootWindowForTest(true);
+#endif
// Disable animations during tests.
ui::LayerAnimator::set_disable_animations_for_test(true);
ui::TextInputTestSupport::Initialize();
@@ -53,9 +62,9 @@ void AshTestBase::SetUp() {
ash::Shell::CreateInstance(test_shell_delegate_);
Shell::GetPrimaryRootWindow()->Show();
Shell::GetPrimaryRootWindow()->ShowRootWindow();
- // Move the mouse cursor to far away so that native events doesn't
+ // Move the mouse cursor to (0,0) so that native events doesn't
// interfere test expectations.
- Shell::GetPrimaryRootWindow()->MoveCursorTo(gfx::Point(-1000, -1000));
+ Shell::GetPrimaryRootWindow()->MoveCursorTo(gfx::Point(0, 0));
Shell::GetInstance()->cursor_manager()->ShowCursor(true);
}
@@ -67,6 +76,9 @@ void AshTestBase::TearDown() {
Shell::DeleteInstance();
aura::Env::DeleteInstance();
ui::TextInputTestSupport::Shutdown();
+#if defined(OS_WIN)
+ aura::test::SetUsePopupAsRootWindowForTest(false);
+#endif
}
void AshTestBase::ChangeDisplayConfig(float scale,