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

Unified Diff: ash/wm/system_gesture_event_filter_unittest.cc

Issue 296283003: Re-Reland Linux Window Control Alignment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Build Error Created 6 years, 7 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/extended_desktop_unittest.cc ('k') | ui/views/linux_ui/window_button_order_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/system_gesture_event_filter_unittest.cc
diff --git a/ash/wm/system_gesture_event_filter_unittest.cc b/ash/wm/system_gesture_event_filter_unittest.cc
index 072a714b887434f1240c1b5f96f4b3198bd71e2f..ee2a20f7377ac480cf5cbd174a6345d5e08feb94 100644
--- a/ash/wm/system_gesture_event_filter_unittest.cc
+++ b/ash/wm/system_gesture_event_filter_unittest.cc
@@ -4,6 +4,8 @@
#include "ash/wm/system_gesture_event_filter.h"
+#include <vector>
+
#include "ash/accelerators/accelerator_controller.h"
#include "ash/ash_switches.h"
#include "ash/display/display_manager.h"
@@ -38,6 +40,7 @@
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_delegate.h"
#include "ui/views/window/non_client_view.h"
+#include "ui/views/window/window_button_order_provider.h"
namespace ash {
namespace test {
@@ -138,6 +141,20 @@ class SystemGestureEventFilterTest
// Overridden from AshTestBase:
virtual void SetUp() OVERRIDE {
+ // TODO(jonross): TwoFingerDragDelayed() and ThreeFingerGestureStopsDrag()
+ // both use hardcoded touch points, assuming that they target empty header
+ // space. Window control order now reflects configuration files and can
+ // change. The tests should be improved to dynamically decide touch points.
+ // To address this we specify the originally expected window control
+ // positions to be consistent across tests.
+ std::vector<views::FrameButton> leading;
+ std::vector<views::FrameButton> trailing;
+ trailing.push_back(views::FRAME_BUTTON_MINIMIZE);
+ trailing.push_back(views::FRAME_BUTTON_MAXIMIZE);
+ trailing.push_back(views::FRAME_BUTTON_CLOSE);
+ views::WindowButtonOrderProvider::GetInstance()->
+ SetWindowButtonOrder(leading, trailing);
+
if (!docked_enabled_) {
CommandLine::ForCurrentProcess()->AppendSwitch(
ash::switches::kAshDisableDockedWindows);
@@ -437,7 +454,7 @@ TEST_P(SystemGestureEventFilterTest,
}
TEST_P(SystemGestureEventFilterTest, TwoFingerDragDelayed) {
- gfx::Rect bounds(0, 0, 100, 100);
+ gfx::Rect bounds(0, 0, 200, 100);
aura::Window* root_window = Shell::GetPrimaryRootWindow();
views::Widget* toplevel = views::Widget::CreateWindowWithContextAndBounds(
new ResizableWidgetDelegate, root_window, bounds);
@@ -472,7 +489,7 @@ TEST_P(SystemGestureEventFilterTest, TwoFingerDragDelayed) {
}
TEST_P(SystemGestureEventFilterTest, ThreeFingerGestureStopsDrag) {
- gfx::Rect bounds(0, 0, 100, 100);
+ gfx::Rect bounds(0, 0, 200, 100);
aura::Window* root_window = Shell::GetPrimaryRootWindow();
views::Widget* toplevel = views::Widget::CreateWindowWithContextAndBounds(
new ResizableWidgetDelegate, root_window, bounds);
« no previous file with comments | « ash/extended_desktop_unittest.cc ('k') | ui/views/linux_ui/window_button_order_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698