summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-12 17:21:18 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-12 17:21:18 +0000
commite75642a8f1dd697ee69dd4849f44d3ae85f51ca8 (patch)
treecd329f9f61d405dee5882e24953849fada6b0bd7 /ash
parenteb4b9550a3c201af19b51a648707cc1ffc04445d (diff)
downloadchromium_src-e75642a8f1dd697ee69dd4849f44d3ae85f51ca8.zip
chromium_src-e75642a8f1dd697ee69dd4849f44d3ae85f51ca8.tar.gz
chromium_src-e75642a8f1dd697ee69dd4849f44d3ae85f51ca8.tar.bz2
Skip mulitple-display tests on win8
Re-enable tests that should pass on win7. BUG=247427 Review URL: https://chromiumcodereview.appspot.com/16539005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205846 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/display/display_controller_unittest.cc96
-rw-r--r--ash/display/display_error_dialog_unittest.cc12
-rw-r--r--ash/display/display_manager.cc8
-rw-r--r--ash/display/display_manager_unittest.cc75
-rw-r--r--ash/display/mouse_cursor_event_filter_unittest.cc24
-rw-r--r--ash/display/root_window_transformers_unittest.cc12
-rw-r--r--ash/display/screen_position_controller_unittest.cc4
-rw-r--r--ash/drag_drop/drag_drop_controller_unittest.cc12
-rw-r--r--ash/extended_desktop_unittest.cc54
-rw-r--r--ash/keyboard_overlay/keyboard_overlay_delegate_unittest.cc3
-rw-r--r--ash/root_window_controller_unittest.cc22
-rw-r--r--ash/screen_ash_unittest.cc9
-rw-r--r--ash/shelf/shelf_layout_manager_unittest.cc3
-rw-r--r--ash/shelf/shelf_widget_unittest.cc3
-rw-r--r--ash/test/ash_test_base.cc9
-rw-r--r--ash/test/ash_test_base.h4
-rw-r--r--ash/tooltips/tooltip_controller_unittest.cc12
-rw-r--r--ash/touch/touch_observer_hud_unittest.cc21
-rw-r--r--ash/wm/activation_controller_unittest.cc14
-rw-r--r--ash/wm/drag_window_resizer_unittest.cc15
-rw-r--r--ash/wm/frame_painter_unittest.cc3
-rw-r--r--ash/wm/panels/panel_layout_manager_unittest.cc28
-rw-r--r--ash/wm/panels/panel_window_resizer_unittest.cc42
-rw-r--r--ash/wm/system_modal_container_layout_manager_unittest.cc10
-rw-r--r--ash/wm/window_cycle_controller_unittest.cc13
-rw-r--r--ash/wm/window_util_unittest.cc3
-rw-r--r--ash/wm/workspace/workspace_layout_manager_unittest.cc13
-rw-r--r--ash/wm/workspace/workspace_window_resizer_unittest.cc52
28 files changed, 341 insertions, 235 deletions
diff --git a/ash/display/display_controller_unittest.cc b/ash/display/display_controller_unittest.cc
index 57d6c46..7b41a51 100644
--- a/ash/display/display_controller_unittest.cc
+++ b/ash/display/display_controller_unittest.cc
@@ -91,6 +91,9 @@ class DisplayControllerShutdownTest : public test::AshTestBase {
public:
virtual void TearDown() OVERRIDE {
test::AshTestBase::TearDown();
+ if (!SupportsMultipleDisplays())
+ return;
+
// Make sure that primary display is accessible after shutdown.
gfx::Display primary = Shell::GetScreen()->GetPrimaryDisplay();
EXPECT_EQ("0,0 444x333", primary.bounds().ToString());
@@ -186,10 +189,16 @@ float GetStoredUIScale(int64 id) {
typedef test::AshTestBase DisplayControllerTest;
TEST_F(DisplayControllerShutdownTest, Shutdown) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("444x333, 200x200");
}
TEST_F(DisplayControllerTest, SecondaryDisplayLayout) {
+ if (!SupportsMultipleDisplays())
+ return;
+
TestObserver observer;
UpdateDisplay("500x500,400x400");
EXPECT_EQ(1, observer.CountAndReset()); // resize and add
@@ -260,6 +269,9 @@ TEST_F(DisplayControllerTest, SecondaryDisplayLayout) {
}
TEST_F(DisplayControllerTest, BoundsUpdated) {
+ if (!SupportsMultipleDisplays())
+ return;
+
TestObserver observer;
SetDefaultDisplayLayout(DisplayLayout::BOTTOM);
UpdateDisplay("200x200,300x300"); // layout, resize and add.
@@ -321,6 +333,9 @@ TEST_F(DisplayControllerTest, BoundsUpdated) {
}
TEST_F(DisplayControllerTest, MirroredLayout) {
+ if (!SupportsMultipleDisplays())
+ return;
+
DisplayController* display_controller =
Shell::GetInstance()->display_controller();
UpdateDisplay("500x500,400x400");
@@ -372,13 +387,10 @@ TEST_F(DisplayControllerTest, InvertLayout) {
DisplayLayout(DisplayLayout::BOTTOM, -80).Invert().ToString());
}
-// Crashes flakily on win8 aura bots: crbug.com/237642
-#if defined(OS_WIN) && defined(USE_AURA)
-#define MAYBE_SwapPrimary DISABLED_SwapPrimary
-#else
-#define MAYBE_SwapPrimary SwapPrimary
-#endif
-TEST_F(DisplayControllerTest, MAYBE_SwapPrimary) {
+TEST_F(DisplayControllerTest, SwapPrimary) {
+ if (!SupportsMultipleDisplays())
+ return;
+
DisplayController* display_controller =
Shell::GetInstance()->display_controller();
@@ -464,13 +476,10 @@ TEST_F(DisplayControllerTest, MAYBE_SwapPrimary) {
EXPECT_TRUE(primary_root->Contains(launcher_window));
}
-// Crashes flakily on win8 aura bots: crbug.com/237642
-#if defined(OS_WIN) && defined(USE_AURA)
-#define MAYBE_SwapPrimaryById DISABLED_SwapPrimaryById
-#else
-#define MAYBE_SwapPrimaryById SwapPrimaryById
-#endif
-TEST_F(DisplayControllerTest, MAYBE_SwapPrimaryById) {
+TEST_F(DisplayControllerTest, SwapPrimaryById) {
+ if (!SupportsMultipleDisplays())
+ return;
+
DisplayController* display_controller =
Shell::GetInstance()->display_controller();
@@ -591,15 +600,10 @@ TEST_F(DisplayControllerTest, MAYBE_SwapPrimaryById) {
EXPECT_TRUE(primary_root->Contains(launcher_window));
}
-#if defined(OS_WIN)
-// Flaky failures on Win8 due to window activation messages. crbug.com/239539
-#define MAYBE_CursorDeviceScaleFactorSwapPrimary \
- DISABLED_CursorDeviceScaleFactorSwapPrimary
-#else
-#define MAYBE_CursorDeviceScaleFactorSwapPrimary \
- CursorDeviceScaleFactorSwapPrimary
-#endif
-TEST_F(DisplayControllerTest, MAYBE_CursorDeviceScaleFactorSwapPrimary) {
+TEST_F(DisplayControllerTest, CursorDeviceScaleFactorSwapPrimary) {
+ if (!SupportsMultipleDisplays())
+ return;
+
DisplayController* display_controller =
Shell::GetInstance()->display_controller();
@@ -652,7 +656,8 @@ TEST_F(DisplayControllerTest, MAYBE_CursorDeviceScaleFactorSwapPrimary) {
}
#if defined(OS_WIN)
-// TODO(oshima): On Windows, we don't update the origin/size right away.
+// TODO(scottmg): RootWindow doesn't get resized on Windows
+// Ash. http://crbug.com/247916.
#define MAYBE_UpdateDisplayWithHostOrigin DISABLED_UpdateDisplayWithHostOrigin
#else
#define MAYBE_UpdateDisplayWithHostOrigin UpdateDisplayWithHostOrigin
@@ -692,14 +697,10 @@ TEST_F(DisplayControllerTest, MAYBE_UpdateDisplayWithHostOrigin) {
EXPECT_EQ("200x300", root_windows[1]->GetHostSize().ToString());
}
-#if defined(OS_WIN)
-// TODO(oshima): Windows does not supoprts insets.
-#define MAYBE_OverscanInsets DISABLED_OverscanInsets
-#else
-#define MAYBE_OverscanInsets OverscanInsets
-#endif
+TEST_F(DisplayControllerTest, OverscanInsets) {
+ if (!SupportsMultipleDisplays())
+ return;
-TEST_F(DisplayControllerTest, MAYBE_OverscanInsets) {
DisplayController* display_controller =
Shell::GetInstance()->display_controller();
TestEventHandler event_handler;
@@ -731,22 +732,10 @@ TEST_F(DisplayControllerTest, MAYBE_OverscanInsets) {
Shell::GetInstance()->RemovePreTargetHandler(&event_handler);
}
-#if defined(OS_WIN)
-// On Win8 bots, the host window can't be resized and
-// SetTransform updates the window using the orignal host window
-// size.
-#define MAYBE_Rotate DISABLED_Rotate
-#define MAYBE_ScaleRootWindow DISABLED_ScaleRootWindow
-#define MAYBE_TouchScale DISABLED_TouchScale
-#define MAYBE_ConvertHostToRootCoords DISABLED_ConvertHostToRootCoords
-#else
-#define MAYBE_Rotate Rotate
-#define MAYBE_ScaleRootWindow ScaleRootWindow
-#define MAYBE_TouchScale TouchScale
-#define MAYBE_ConvertHostToRootCoords ConvertHostToRootCoords
-#endif
+TEST_F(DisplayControllerTest, Rotate) {
+ if (!SupportsMultipleDisplays())
+ return;
-TEST_F(DisplayControllerTest, MAYBE_Rotate) {
DisplayController* display_controller =
Shell::GetInstance()->display_controller();
internal::DisplayManager* display_manager =
@@ -814,7 +803,10 @@ TEST_F(DisplayControllerTest, MAYBE_Rotate) {
Shell::GetInstance()->RemovePreTargetHandler(&event_handler);
}
-TEST_F(DisplayControllerTest, MAYBE_ScaleRootWindow) {
+TEST_F(DisplayControllerTest, ScaleRootWindow) {
+ if (!SupportsMultipleDisplays())
+ return;
+
TestEventHandler event_handler;
Shell::GetInstance()->AddPreTargetHandler(&event_handler);
@@ -849,7 +841,10 @@ TEST_F(DisplayControllerTest, MAYBE_ScaleRootWindow) {
Shell::GetInstance()->RemovePreTargetHandler(&event_handler);
}
-TEST_F(DisplayControllerTest, MAYBE_TouchScale) {
+TEST_F(DisplayControllerTest, TouchScale) {
+ if (!SupportsMultipleDisplays())
+ return;
+
TestEventHandler event_handler;
Shell::GetInstance()->AddPreTargetHandler(&event_handler);
@@ -878,7 +873,10 @@ TEST_F(DisplayControllerTest, MAYBE_TouchScale) {
Shell::GetInstance()->RemovePreTargetHandler(&event_handler);
}
-TEST_F(DisplayControllerTest, MAYBE_ConvertHostToRootCoords) {
+TEST_F(DisplayControllerTest, ConvertHostToRootCoords) {
+ if (!SupportsMultipleDisplays())
+ return;
+
TestEventHandler event_handler;
Shell::GetInstance()->AddPreTargetHandler(&event_handler);
diff --git a/ash/display/display_error_dialog_unittest.cc b/ash/display/display_error_dialog_unittest.cc
index 9c5a891..9bd81e4 100644
--- a/ash/display/display_error_dialog_unittest.cc
+++ b/ash/display/display_error_dialog_unittest.cc
@@ -59,6 +59,9 @@ class DisplayErrorDialogTest : public test::AshTestBase {
// The test cases in this file usually check if the showing dialog doesn't
// cause any crashes, and the code doesn't cause any memory leaks.
TEST_F(DisplayErrorDialogTest, Normal) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("200x200,300x300");
DisplayErrorDialog* dialog =
DisplayErrorDialog::ShowDialog(chromeos::STATE_DUAL_MIRROR);
@@ -71,6 +74,9 @@ TEST_F(DisplayErrorDialogTest, Normal) {
}
TEST_F(DisplayErrorDialogTest, CallTwice) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("200x200,300x300");
observer()->OnDisplayModeChangeFailed(chromeos::STATE_DUAL_MIRROR);
const DisplayErrorDialog* dialog = observer()->dialog();
@@ -81,6 +87,9 @@ TEST_F(DisplayErrorDialogTest, CallTwice) {
}
TEST_F(DisplayErrorDialogTest, CallWithDifferentState) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("200x200,300x300");
observer()->OnDisplayModeChangeFailed(chromeos::STATE_DUAL_MIRROR);
const DisplayErrorDialog* dialog = observer()->dialog();
@@ -105,6 +114,9 @@ TEST_F(DisplayErrorDialogTest, SingleDisplay) {
}
TEST_F(DisplayErrorDialogTest, DisplayDisconnected) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("200x200,300x300");
observer()->OnDisplayModeChangeFailed(chromeos::STATE_DUAL_MIRROR);
EXPECT_TRUE(observer()->dialog());
diff --git a/ash/display/display_manager.cc b/ash/display/display_manager.cc
index 60ae806..eceb643 100644
--- a/ash/display/display_manager.cc
+++ b/ash/display/display_manager.cc
@@ -415,6 +415,14 @@ void DisplayManager::UpdateDisplays() {
void DisplayManager::UpdateDisplays(
const std::vector<DisplayInfo>& updated_display_info_list) {
+#if defined(OS_WIN)
+ if (base::win::GetVersion() >= base::win::VERSION_WIN8) {
+ DCHECK_EQ(1u, updated_display_info_list.size()) <<
+ "Multiple display test does not work on Win8 bots. Please "
+ "skip (don't disable) the test using |SupportMultipleDisplay()|";
+ }
+#endif
+
DisplayInfoList new_display_info_list = updated_display_info_list;
std::sort(displays_.begin(), displays_.end(), DisplaySortFunctor());
std::sort(new_display_info_list.begin(),
diff --git a/ash/display/display_manager_unittest.cc b/ash/display/display_manager_unittest.cc
index 694b722..062a0e7 100644
--- a/ash/display/display_manager_unittest.cc
+++ b/ash/display/display_manager_unittest.cc
@@ -119,6 +119,9 @@ class DisplayManagerTest : public test::AshTestBase,
};
TEST_F(DisplayManagerTest, NativeDisplayTest) {
+ if (!SupportsMultipleDisplays())
+ return;
+
EXPECT_EQ(1U, display_manager()->GetNumDisplays());
// Update primary and add seconary.
@@ -210,6 +213,9 @@ TEST_F(DisplayManagerTest, NativeDisplayTest) {
// Test in emulation mode (use_fullscreen_host_window=false)
TEST_F(DisplayManagerTest, EmulatorTest) {
+ if (!SupportsMultipleDisplays())
+ return;
+
EXPECT_EQ(1U, display_manager()->GetNumDisplays());
display_manager()->AddRemoveDisplay();
@@ -230,6 +236,9 @@ TEST_F(DisplayManagerTest, EmulatorTest) {
}
TEST_F(DisplayManagerTest, OverscanInsetsTest) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("0+0-500x500,0+501-400x400");
reset();
ASSERT_EQ(2u, display_manager()->GetNumDisplays());
@@ -332,6 +341,9 @@ TEST_F(DisplayManagerTest, OverscanInsetsTest) {
}
TEST_F(DisplayManagerTest, ZeroOverscanInsets) {
+ if (!SupportsMultipleDisplays())
+ return;
+
// Make sure the display change events is emitted for overscan inset changes.
UpdateDisplay("0+0-500x500,0+501-400x400");
ASSERT_EQ(2u, display_manager()->GetNumDisplays());
@@ -371,13 +383,7 @@ DisplayInfo CreateDisplayInfo(int64 id, const gfx::Rect& bounds) {
return info;
}
-#if defined(OS_WIN)
-// Crashes flakily on Win8 Aura: http://crbug.com/246109.
-#define MAYBE_TestNativeDisplaysChanged DISABLED_TestNativeDisplaysChanged
-#else
-#define MAYBE_TestNativeDisplaysChanged TestNativeDisplaysChanged
-#endif
-TEST_F(DisplayManagerTest, MAYBE_TestNativeDisplaysChanged) {
+TEST_F(DisplayManagerTest, TestNativeDisplaysChanged) {
const int internal_display_id =
test::DisplayManagerTestApi(display_manager()).
SetFirstDisplayAsInternalDisplay();
@@ -405,6 +411,9 @@ TEST_F(DisplayManagerTest, MAYBE_TestNativeDisplaysChanged) {
EXPECT_EQ(1U, display_manager()->num_connected_displays());
EXPECT_FALSE(display_manager()->mirrored_display().is_valid());
+ if (!SupportsMultipleDisplays())
+ return;
+
// External connected while primary was disconnected.
display_info_list.push_back(external_display_info);
display_manager()->OnNativeDisplaysChanged(display_info_list);
@@ -536,8 +545,8 @@ TEST_F(DisplayManagerTest, MAYBE_TestNativeDisplaysChanged) {
}
#if defined(OS_WIN)
-// This test currently fails on Win8/Metro as it picks up the actual
-// display size. http://crbug.com/154081
+// TODO(scottmg): RootWindow doesn't get resized on Windows
+// Ash. http://crbug.com/247916.
#define MAYBE_TestNativeDisplaysChangedNoInternal \
DISABLED_TestNativeDisplaysChangedNoInternal
#else
@@ -566,6 +575,9 @@ TEST_F(DisplayManagerTest, MAYBE_TestNativeDisplaysChangedNoInternal) {
}
TEST_F(DisplayManagerTest, EnsurePointerInDisplays) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("200x200,300x300");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
@@ -605,15 +617,10 @@ TEST_F(DisplayManagerTest, EnsurePointerInDisplays) {
EXPECT_EQ("150,140", env->last_mouse_location().ToString());
}
-#if defined(OS_WIN)
-// Flaky failures on Win8 due to window activation messages. crbug.com/239539
-#define MAYBE_EnsurePointerInDisplays_2ndOnLeft \
- DISABLED_EnsurePointerInDisplays_2ndOnLeft
-#else
-#define MAYBE_EnsurePointerInDisplays_2ndOnLeft \
- EnsurePointerInDisplays_2ndOnLeft
-#endif
-TEST_F(DisplayManagerTest, MAYBE_EnsurePointerInDisplays_2ndOnLeft) {
+TEST_F(DisplayManagerTest, EnsurePointerInDisplays_2ndOnLeft) {
+ if (!SupportsMultipleDisplays())
+ return;
+
// Set the 2nd display on the left.
DisplayController* display_controller =
Shell::GetInstance()->display_controller();
@@ -649,6 +656,9 @@ TEST_F(DisplayManagerTest, MAYBE_EnsurePointerInDisplays_2ndOnLeft) {
}
TEST_F(DisplayManagerTest, NativeDisplaysChangedAfterPrimaryChange) {
+ if (!SupportsMultipleDisplays())
+ return;
+
const int64 internal_display_id =
test::DisplayManagerTestApi(display_manager()).
SetFirstDisplayAsInternalDisplay();
@@ -681,6 +691,9 @@ TEST_F(DisplayManagerTest, NativeDisplaysChangedAfterPrimaryChange) {
}
TEST_F(DisplayManagerTest, AutomaticOverscanInsets) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("200x200,400x400");
std::vector<DisplayInfo> display_info_list;
@@ -714,13 +727,10 @@ TEST_F(DisplayManagerTest, AutomaticOverscanInsets) {
GetDisplayInfoAt(1).size_in_pixel().ToString());
}
-#if defined(OS_WIN)
-// Flaky on Win8 Aura: http://crbug.com/244466
-#define MAYBE_Rotate DISABLED_Rotate
-#else
-#define MAYBE_Rotate Rotate
-#endif
-TEST_F(DisplayManagerTest, MAYBE_Rotate) {
+TEST_F(DisplayManagerTest, Rotate) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("100x200/r,300x400/l");
EXPECT_EQ("1,1 100x200",
GetDisplayInfoAt(0).bounds_in_pixel().ToString());
@@ -825,7 +835,8 @@ TEST_F(DisplayManagerTest, UIScale) {
#if defined(OS_WIN)
-// TODO(oshima): On Windows, we don't update the origin/size right away.
+// TODO(scottmg): RootWindow doesn't get resized on Windows
+// Ash. http://crbug.com/247916.
#define MAYBE_UpdateMouseCursorAfterRotateZoom DISABLED_UpdateMouseCursorAfterRotateZoom
#else
#define MAYBE_UpdateMouseCursorAfterRotateZoom UpdateMouseCursorAfterRotateZoom
@@ -869,13 +880,6 @@ TEST_F(DisplayManagerTest, MAYBE_UpdateMouseCursorAfterRotateZoom) {
EXPECT_EQ("750,75", env->last_mouse_location().ToString());
}
-#if defined(OS_WIN)
-// This does not work on metro.
-#define MAYBE_SoftwareMirroring DISABLED_SoftwareMirroring
-#else
-#define MAYBE_SoftwareMirroring SoftwareMirroring
-#endif
-
class TestDisplayObserver : public gfx::DisplayObserver {
public:
TestDisplayObserver() : changed_(false) {}
@@ -910,7 +914,10 @@ class TestDisplayObserver : public gfx::DisplayObserver {
DISALLOW_COPY_AND_ASSIGN(TestDisplayObserver);
};
-TEST_F(DisplayManagerTest, MAYBE_SoftwareMirroring) {
+TEST_F(DisplayManagerTest, SoftwareMirroring) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("300x400,400x500");
test::MirrorWindowTestApi test_api;
diff --git a/ash/display/mouse_cursor_event_filter_unittest.cc b/ash/display/mouse_cursor_event_filter_unittest.cc
index 73f282f..363a57e 100644
--- a/ash/display/mouse_cursor_event_filter_unittest.cc
+++ b/ash/display/mouse_cursor_event_filter_unittest.cc
@@ -34,6 +34,9 @@ typedef test::AshTestBase MouseCursorEventFilterTest;
// Verifies if the mouse pointer correctly moves to another display when there
// are two displays.
TEST_F(MouseCursorEventFilterTest, WarpMouse) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("500x500,500x500");
MouseCursorEventFilter* event_filter =
@@ -94,6 +97,9 @@ TEST_F(MouseCursorEventFilterTest, WarpMouse) {
// Verifies if the mouse pointer correctly moves to another display even when
// two displays are not the same size.
TEST_F(MouseCursorEventFilterTest, WarpMouseDifferentSizeDisplays) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("500x500,600x600"); // the second one is larger.
MouseCursorEventFilter* event_filter =
@@ -126,6 +132,9 @@ TEST_F(MouseCursorEventFilterTest, WarpMouseDifferentSizeDisplays) {
// Verifies if the mouse pointer correctly moves between displays with
// different scale factors.
TEST_F(MouseCursorEventFilterTest, WarpMouseDifferentScaleDisplays) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("500x500,600x600*2");
MouseCursorEventFilter* event_filter =
@@ -159,6 +168,9 @@ TEST_F(MouseCursorEventFilterTest, WarpMouseDifferentScaleDisplays) {
// Verifies if MouseCursorEventFilter::set_mouse_warp_mode() works as expected.
TEST_F(MouseCursorEventFilterTest, SetMouseWarpModeFlag) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("500x500,500x500");
MouseCursorEventFilter* event_filter =
@@ -184,6 +196,9 @@ TEST_F(MouseCursorEventFilterTest, SetMouseWarpModeFlag) {
// Verifies if MouseCursorEventFilter's bounds calculation works correctly.
TEST_F(MouseCursorEventFilterTest, IndicatorBoundsTestOnRight) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("360x360,700x700");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
@@ -239,6 +254,9 @@ TEST_F(MouseCursorEventFilterTest, IndicatorBoundsTestOnRight) {
}
TEST_F(MouseCursorEventFilterTest, IndicatorBoundsTestOnLeft) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("360x360,700x700");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
@@ -267,6 +285,9 @@ TEST_F(MouseCursorEventFilterTest, IndicatorBoundsTestOnLeft) {
}
TEST_F(MouseCursorEventFilterTest, IndicatorBoundsTestOnTopBottom) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("360x360,700x700");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
@@ -309,6 +330,9 @@ TEST_F(MouseCursorEventFilterTest, IndicatorBoundsTestOnTopBottom) {
// across root windows with different device scale factors
// (http://crbug.com/154183).
TEST_F(MouseCursorEventFilterTest, CursorDeviceScaleFactor) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("400x400,800x800*2");
DisplayController* controller =
Shell::GetInstance()->display_controller();
diff --git a/ash/display/root_window_transformers_unittest.cc b/ash/display/root_window_transformers_unittest.cc
index 631ca95..c8abe97 100644
--- a/ash/display/root_window_transformers_unittest.cc
+++ b/ash/display/root_window_transformers_unittest.cc
@@ -120,16 +120,13 @@ float GetStoredUIScale(int64 id) {
typedef test::AshTestBase AshRootWindowTransformerTest;
#if defined(OS_WIN)
-// On Win8 bots, the host window can't be resized and
-// SetTransform updates the window using the orignal host window
-// size.
+// TODO(scottmg): RootWindow doesn't get resized on Windows
+// Ash. http://crbug.com/247916.
#define MAYBE_RotateAndMagnify DISABLED_RotateAndMagniy
-#define MAYBE_ScaleAndMagnify DISABLED_ScaleAndMagnify
#define MAYBE_TouchScaleAndMagnify DISABLED_TouchScaleAndMagnify
#define MAYBE_ConvertHostToRootCoords DISABLED_ConvertHostToRootCoords
#else
#define MAYBE_RotateAndMagnify RotateAndMagniy
-#define MAYBE_ScaleAndMagnify ScaleAndMagnify
#define MAYBE_TouchScaleAndMagnify TouchScaleAndMagnify
#define MAYBE_ConvertHostToRootCoords ConvertHostToRootCoords
#endif
@@ -229,7 +226,10 @@ TEST_F(AshRootWindowTransformerTest, MAYBE_RotateAndMagnify) {
Shell::GetInstance()->RemovePreTargetHandler(&event_handler);
}
-TEST_F(AshRootWindowTransformerTest, MAYBE_ScaleAndMagnify) {
+TEST_F(AshRootWindowTransformerTest, ScaleAndMagnify) {
+ if (!SupportsMultipleDisplays())
+ return;
+
TestEventHandler event_handler;
Shell::GetInstance()->AddPreTargetHandler(&event_handler);
diff --git a/ash/display/screen_position_controller_unittest.cc b/ash/display/screen_position_controller_unittest.cc
index 3bd0583..ba6f127 100644
--- a/ash/display/screen_position_controller_unittest.cc
+++ b/ash/display/screen_position_controller_unittest.cc
@@ -15,8 +15,8 @@
#include "ui/gfx/screen.h"
#if defined(OS_WIN)
-// TOD(mazda): UpdateDisplay does not work properly on Win.
-// Fix this and enable tests.
+// TODO(scottmg): RootWindow doesn't get resized immediately on Windows
+// Ash. http://crbug.com/247916.
#define MAYBE_ConvertHostPointToScreen DISABLED_ConvertHostPointToScreen
#define MAYBE_ConvertHostPointToScreenHiDPI DISABLED_ConvertHostPointToScreenHiDPI
#define MAYBE_ConvertHostPointToScreenRotate DISABLED_ConvertHostPointToScreenRotate
diff --git a/ash/drag_drop/drag_drop_controller_unittest.cc b/ash/drag_drop/drag_drop_controller_unittest.cc
index ea25e38..7ca79ea0 100644
--- a/ash/drag_drop/drag_drop_controller_unittest.cc
+++ b/ash/drag_drop/drag_drop_controller_unittest.cc
@@ -1012,16 +1012,12 @@ class DragImageWindowObserver : public aura::WindowObserver {
}
-#if defined(OS_WIN)
-// Multiple displays are not supported on Windows Ash. http://crbug.com/165962
-#define MAYBE_DragCancelAcrossDisplays DISABLED_DragCancelAcrossDisplays
-#else
-#define MAYBE_DragCancelAcrossDisplays DragCancelAcrossDisplays
-#endif
-
// Verifies the drag image moves back to the position where drag is started
// across displays when drag is cancelled.
-TEST_F(DragDropControllerTest, MAYBE_DragCancelAcrossDisplays) {
+TEST_F(DragDropControllerTest, DragCancelAcrossDisplays) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("400x400,400x400");
Shell::RootWindowList root_windows =
Shell::GetInstance()->GetAllRootWindows();
diff --git a/ash/extended_desktop_unittest.cc b/ash/extended_desktop_unittest.cc
index 2a780f3..f71a0b5 100644
--- a/ash/extended_desktop_unittest.cc
+++ b/ash/extended_desktop_unittest.cc
@@ -157,6 +157,9 @@ class ExtendedDesktopTest : public test::AshTestBase {
// Test conditions that root windows in extended desktop mode
// must satisfy.
TEST_F(ExtendedDesktopTest, Basic) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("1000x600,600x400");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
@@ -176,6 +179,9 @@ TEST_F(ExtendedDesktopTest, Basic) {
}
TEST_F(ExtendedDesktopTest, Activation) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("1000x600,600x400");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
@@ -207,6 +213,9 @@ TEST_F(ExtendedDesktopTest, Activation) {
}
TEST_F(ExtendedDesktopTest, SystemModal) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("1000x600,600x400");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
@@ -242,6 +251,9 @@ TEST_F(ExtendedDesktopTest, SystemModal) {
}
TEST_F(ExtendedDesktopTest, TestCursor) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("1000x600,600x400");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
EXPECT_EQ(ui::kCursorPointer, root_windows[0]->last_cursor().native_type());
@@ -252,6 +264,9 @@ TEST_F(ExtendedDesktopTest, TestCursor) {
}
TEST_F(ExtendedDesktopTest, TestCursorLocation) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("1000x600,600x400");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
aura::test::WindowTestApi root_window0_test_api(root_windows[0]);
@@ -272,6 +287,9 @@ TEST_F(ExtendedDesktopTest, TestCursorLocation) {
}
TEST_F(ExtendedDesktopTest, CycleWindows) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("700x500,500x500");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
@@ -320,6 +338,9 @@ TEST_F(ExtendedDesktopTest, CycleWindows) {
}
TEST_F(ExtendedDesktopTest, GetRootWindowAt) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("700x500,500x500");
SetSecondaryDisplayLayout(DisplayLayout::LEFT);
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
@@ -338,6 +359,9 @@ TEST_F(ExtendedDesktopTest, GetRootWindowAt) {
}
TEST_F(ExtendedDesktopTest, GetRootWindowMatching) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("700x500,500x500");
SetSecondaryDisplayLayout(DisplayLayout::LEFT);
@@ -375,6 +399,9 @@ TEST_F(ExtendedDesktopTest, GetRootWindowMatching) {
}
TEST_F(ExtendedDesktopTest, Capture) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("1000x600,600x400");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
@@ -431,6 +458,9 @@ TEST_F(ExtendedDesktopTest, Capture) {
}
TEST_F(ExtendedDesktopTest, MoveWindow) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("1000x600,600x400");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
views::Widget* d1 = CreateTestWidget(gfx::Rect(10, 10, 100, 100));
@@ -465,6 +495,9 @@ TEST_F(ExtendedDesktopTest, MoveWindow) {
// Verifies if the mouse event arrives to the window even when the window
// moves to another root in a pre-target handler. See: crbug.com/157583
TEST_F(ExtendedDesktopTest, MoveWindowByMouseClick) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("1000x600,600x400");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
@@ -485,6 +518,9 @@ TEST_F(ExtendedDesktopTest, MoveWindowByMouseClick) {
}
TEST_F(ExtendedDesktopTest, MoveWindowToDisplay) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("1000x1000,1000x1000");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
@@ -514,6 +550,9 @@ TEST_F(ExtendedDesktopTest, MoveWindowToDisplay) {
}
TEST_F(ExtendedDesktopTest, MoveWindowWithTransient) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("1000x600,600x400");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
views::Widget* w1 = CreateTestWidget(gfx::Rect(10, 10, 100, 100));
@@ -572,6 +611,9 @@ namespace internal {
// Test if the Window::ConvertPointToTarget works across root windows.
// TODO(oshima): Move multiple display suport and this test to aura.
TEST_F(ExtendedDesktopTest, ConvertPoint) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("1000x600,600x400");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
gfx::Display& display_1 =
@@ -628,6 +670,9 @@ TEST_F(ExtendedDesktopTest, ConvertPoint) {
}
TEST_F(ExtendedDesktopTest, OpenSystemTray) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("500x600,600x400");
SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray();
ASSERT_FALSE(tray->HasSystemBubble());
@@ -659,6 +704,9 @@ TEST_F(ExtendedDesktopTest, OpenSystemTray) {
}
TEST_F(ExtendedDesktopTest, StayInSameRootWindow) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("100x100,200x200");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
views::Widget* w1 = CreateTestWidget(gfx::Rect(10, 10, 50, 50));
@@ -679,6 +727,9 @@ TEST_F(ExtendedDesktopTest, StayInSameRootWindow) {
}
TEST_F(ExtendedDesktopTest, KeyEventsOnLockScreen) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("100x100,200x200");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
@@ -749,6 +800,9 @@ TEST_F(ExtendedDesktopTest, KeyEventsOnLockScreen) {
}
TEST_F(ExtendedDesktopTest, PassiveGrab) {
+ if (!SupportsMultipleDisplays())
+ return;
+
EventLocationRecordingEventHandler event_handler;
ash::Shell::GetInstance()->AddPreTargetHandler(&event_handler);
diff --git a/ash/keyboard_overlay/keyboard_overlay_delegate_unittest.cc b/ash/keyboard_overlay/keyboard_overlay_delegate_unittest.cc
index d7058f6..0f7158a 100644
--- a/ash/keyboard_overlay/keyboard_overlay_delegate_unittest.cc
+++ b/ash/keyboard_overlay/keyboard_overlay_delegate_unittest.cc
@@ -18,6 +18,9 @@ typedef test::AshTestBase KeyboardOverlayDelegateTest;
// Verifies we can show and close the widget for the overlay dialog.
TEST_F(KeyboardOverlayDelegateTest, ShowAndClose) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("500x400,300x200");
KeyboardOverlayDelegate delegate(ASCIIToUTF16("Title"),
GURL("chrome://keyboardoverlay/"));
diff --git a/ash/root_window_controller_unittest.cc b/ash/root_window_controller_unittest.cc
index 4a3351e..81a3e62 100644
--- a/ash/root_window_controller_unittest.cc
+++ b/ash/root_window_controller_unittest.cc
@@ -118,14 +118,10 @@ class RootWindowControllerTest : public test::AshTestBase {
}
};
-#if defined(OS_WIN)
-// Multiple displays are not supported on Windows Ash. http://crbug.com/165962
-#define MAYBE_MoveWindows_Basic DISABLED_MoveWindows_Basic
-#else
-#define MAYBE_MoveWindows_Basic MoveWindows_Basic
-#endif
-
-TEST_F(RootWindowControllerTest, MAYBE_MoveWindows_Basic) {
+TEST_F(RootWindowControllerTest, MoveWindows_Basic) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("600x600,500x500");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
internal::RootWindowController* controller =
@@ -241,14 +237,10 @@ TEST_F(RootWindowControllerTest, MAYBE_MoveWindows_Basic) {
EXPECT_EQ(internal::kShellWindowId_PanelContainer, panel->parent()->id());
}
-#if defined(OS_WIN)
-// Multiple displays are not supported on Windows Ash. http://crbug.com/165962
-#define MAYBE_MoveWindows_Modal DISABLED_MoveWindows_Modal
-#else
-#define MAYBE_MoveWindows_Modal MoveWindows_Modal
-#endif
+TEST_F(RootWindowControllerTest, MoveWindows_Modal) {
+ if (!SupportsMultipleDisplays())
+ return;
-TEST_F(RootWindowControllerTest, MAYBE_MoveWindows_Modal) {
UpdateDisplay("500x500,500x500");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
diff --git a/ash/screen_ash_unittest.cc b/ash/screen_ash_unittest.cc
index 71d608f..f5faf3b 100644
--- a/ash/screen_ash_unittest.cc
+++ b/ash/screen_ash_unittest.cc
@@ -23,6 +23,9 @@ namespace test {
typedef test::AshTestBase ScreenAshTest;
TEST_F(ScreenAshTest, Bounds) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("600x600,500x500");
Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager()->
SetAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
@@ -62,6 +65,9 @@ TEST_F(ScreenAshTest, Bounds) {
// Test verifies a stable handling of secondary screen widget changes
// (crbug.com/226132).
TEST_F(ScreenAshTest, StabilityTest) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("600x600,500x500");
views::Widget* secondary = views::Widget::CreateWindowWithContextAndBounds(
NULL, CurrentContext(), gfx::Rect(610, 10, 100, 100));
@@ -76,6 +82,9 @@ TEST_F(ScreenAshTest, StabilityTest) {
}
TEST_F(ScreenAshTest, ConvertRect) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("600x600,500x500");
views::Widget* primary = views::Widget::CreateWindowWithContextAndBounds(
diff --git a/ash/shelf/shelf_layout_manager_unittest.cc b/ash/shelf/shelf_layout_manager_unittest.cc
index fd308ba..5aa5ba2 100644
--- a/ash/shelf/shelf_layout_manager_unittest.cc
+++ b/ash/shelf/shelf_layout_manager_unittest.cc
@@ -1208,6 +1208,9 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_GestureDrag) {
}
TEST_F(ShelfLayoutManagerTest, WindowVisibilityDisablesAutoHide) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("800x600,800x600");
ShelfLayoutManager* shelf = GetShelfLayoutManager();
shelf->LayoutShelf();
diff --git a/ash/shelf/shelf_widget_unittest.cc b/ash/shelf/shelf_widget_unittest.cc
index 4f2aaa3..3379e29 100644
--- a/ash/shelf/shelf_widget_unittest.cc
+++ b/ash/shelf/shelf_widget_unittest.cc
@@ -84,6 +84,9 @@ TEST_F(ShelfWidgetTest, TestAlignment) {
SHELF_ALIGNMENT_LEFT,
"48,0 352x400");
}
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("300x300,500x500");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
{
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc
index f10d421..8e93f27 100644
--- a/ash/test/ash_test_base.cc
+++ b/ash/test/ash_test_base.cc
@@ -180,6 +180,15 @@ aura::test::EventGenerator& AshTestBase::GetEventGenerator() {
return *event_generator_.get();
}
+// static
+bool AshTestBase::SupportsMultipleDisplays() {
+#if defined(OS_WIN)
+ return base::win::GetVersion() < base::win::VERSION_WIN8;
+#else
+ return true;
+#endif
+}
+
void AshTestBase::UpdateDisplay(const std::string& display_specs) {
DisplayManagerTestApi display_manager_test_api(
Shell::GetInstance()->display_manager());
diff --git a/ash/test/ash_test_base.h b/ash/test/ash_test_base.h
index 2d9f717..53c2e50 100644
--- a/ash/test/ash_test_base.h
+++ b/ash/test/ash_test_base.h
@@ -95,6 +95,10 @@ class AshTestBase : public testing::Test {
aura::test::EventGenerator& GetEventGenerator();
protected:
+ // True if the running environment supports multiple displays,
+ // or false otherwise (e.g. win8 bot).
+ static bool SupportsMultipleDisplays();
+
void RunAllPendingInMessageLoop();
// Utility methods to emulate user logged in or not, session started or not
diff --git a/ash/tooltips/tooltip_controller_unittest.cc b/ash/tooltips/tooltip_controller_unittest.cc
index 4e560e4..ff894c8 100644
--- a/ash/tooltips/tooltip_controller_unittest.cc
+++ b/ash/tooltips/tooltip_controller_unittest.cc
@@ -132,16 +132,10 @@ TEST_F(TooltipControllerTest, HideTooltipWhenCursorHidden) {
EXPECT_TRUE(helper_->IsTooltipVisible());
}
-#if defined(OS_WIN)
-// Multiple displays are not supported on Windows Ash. http://crbug.com/165962
-#define MAYBE_TooltipsOnMultiDisplayShouldNotCrash \
- DISABLED_TooltipsOnMultiDisplayShouldNotCrash
-#else
-#define MAYBE_TooltipsOnMultiDisplayShouldNotCrash \
- TooltipsOnMultiDisplayShouldNotCrash
-#endif
+TEST_F(TooltipControllerTest, TooltipsOnMultiDisplayShouldNotCrash) {
+ if (!SupportsMultipleDisplays())
+ return;
-TEST_F(TooltipControllerTest, MAYBE_TooltipsOnMultiDisplayShouldNotCrash) {
UpdateDisplay("1000x600,600x400");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
scoped_ptr<views::Widget> widget1(CreateNewWidgetWithBoundsOn(
diff --git a/ash/touch/touch_observer_hud_unittest.cc b/ash/touch/touch_observer_hud_unittest.cc
index c616f6f..7e8b91b 100644
--- a/ash/touch/touch_observer_hud_unittest.cc
+++ b/ash/touch/touch_observer_hud_unittest.cc
@@ -243,6 +243,9 @@ class TouchHudTest : public test::AshTestBase {
// Checks if touch HUDs are correctly initialized for displays.
TEST_F(TouchHudTest, Basic) {
+ if (!SupportsMultipleDisplays())
+ return;
+
// Setup a dual display setting.
SetupDualDisplays();
@@ -254,6 +257,9 @@ TEST_F(TouchHudTest, Basic) {
// Checks if touch HUDs are correctly handled when primary display is changed.
TEST_F(TouchHudTest, SwapPrimaryDisplay) {
+ if (!SupportsMultipleDisplays())
+ return;
+
// Setup a dual display setting.
SetupDualDisplays();
@@ -278,6 +284,9 @@ TEST_F(TouchHudTest, SwapPrimaryDisplay) {
// Checks if touch HUDs are correctly handled when displays are mirrored.
TEST_F(TouchHudTest, MirrorDisplays) {
+ if (!SupportsMultipleDisplays())
+ return;
+
// Setup a dual display setting.
SetupDualDisplays();
@@ -301,6 +310,9 @@ TEST_F(TouchHudTest, MirrorDisplays) {
// Checks if touch HUDs are correctly handled when displays are mirrored after
// setting the external display as the primary one.
TEST_F(TouchHudTest, SwapPrimaryThenMirrorDisplays) {
+ if (!SupportsMultipleDisplays())
+ return;
+
// Setup a dual display setting.
SetupDualDisplays();
@@ -328,6 +340,9 @@ TEST_F(TouchHudTest, SwapPrimaryThenMirrorDisplays) {
// Checks if touch HUDs are correctly handled when the external display, which
// is the secondary one, is removed.
TEST_F(TouchHudTest, RemoveSecondaryDisplay) {
+ if (!SupportsMultipleDisplays())
+ return;
+
// Setup a dual display setting.
SetupDualDisplays();
@@ -351,6 +366,9 @@ TEST_F(TouchHudTest, RemoveSecondaryDisplay) {
// Checks if touch HUDs are correctly handled when the external display, which
// is set as the primary display, is removed.
TEST_F(TouchHudTest, RemovePrimaryDisplay) {
+ if (!SupportsMultipleDisplays())
+ return;
+
// Setup a dual display setting.
SetupDualDisplays();
@@ -377,6 +395,9 @@ TEST_F(TouchHudTest, RemovePrimaryDisplay) {
// Checks if touch HUDs are correctly handled when all displays are removed.
TEST_F(TouchHudTest, Headless) {
+ if (!SupportsMultipleDisplays())
+ return;
+
// Setup a single display setting.
SetupSingleDisplay();
diff --git a/ash/wm/activation_controller_unittest.cc b/ash/wm/activation_controller_unittest.cc
index 33f6a07..74ad9b8 100644
--- a/ash/wm/activation_controller_unittest.cc
+++ b/ash/wm/activation_controller_unittest.cc
@@ -533,18 +533,12 @@ TEST_F(ActivationControllerTest, ActivateLockScreen) {
EXPECT_TRUE(w1->HasFocus());
}
-#if defined(OS_WIN)
-// Multiple displays are not supported on Windows Ash. http://crbug.com/165962
-#define MAYBE_NextActiveWindowOnMultipleDisplays \
- DISABLED_NextActiveWindowOnMultipleDisplays
-#else
-#define MAYBE_NextActiveWindowOnMultipleDisplays \
- NextActiveWindowOnMultipleDisplays
-#endif
-
// Verifies that a next active window is chosen from current
// active display.
-TEST_F(ActivationControllerTest, MAYBE_NextActiveWindowOnMultipleDisplays) {
+TEST_F(ActivationControllerTest, NextActiveWindowOnMultipleDisplays) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("300x300,300x300");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
diff --git a/ash/wm/drag_window_resizer_unittest.cc b/ash/wm/drag_window_resizer_unittest.cc
index 4f8e517..629e8a2 100644
--- a/ash/wm/drag_window_resizer_unittest.cc
+++ b/ash/wm/drag_window_resizer_unittest.cc
@@ -135,6 +135,9 @@ class DragWindowResizerTest : public test::AshTestBase {
// Verifies a window can be moved from the primary display to another.
TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplays) {
+ if (!SupportsMultipleDisplays())
+ return;
+
// The secondary display is logically on the right, but on the system (e.g. X)
// layer, it's below the primary one. See UpdateDisplay() in ash_test_base.cc.
UpdateDisplay("800x600,800x600");
@@ -197,6 +200,9 @@ TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplays) {
// Verifies a window can be moved from the secondary display to primary.
TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplaysRightToLeft) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("800x600,800x600");
shelf_layout_manager()->LayoutShelf();
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
@@ -221,6 +227,9 @@ TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplaysRightToLeft) {
// Verifies the drag window is shown correctly.
TEST_F(DragWindowResizerTest, DragWindowController) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("800x600,800x600");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
ASSERT_EQ(2U, root_windows.size());
@@ -348,6 +357,9 @@ TEST_F(DragWindowResizerTest, WarpMousePointer) {
// Verifies cursor's device scale factor is updated whe a window is moved across
// root windows with different device scale factors (http://crbug.com/154183).
TEST_F(DragWindowResizerTest, CursorDeviceScaleFactor) {
+ if (!SupportsMultipleDisplays())
+ return;
+
// The secondary display is logically on the right, but on the system (e.g. X)
// layer, it's below the primary one. See UpdateDisplay() in ash_test_base.cc.
UpdateDisplay("400x400,800x800*2");
@@ -401,6 +413,9 @@ TEST_F(DragWindowResizerTest, CursorDeviceScaleFactor) {
// Verifies several kinds of windows can be moved across displays.
TEST_F(DragWindowResizerTest, MoveWindowAcrossDisplays) {
+ if (!SupportsMultipleDisplays())
+ return;
+
// The secondary display is logically on the right, but on the system (e.g. X)
// layer, it's below the primary one. See UpdateDisplay() in ash_test_base.cc.
UpdateDisplay("400x400,400x400");
diff --git a/ash/wm/frame_painter_unittest.cc b/ash/wm/frame_painter_unittest.cc
index c81ca7c..27d4684 100644
--- a/ash/wm/frame_painter_unittest.cc
+++ b/ash/wm/frame_painter_unittest.cc
@@ -464,6 +464,9 @@ TEST_F(FramePainterTest, UseSoloWindowHeaderConstrained) {
#endif
TEST_F(FramePainterTest, MAYBE_UseSoloWindowHeaderMultiDisplay) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("1000x600,600x400");
// Create two widgets and painters for them.
diff --git a/ash/wm/panels/panel_layout_manager_unittest.cc b/ash/wm/panels/panel_layout_manager_unittest.cc
index 47655e7..2963a50 100644
--- a/ash/wm/panels/panel_layout_manager_unittest.cc
+++ b/ash/wm/panels/panel_layout_manager_unittest.cc
@@ -531,22 +531,10 @@ TEST_F(PanelLayoutManagerTest, MinimizeRestorePanel) {
EXPECT_TRUE(IsPanelCalloutVisible(window.get()));
}
-#if defined(OS_WIN)
-// Multiple displays aren't supported on Windows Metro/Ash.
-// http://crbug.com/165962
-#define MAYBE_PanelMoveBetweenMultipleDisplays \
- DISABLED_PanelMoveBetweenMultipleDisplays
-#define MAYBE_PanelAttachPositionMultipleDisplays \
- DISABLED_PanelAttachPositionMultipleDisplays
-#define MAYBE_PanelAlignmentSecondDisplay DISABLED_PanelAlignmentSecondDisplay
-#else
-#define MAYBE_PanelMoveBetweenMultipleDisplays PanelMoveBetweenMultipleDisplays
-#define MAYBE_PanelAttachPositionMultipleDisplays \
- PanelAttachPositionMultipleDisplays
-#define MAYBE_PanelAlignmentSecondDisplay PanelAlignmentSecondDisplay
-#endif
+TEST_F(PanelLayoutManagerTest, PanelMoveBetweenMultipleDisplays) {
+ if (!SupportsMultipleDisplays())
+ return;
-TEST_F(PanelLayoutManagerTest, MAYBE_PanelMoveBetweenMultipleDisplays) {
// Keep the displays wide so that launchers have enough
// space for launcher buttons.
UpdateDisplay("600x400,600x400");
@@ -613,7 +601,10 @@ TEST_F(PanelLayoutManagerTest, MAYBE_PanelMoveBetweenMultipleDisplays) {
p1_d2->GetBoundsInScreen()));
}
-TEST_F(PanelLayoutManagerTest, MAYBE_PanelAttachPositionMultipleDisplays) {
+TEST_F(PanelLayoutManagerTest, PanelAttachPositionMultipleDisplays) {
+ if (!SupportsMultipleDisplays())
+ return;
+
// Keep the displays wide so that launchers have enough space for launcher
// buttons. Use differently sized displays so the launcher is in a different
// position on second display.
@@ -632,7 +623,10 @@ TEST_F(PanelLayoutManagerTest, MAYBE_PanelAttachPositionMultipleDisplays) {
IsCalloutAboveLauncherIcon(p1_d2.get());
}
-TEST_F(PanelLayoutManagerTest, MAYBE_PanelAlignmentSecondDisplay) {
+TEST_F(PanelLayoutManagerTest, PanelAlignmentSecondDisplay) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("600x400,600x400");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
diff --git a/ash/wm/panels/panel_window_resizer_unittest.cc b/ash/wm/panels/panel_window_resizer_unittest.cc
index 055a6b0..2f05797 100644
--- a/ash/wm/panels/panel_window_resizer_unittest.cc
+++ b/ash/wm/panels/panel_window_resizer_unittest.cc
@@ -264,26 +264,10 @@ TEST_F(PanelWindowResizerTest, PanelDetachReattachTop) {
DetachReattachTest(window.get(), 0, 1);
}
-#if defined(OS_WIN)
-// Multiple displays aren't supported on Windows Metro/Ash.
-// http://crbug.com/165962
-#define MAYBE_PanelDetachReattachMultipleDisplays \
- DISABLED_PanelDetachReattachMultipleDisplays
-#define MAYBE_DetachThenDragAcrossDisplays DISABLED_DetachThenDragAcrossDisplays
-#define MAYBE_DetachAcrossDisplays DISABLED_DetachAcrossDisplays
-#define MAYBE_DetachThenAttachToSecondDisplay \
- DISABLED_DetachThenAttachToSecondDisplay
-#define MAYBE_AttachToSecondDisplay DISABLED_AttachToSecondDisplay
-#else
-#define MAYBE_PanelDetachReattachMultipleDisplays \
- PanelDetachReattachMultipleDisplays
-#define MAYBE_DetachThenDragAcrossDisplays DetachThenDragAcrossDisplays
-#define MAYBE_DetachAcrossDisplays DetachAcrossDisplays
-#define MAYBE_DetachThenAttachToSecondDisplay DetachThenAttachToSecondDisplay
-#define MAYBE_AttachToSecondDisplay AttachToSecondDisplay
-#endif
+TEST_F(PanelWindowResizerTest, PanelDetachReattachMultipleDisplays) {
+ if (!SupportsMultipleDisplays())
+ return;
-TEST_F(PanelWindowResizerTest, MAYBE_PanelDetachReattachMultipleDisplays) {
UpdateDisplay("600x400,600x400");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
scoped_ptr<aura::Window> window(
@@ -292,7 +276,10 @@ TEST_F(PanelWindowResizerTest, MAYBE_PanelDetachReattachMultipleDisplays) {
DetachReattachTest(window.get(), 0, -1);
}
-TEST_F(PanelWindowResizerTest, MAYBE_DetachThenDragAcrossDisplays) {
+TEST_F(PanelWindowResizerTest, DetachThenDragAcrossDisplays) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("600x400,600x400");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
scoped_ptr<aura::Window> window(
@@ -320,7 +307,10 @@ TEST_F(PanelWindowResizerTest, MAYBE_DetachThenDragAcrossDisplays) {
window->parent()->id());
}
-TEST_F(PanelWindowResizerTest, MAYBE_DetachAcrossDisplays) {
+TEST_F(PanelWindowResizerTest, DetachAcrossDisplays) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("600x400,600x400");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
scoped_ptr<aura::Window> window(
@@ -338,7 +328,10 @@ TEST_F(PanelWindowResizerTest, MAYBE_DetachAcrossDisplays) {
window->parent()->id());
}
-TEST_F(PanelWindowResizerTest, MAYBE_DetachThenAttachToSecondDisplay) {
+TEST_F(PanelWindowResizerTest, DetachThenAttachToSecondDisplay) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("600x400,600x600");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
scoped_ptr<aura::Window> window(
@@ -368,7 +361,10 @@ TEST_F(PanelWindowResizerTest, MAYBE_DetachThenAttachToSecondDisplay) {
EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id());
}
-TEST_F(PanelWindowResizerTest, MAYBE_AttachToSecondDisplay) {
+TEST_F(PanelWindowResizerTest, AttachToSecondDisplay) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("600x400,600x600");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
scoped_ptr<aura::Window> window(
diff --git a/ash/wm/system_modal_container_layout_manager_unittest.cc b/ash/wm/system_modal_container_layout_manager_unittest.cc
index 15107a4..35891ef 100644
--- a/ash/wm/system_modal_container_layout_manager_unittest.cc
+++ b/ash/wm/system_modal_container_layout_manager_unittest.cc
@@ -437,14 +437,10 @@ TEST_F(SystemModalContainerLayoutManagerTest, ShowNormalBackgroundOrLocked) {
// TODO(mukai): add the test case when the bug is fixed.
}
-#if defined(OS_WIN)
-// Multiple displays are not supported on Windows Ash. http://crbug.com/165962
-#define MAYBE_MultiDisplays DISABLED_MultiDisplays
-#else
-#define MAYBE_MultiDisplays MultiDisplays
-#endif
+TEST_F(SystemModalContainerLayoutManagerTest, MultiDisplays) {
+ if (!SupportsMultipleDisplays())
+ return;
-TEST_F(SystemModalContainerLayoutManagerTest, MAYBE_MultiDisplays) {
UpdateDisplay("500x500,500x500");
scoped_ptr<aura::Window> normal(OpenToplevelTestWindow(false));
diff --git a/ash/wm/window_cycle_controller_unittest.cc b/ash/wm/window_cycle_controller_unittest.cc
index 186e2bdf7..e639258 100644
--- a/ash/wm/window_cycle_controller_unittest.cc
+++ b/ash/wm/window_cycle_controller_unittest.cc
@@ -318,17 +318,10 @@ TEST_F(WindowCycleControllerTest, AlwaysOnTopMultiWindow) {
EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
}
-#if defined(OS_WIN)
-// Multiple displays are not supported on Windows Ash. http://crbug.com/165962
-#define MAYBE_AlwaysOnTopMultipleRootWindows \
- DISABLED_AlwaysOnTopMultipleRootWindows
-#else
-#define MAYBE_AlwaysOnTopMultipleRootWindows \
- AlwaysOnTopMultipleRootWindows
-#endif
+TEST_F(WindowCycleControllerTest, AlwaysOnTopMultipleRootWindows) {
+ if (!SupportsMultipleDisplays())
+ return;
-
-TEST_F(WindowCycleControllerTest, MAYBE_AlwaysOnTopMultipleRootWindows) {
// Set up a second root window
UpdateDisplay("1000x600,600x400");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
diff --git a/ash/wm/window_util_unittest.cc b/ash/wm/window_util_unittest.cc
index 930b658..8073a38 100644
--- a/ash/wm/window_util_unittest.cc
+++ b/ash/wm/window_util_unittest.cc
@@ -13,6 +13,9 @@ namespace ash {
typedef test::AshTestBase WindowUtilTest;
TEST_F(WindowUtilTest, CenterWindow) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("500x400, 600x400");
scoped_ptr<aura::Window> window(
CreateTestWindowInShellWithBounds(gfx::Rect(12, 20, 100, 100)));
diff --git a/ash/wm/workspace/workspace_layout_manager_unittest.cc b/ash/wm/workspace/workspace_layout_manager_unittest.cc
index 9516bdb..30cdf6b 100644
--- a/ash/wm/workspace/workspace_layout_manager_unittest.cc
+++ b/ash/wm/workspace/workspace_layout_manager_unittest.cc
@@ -24,18 +24,10 @@ namespace {
typedef test::AshTestBase WorkspaceLayoutManagerTest;
-// Multi root doesn't work on Win8/metro. crbug.com/240628.
-#if defined(OS_WIN) && defined(USE_AURA)
-#define MAYBE_RestoreFromMinimizeKeepsRestore \
- DISABLED_RestoreFromMinimizeKeepsRestore
-#else
-#define MAYBE_RestoreFromMinimizeKeepsRestore RestoreFromMinimizeKeepsRestore
-#endif
-
// Verifies that a window containing a restore coordinate will be restored to
// to the size prior to minimize, keeping the restore rectangle in tact (if
// there is one).
-TEST_F(WorkspaceLayoutManagerTest, MAYBE_RestoreFromMinimizeKeepsRestore) {
+TEST_F(WorkspaceLayoutManagerTest, RestoreFromMinimizeKeepsRestore) {
scoped_ptr<aura::Window> window(
CreateTestWindowInShellWithBounds(gfx::Rect(1, 2, 3, 4)));
gfx::Rect bounds(10, 15, 25, 35);
@@ -47,6 +39,9 @@ TEST_F(WorkspaceLayoutManagerTest, MAYBE_RestoreFromMinimizeKeepsRestore) {
EXPECT_EQ("0,0 100x100", GetRestoreBoundsInScreen(window.get())->ToString());
EXPECT_EQ("10,15 25x35", window.get()->bounds().ToString());
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("400x300,500x400");
window->SetBoundsInScreen(gfx::Rect(600, 0, 100, 100),
ScreenAsh::GetSecondaryDisplay());
diff --git a/ash/wm/workspace/workspace_window_resizer_unittest.cc b/ash/wm/workspace/workspace_window_resizer_unittest.cc
index 3de8814..de9bf19 100644
--- a/ash/wm/workspace/workspace_window_resizer_unittest.cc
+++ b/ash/wm/workspace/workspace_window_resizer_unittest.cc
@@ -473,15 +473,8 @@ TEST_F(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_3_Compress) {
}
-#if defined(OS_WIN)
-// Multiple displays are not supported on Windows Ash. http://crbug.com/165962
-#define MAYBE_Edge DISABLED_Edge
-#else
-#define MAYBE_Edge Edge
-#endif
-
// Assertions around dragging to the left/right edge of the screen.
-TEST_F(WorkspaceWindowResizerTest, MAYBE_Edge) {
+TEST_F(WorkspaceWindowResizerTest, Edge) {
int bottom =
ScreenAsh::GetDisplayWorkAreaBoundsInParent(window_.get()).bottom();
window_->SetBounds(gfx::Rect(20, 30, 50, 60));
@@ -513,6 +506,10 @@ TEST_F(WorkspaceWindowResizerTest, MAYBE_Edge) {
// Test if the restore bounds is correct in multiple displays.
ClearRestoreBounds(window_.get());
+
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("800x600,200x600");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
@@ -552,14 +549,10 @@ TEST_F(WorkspaceWindowResizerTest, NonResizableWindows) {
EXPECT_EQ("0,30 50x60", window_->bounds().ToString());
}
-#if defined(OS_WIN)
-// Multiple displays are not supported on Windows Ash. http://crbug.com/165962
-#define MAYBE_CancelSnapPhantom DISABLED_CancelSnapPhantom
-#else
-#define MAYBE_CancelSnapPhantom CancelSnapPhantom
-#endif
+TEST_F(WorkspaceWindowResizerTest, CancelSnapPhantom) {
+ if (!SupportsMultipleDisplays())
+ return;
-TEST_F(WorkspaceWindowResizerTest, MAYBE_CancelSnapPhantom) {
UpdateDisplay("800x600,800x600");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
ASSERT_EQ(2U, root_windows.size());
@@ -637,17 +630,11 @@ TEST_F(WorkspaceWindowResizerTest, DontDragOffBottom) {
window_->bounds().ToString());
}
-#if defined(OS_WIN)
-// Multiple displays are not supported on Windows Ash. http://crbug.com/165962
-#define MAYBE_DontDragOffBottomWithMultiDisplay \
- DISABLED_DontDragOffBottomWithMultiDisplay
-#else
-#define MAYBE_DontDragOffBottomWithMultiDisplay \
- DontDragOffBottomWithMultiDisplay
-#endif
-
// Makes sure we don't allow dragging on the work area with multidisplay.
-TEST_F(WorkspaceWindowResizerTest, MAYBE_DontDragOffBottomWithMultiDisplay) {
+TEST_F(WorkspaceWindowResizerTest, DontDragOffBottomWithMultiDisplay) {
+ if (!SupportsMultipleDisplays())
+ return;
+
UpdateDisplay("800x600,800x600");
ASSERT_EQ(2, Shell::GetScreen()->GetNumDisplays());
@@ -769,19 +756,9 @@ TEST_F(WorkspaceWindowResizerTest, ResizeWindowOutsideBottomWorkArea) {
window_->bounds().ToString());
}
-#if defined(OS_WIN)
-// Multiple displays are not supported on Windows Ash. http://crbug.com/165962
-#define MAYBE_DragWindowOutsideRightToSecondaryDisplay \
- DISABLED_DragWindowOutsideRightToSecondaryDisplay
-#else
-#define MAYBE_DragWindowOutsideRightToSecondaryDisplay \
- DragWindowOutsideRightToSecondaryDisplay
-#endif
-
// Verifies that 'outside' check of the resizer take into account the extended
// desktop in case of repositions.
-TEST_F(WorkspaceWindowResizerTest,
- MAYBE_DragWindowOutsideRightToSecondaryDisplay) {
+TEST_F(WorkspaceWindowResizerTest, DragWindowOutsideRightToSecondaryDisplay) {
// Only primary display. Changes the window position to fit within the
// display.
Shell::GetInstance()->SetDisplayWorkAreaInsets(
@@ -802,6 +779,9 @@ TEST_F(WorkspaceWindowResizerTest,
base::IntToString(window_width) +
"x380", window_->bounds().ToString());
+ if (!SupportsMultipleDisplays())
+ return;
+
// With secondary display. Operation itself is same but doesn't change
// the position because the window is still within the secondary display.
UpdateDisplay("1000x600,600x400");