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

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

Issue 2739703003: Last sets of tests that can move to common_unittests (Closed)
Patch Set: comments Created 3 years, 9 months 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/wm/window_util_unittest.cc ('k') | ash/wm/workspace/workspace_window_resizer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_event_handler_unittest.cc
diff --git a/ash/wm/workspace/workspace_event_handler_unittest.cc b/ash/wm/workspace/workspace_event_handler_unittest.cc
index 249c9c3c76cf625cd81c0113fe0593a53a760444..b785495268772696154ac2f9941a151cb634ada4 100644
--- a/ash/wm/workspace/workspace_event_handler_unittest.cc
+++ b/ash/wm/workspace/workspace_event_handler_unittest.cc
@@ -7,6 +7,7 @@
#include "ash/common/wm/window_state.h"
#include "ash/common/wm/wm_event.h"
#include "ash/common/wm/workspace_controller.h"
+#include "ash/common/wm_shell.h"
#include "ash/screen_util.h"
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
@@ -20,7 +21,6 @@
#include "ui/aura/window.h"
#include "ui/aura/window_tree_host.h"
#include "ui/base/hit_test.h"
-#include "ui/display/manager/display_manager.h"
#include "ui/display/screen.h"
#include "ui/events/event_processor.h"
#include "ui/events/event_utils.h"
@@ -96,6 +96,10 @@ class WindowPropertyObserver : public aura::WindowObserver {
};
TEST_F(WorkspaceEventHandlerTest, DoubleClickSingleAxisResizeEdge) {
+ // TODO: investigate failure. http://crbug.com/699175.
+ if (WmShell::Get()->IsRunningInMash())
+ return;
+
// Double clicking the vertical resize edge of a window should maximize it
// vertically.
gfx::Rect restored_bounds(10, 10, 50, 50);
@@ -158,10 +162,9 @@ TEST_F(WorkspaceEventHandlerTest, DoubleClickSingleAxisResizeEdge) {
// Verify the double clicking the resize edge works on 2nd display too.
UpdateDisplay("200x200,400x300");
- gfx::Rect work_area2 = display_manager()->GetSecondaryDisplay().work_area();
+ gfx::Rect work_area2 = GetSecondaryDisplay().work_area();
restored_bounds.SetRect(220, 20, 50, 50);
- window->SetBoundsInScreen(restored_bounds,
- display_manager()->GetSecondaryDisplay());
+ window->SetBoundsInScreen(restored_bounds, GetSecondaryDisplay());
aura::Window* second_root = Shell::GetAllRootWindows()[1];
EXPECT_EQ(second_root, window->GetRootWindow());
ui::test::EventGenerator generator2(second_root, window.get());
@@ -203,6 +206,10 @@ TEST_F(WorkspaceEventHandlerTest, DoubleClickSingleAxisResizeEdge) {
// Tests the behavior when double clicking the border of a side snapped window.
TEST_F(WorkspaceEventHandlerTest, DoubleClickSingleAxisWhenSideSnapped) {
+ // TODO: investigate failure. http://crbug.com/699175.
+ if (WmShell::Get()->IsRunningInMash())
+ return;
+
gfx::Rect restored_bounds(10, 10, 50, 50);
aura::test::TestWindowDelegate delegate;
std::unique_ptr<aura::Window> window(
@@ -318,6 +325,10 @@ TEST_F(WorkspaceEventHandlerTest,
// Test the behavior as a result of double clicking the window header.
TEST_F(WorkspaceEventHandlerTest, DoubleClickCaptionTogglesMaximize) {
+ // TODO: investigate failure. http://crbug.com/699175.
+ if (WmShell::Get()->IsRunningInMash())
+ return;
+
aura::test::TestWindowDelegate delegate;
std::unique_ptr<aura::Window> window(
CreateTestWindow(&delegate, gfx::Rect(1, 2, 30, 40)));
@@ -397,6 +408,10 @@ TEST_F(WorkspaceEventHandlerTest,
}
TEST_F(WorkspaceEventHandlerTest, DoubleTapCaptionTogglesMaximize) {
+ // TODO: investigate failure. http://crbug.com/699175.
+ if (WmShell::Get()->IsRunningInMash())
+ return;
+
aura::test::TestWindowDelegate delegate;
gfx::Rect bounds(10, 20, 30, 40);
std::unique_ptr<aura::Window> window(CreateTestWindow(&delegate, bounds));
« no previous file with comments | « ash/wm/window_util_unittest.cc ('k') | ash/wm/workspace/workspace_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698