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

Side by Side Diff: ash/frame/caption_buttons/frame_size_button_unittest.cc

Issue 630003003: Change GestureConfiguration types to be consistent with each other and with the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Really fix compile Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | ash/wm/gestures/long_press_affordance_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/frame/caption_buttons/frame_size_button.h" 5 #include "ash/frame/caption_buttons/frame_size_button.h"
6 6
7 #include "ash/frame/caption_buttons/frame_caption_button.h" 7 #include "ash/frame/caption_buttons/frame_caption_button.h"
8 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" 8 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/test/ash_test_base.h" 10 #include "ash/test/ash_test_base.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 // Snap left. 239 // Snap left.
240 generator.GestureScrollSequence( 240 generator.GestureScrollSequence(
241 CenterPointInScreen(size_button()), 241 CenterPointInScreen(size_button()),
242 CenterPointInScreen(minimize_button()), 242 CenterPointInScreen(minimize_button()),
243 base::TimeDelta::FromMilliseconds(100), 243 base::TimeDelta::FromMilliseconds(100),
244 3); 244 3);
245 RunAllPendingInMessageLoop(); 245 RunAllPendingInMessageLoop();
246 EXPECT_TRUE(HasStateType(wm::WINDOW_STATE_TYPE_LEFT_SNAPPED)); 246 EXPECT_TRUE(HasStateType(wm::WINDOW_STATE_TYPE_LEFT_SNAPPED));
247 247
248 // 3) Test with tap gestures. 248 // 3) Test with tap gestures.
249 const int touch_default_radius = 249 const float touch_default_radius =
250 ui::GestureConfiguration::default_radius(); 250 ui::GestureConfiguration::default_radius();
251 ui::GestureConfiguration::set_default_radius(0); 251 ui::GestureConfiguration::set_default_radius(0);
252 // Snap right. 252 // Snap right.
253 generator.MoveMouseTo(CenterPointInScreen(size_button())); 253 generator.MoveMouseTo(CenterPointInScreen(size_button()));
254 generator.PressMoveAndReleaseTouchTo(CenterPointInScreen(close_button())); 254 generator.PressMoveAndReleaseTouchTo(CenterPointInScreen(close_button()));
255 RunAllPendingInMessageLoop(); 255 RunAllPendingInMessageLoop();
256 EXPECT_TRUE(HasStateType(wm::WINDOW_STATE_TYPE_RIGHT_SNAPPED)); 256 EXPECT_TRUE(HasStateType(wm::WINDOW_STATE_TYPE_RIGHT_SNAPPED));
257 // Snap left. 257 // Snap left.
258 generator.MoveMouseTo(CenterPointInScreen(size_button())); 258 generator.MoveMouseTo(CenterPointInScreen(size_button()));
259 generator.PressMoveAndReleaseTouchTo(CenterPointInScreen(minimize_button())); 259 generator.PressMoveAndReleaseTouchTo(CenterPointInScreen(minimize_button()));
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 466
467 // None of the buttons should stay pressed and the buttons should have their 467 // None of the buttons should stay pressed and the buttons should have their
468 // regular icons. 468 // regular icons.
469 EXPECT_TRUE(AllButtonsInNormalState()); 469 EXPECT_TRUE(AllButtonsInNormalState());
470 EXPECT_EQ(CAPTION_BUTTON_ICON_MINIMIZE, minimize_button()->icon()); 470 EXPECT_EQ(CAPTION_BUTTON_ICON_MINIMIZE, minimize_button()->icon());
471 EXPECT_EQ(CAPTION_BUTTON_ICON_CLOSE, close_button()->icon()); 471 EXPECT_EQ(CAPTION_BUTTON_ICON_CLOSE, close_button()->icon());
472 } 472 }
473 473
474 } // namespace test 474 } // namespace test
475 } // namespace ash 475 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/gestures/long_press_affordance_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698