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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc

Issue 572593002: Revert of Clean up GestureEventDetails constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.h" 5 #include "chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/wm/window_state.h" 9 #include "ash/wm/window_state.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 TabStrip* tab_strip = GetTabStripForBrowser(browser()); 328 TabStrip* tab_strip = GetTabStripForBrowser(browser());
329 329
330 Tab* tab1 = tab_strip->tab_at(1); 330 Tab* tab1 = tab_strip->tab_at(1);
331 gfx::Point tab_1_center(tab1->width() / 2, tab1->height() / 2); 331 gfx::Point tab_1_center(tab1->width() / 2, tab1->height() / 2);
332 332
333 ui::GestureEvent gesture_tap_down( 333 ui::GestureEvent gesture_tap_down(
334 tab_1_center.x(), 334 tab_1_center.x(),
335 tab_1_center.x(), 335 tab_1_center.x(),
336 0, 336 0,
337 base::TimeDelta(), 337 base::TimeDelta(),
338 ui::GestureEventDetails(ui::ET_GESTURE_TAP_DOWN)); 338 ui::GestureEventDetails(ui::ET_GESTURE_TAP_DOWN, 0.0f, 0.0f));
339 tab_strip->MaybeStartDrag(tab1, gesture_tap_down, 339 tab_strip->MaybeStartDrag(tab1, gesture_tap_down,
340 tab_strip->GetSelectionModel()); 340 tab_strip->GetSelectionModel());
341 EXPECT_TRUE(TabDragController::IsActive()); 341 EXPECT_TRUE(TabDragController::IsActive());
342 342
343 ui::GestureEvent gesture_end(tab_1_center.x(), 343 ui::GestureEvent gesture_end(
344 tab_1_center.x(), 344 tab_1_center.x(),
345 0, 345 tab_1_center.x(),
346 base::TimeDelta(), 346 0,
347 ui::GestureEventDetails(ui::ET_GESTURE_END)); 347 base::TimeDelta(),
348 ui::GestureEventDetails(ui::ET_GESTURE_END, 0.0f, 0.0f));
348 tab_strip->OnGestureEvent(&gesture_end); 349 tab_strip->OnGestureEvent(&gesture_end);
349 EXPECT_FALSE(TabDragController::IsActive()); 350 EXPECT_FALSE(TabDragController::IsActive());
350 EXPECT_FALSE(tab_strip->IsDragSessionActive()); 351 EXPECT_FALSE(tab_strip->IsDragSessionActive());
351 } 352 }
352 353
353 #endif 354 #endif
354 355
355 class DetachToBrowserTabDragControllerTest 356 class DetachToBrowserTabDragControllerTest
356 : public TabDragControllerTest, 357 : public TabDragControllerTest,
357 public ::testing::WithParamInterface<const char*> { 358 public ::testing::WithParamInterface<const char*> {
(...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after
2210 DetachToBrowserTabDragControllerTest, 2211 DetachToBrowserTabDragControllerTest,
2211 ::testing::Values("mouse", "touch")); 2212 ::testing::Values("mouse", "touch"));
2212 INSTANTIATE_TEST_CASE_P(TabDragging, 2213 INSTANTIATE_TEST_CASE_P(TabDragging,
2213 DetachToBrowserTabDragControllerTestTouch, 2214 DetachToBrowserTabDragControllerTestTouch,
2214 ::testing::Values("touch")); 2215 ::testing::Values("touch"));
2215 #elif defined(USE_ASH) 2216 #elif defined(USE_ASH)
2216 INSTANTIATE_TEST_CASE_P(TabDragging, 2217 INSTANTIATE_TEST_CASE_P(TabDragging,
2217 DetachToBrowserTabDragControllerTest, 2218 DetachToBrowserTabDragControllerTest,
2218 ::testing::Values("mouse")); 2219 ::testing::Values("mouse"));
2219 #endif 2220 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698