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

Unified Diff: ash/wm/workspace/workspace_window_resizer_unittest.cc

Issue 11419271: Revert "Use WS_POPUP for ash_unittests" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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
« no previous file with comments | « ash/test/display_manager_test_api.cc ('k') | ui/aura/root_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_window_resizer_unittest.cc
diff --git a/ash/wm/workspace/workspace_window_resizer_unittest.cc b/ash/wm/workspace/workspace_window_resizer_unittest.cc
index b7c8eb04c5699344b9f3a1ad1918ffc64bf7743a..a9de50316efc067421e236ea4ce97a82d04c0d70 100644
--- a/ash/wm/workspace/workspace_window_resizer_unittest.cc
+++ b/ash/wm/workspace/workspace_window_resizer_unittest.cc
@@ -163,6 +163,25 @@ class WorkspaceWindowResizerTest : public test::AshTestBase {
} // namespace
+// Fails on win_aura since ash::GetRootWindowRelativeToWindow is not implemented
+// yet for the platform.
+#if defined(OS_WIN)
+#define MAYBE_WindowDragWithMultiDisplays \
+ DISABLED_WindowDragWithMultiDisplays
+#define MAYBE_WindowDragWithMultiDisplaysRightToLeft \
+ DISABLED_WindowDragWithMultiDisplaysRightToLeft
+#define MAYBE_PhantomStyle DISABLED_PhantomStyle
+#define MAYBE_CancelSnapPhantom DISABLED_CancelSnapPhantom
+#define MAYBE_CursorDeviceScaleFactor DISABLED_CursorDeviceScaleFactor
+#else
+#define MAYBE_WindowDragWithMultiDisplays WindowDragWithMultiDisplays
+#define MAYBE_WindowDragWithMultiDisplaysRightToLeft \
+ WindowDragWithMultiDisplaysRightToLeft
+#define MAYBE_PhantomStyle PhantomStyle
+#define MAYBE_CancelSnapPhantom CancelSnapPhantom
+#define MAYBE_CursorDeviceScaleFactor CursorDeviceScaleFactor
+#endif
+
// Assertions around attached window resize dragging from the right with 2
// windows.
TEST_F(WorkspaceWindowResizerTest, AttachedResize_RIGHT_2) {
@@ -371,7 +390,15 @@ TEST_F(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_2) {
// Assertions around attached window resize dragging from the bottom with 3
// windows.
-TEST_F(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_3) {
+// TODO(oshima): Host window doesn't get a resize event after
+// SetHostSize on Windows trybot, which gives wrong work/display area.
+// crbug.com/141577.
+#if defined(OS_WIN)
+#define MAYBE_AttachedResize_BOTTOM_3 DISABLED_AttachedResize_BOTTOM_3
+#else
+#define MAYBE_AttachedResize_BOTTOM_3 AttachedResize_BOTTOM_3
+#endif
+TEST_F(WorkspaceWindowResizerTest, MAYBE_AttachedResize_BOTTOM_3) {
aura::RootWindow* root = Shell::GetPrimaryRootWindow();
root->SetHostSize(gfx::Size(600, 800));
@@ -479,6 +506,7 @@ TEST_F(WorkspaceWindowResizerTest, Edge) {
GetRestoreBoundsInScreen(window_.get())->ToString());
}
+#if !defined(OS_WIN)
// Test if the restore bounds is correct in multiple displays.
ClearRestoreBounds(window_.get());
UpdateDisplay("800x600,200x600");
@@ -505,6 +533,7 @@ TEST_F(WorkspaceWindowResizerTest, Edge) {
EXPECT_EQ("800,10 50x60",
GetRestoreBoundsInScreen(window_.get())->ToString());
}
+#endif
}
// Check that non resizable windows will not get resized.
@@ -521,7 +550,7 @@ TEST_F(WorkspaceWindowResizerTest, NonResizableWindows) {
}
// Verifies a window can be moved from the primary display to another.
-TEST_F(WorkspaceWindowResizerTest, WindowDragWithMultiDisplays) {
+TEST_F(WorkspaceWindowResizerTest, MAYBE_WindowDragWithMultiDisplays) {
// 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");
@@ -584,7 +613,7 @@ TEST_F(WorkspaceWindowResizerTest, WindowDragWithMultiDisplays) {
// Verifies a window can be moved from the secondary display to primary.
TEST_F(WorkspaceWindowResizerTest,
- WindowDragWithMultiDisplaysRightToLeft) {
+ MAYBE_WindowDragWithMultiDisplaysRightToLeft) {
UpdateDisplay("800x600,800x600");
shelf_layout_manager()->LayoutShelf();
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
@@ -608,7 +637,7 @@ TEST_F(WorkspaceWindowResizerTest,
}
// Verifies the style of the drag phantom window is correct.
-TEST_F(WorkspaceWindowResizerTest, PhantomStyle) {
+TEST_F(WorkspaceWindowResizerTest, MAYBE_PhantomStyle) {
UpdateDisplay("800x600,800x600");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
ASSERT_EQ(2U, root_windows.size());
@@ -683,7 +712,7 @@ TEST_F(WorkspaceWindowResizerTest, PhantomStyle) {
}
// Verifies the style of the drag phantom window is correct.
-TEST_F(WorkspaceWindowResizerTest, CancelSnapPhantom) {
+TEST_F(WorkspaceWindowResizerTest, MAYBE_CancelSnapPhantom) {
UpdateDisplay("800x600,800x600");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
ASSERT_EQ(2U, root_windows.size());
@@ -1371,7 +1400,7 @@ TEST_F(WorkspaceWindowResizerTest, MagneticallyResize_LEFT) {
// 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(WorkspaceWindowResizerTest, CursorDeviceScaleFactor) {
+TEST_F(WorkspaceWindowResizerTest, MAYBE_CursorDeviceScaleFactor) {
// 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");
« no previous file with comments | « ash/test/display_manager_test_api.cc ('k') | ui/aura/root_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698