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

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

Issue 1975533002: Change ui::Event::time_stamp from TimeDelta to TimeTicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 340
341 IN_PROC_BROWSER_TEST_F(TabDragControllerTest, GestureEndShouldEndDragTest) { 341 IN_PROC_BROWSER_TEST_F(TabDragControllerTest, GestureEndShouldEndDragTest) {
342 AddTabAndResetBrowser(browser()); 342 AddTabAndResetBrowser(browser());
343 343
344 TabStrip* tab_strip = GetTabStripForBrowser(browser()); 344 TabStrip* tab_strip = GetTabStripForBrowser(browser());
345 345
346 Tab* tab1 = tab_strip->tab_at(1); 346 Tab* tab1 = tab_strip->tab_at(1);
347 gfx::Point tab_1_center(tab1->width() / 2, tab1->height() / 2); 347 gfx::Point tab_1_center(tab1->width() / 2, tab1->height() / 2);
348 348
349 ui::GestureEvent gesture_tap_down( 349 ui::GestureEvent gesture_tap_down(
350 tab_1_center.x(), 350 tab_1_center.x(), tab_1_center.x(), 0, base::TimeTicks(),
351 tab_1_center.x(),
352 0,
353 base::TimeDelta(),
354 ui::GestureEventDetails(ui::ET_GESTURE_TAP_DOWN)); 351 ui::GestureEventDetails(ui::ET_GESTURE_TAP_DOWN));
355 tab_strip->MaybeStartDrag(tab1, gesture_tap_down, 352 tab_strip->MaybeStartDrag(tab1, gesture_tap_down,
356 tab_strip->GetSelectionModel()); 353 tab_strip->GetSelectionModel());
357 EXPECT_TRUE(TabDragController::IsActive()); 354 EXPECT_TRUE(TabDragController::IsActive());
358 355
359 ui::GestureEvent gesture_end(tab_1_center.x(), 356 ui::GestureEvent gesture_end(tab_1_center.x(), tab_1_center.x(), 0,
360 tab_1_center.x(), 357 base::TimeTicks(),
361 0,
362 base::TimeDelta(),
363 ui::GestureEventDetails(ui::ET_GESTURE_END)); 358 ui::GestureEventDetails(ui::ET_GESTURE_END));
364 tab_strip->OnGestureEvent(&gesture_end); 359 tab_strip->OnGestureEvent(&gesture_end);
365 EXPECT_FALSE(TabDragController::IsActive()); 360 EXPECT_FALSE(TabDragController::IsActive());
366 EXPECT_FALSE(tab_strip->IsDragSessionActive()); 361 EXPECT_FALSE(tab_strip->IsDragSessionActive());
367 } 362 }
368 363
369 #endif 364 #endif
370 365
371 class DetachToBrowserTabDragControllerTest 366 class DetachToBrowserTabDragControllerTest
372 : public TabDragControllerTest, 367 : public TabDragControllerTest,
(...skipping 2104 matching lines...) Expand 10 before | Expand all | Expand 10 after
2477 DetachToBrowserTabDragControllerTest, 2472 DetachToBrowserTabDragControllerTest,
2478 ::testing::Values("mouse", "touch")); 2473 ::testing::Values("mouse", "touch"));
2479 INSTANTIATE_TEST_CASE_P(TabDragging, 2474 INSTANTIATE_TEST_CASE_P(TabDragging,
2480 DetachToBrowserTabDragControllerTestTouch, 2475 DetachToBrowserTabDragControllerTestTouch,
2481 ::testing::Values("touch")); 2476 ::testing::Values("touch"));
2482 #else 2477 #else
2483 INSTANTIATE_TEST_CASE_P(TabDragging, 2478 INSTANTIATE_TEST_CASE_P(TabDragging,
2484 DetachToBrowserTabDragControllerTest, 2479 DetachToBrowserTabDragControllerTest,
2485 ::testing::Values("mouse")); 2480 ::testing::Values("mouse"));
2486 #endif 2481 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698