| OLD | NEW |
| 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 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1852 // The expected device scale factors before the cursor is moved to the | 1852 // The expected device scale factors before the cursor is moved to the |
| 1853 // corresponding kDragPoints in CursorDeviceScaleFactorStep. | 1853 // corresponding kDragPoints in CursorDeviceScaleFactorStep. |
| 1854 const float kDeviceScaleFactorExpectations[] = { | 1854 const float kDeviceScaleFactorExpectations[] = { |
| 1855 1.0f, | 1855 1.0f, |
| 1856 1.0f, | 1856 1.0f, |
| 1857 2.0f, | 1857 2.0f, |
| 1858 2.0f, | 1858 2.0f, |
| 1859 1.0f, | 1859 1.0f, |
| 1860 }; | 1860 }; |
| 1861 | 1861 |
| 1862 COMPILE_ASSERT( | 1862 static_assert( |
| 1863 arraysize(kDragPoints) == arraysize(kDeviceScaleFactorExpectations), | 1863 arraysize(kDragPoints) == arraysize(kDeviceScaleFactorExpectations), |
| 1864 kDragPoints_and_kDeviceScaleFactorExpectations_must_have_same_size); | 1864 "kDragPoints and kDeviceScaleFactorExpectations must have the same " |
| 1865 "number of elements"); |
| 1865 | 1866 |
| 1866 // Drags tab to |kDragPoints[index]|, then calls the next step function. | 1867 // Drags tab to |kDragPoints[index]|, then calls the next step function. |
| 1867 void CursorDeviceScaleFactorStep( | 1868 void CursorDeviceScaleFactorStep( |
| 1868 DifferentDeviceScaleFactorDisplayTabDragControllerTest* test, | 1869 DifferentDeviceScaleFactorDisplayTabDragControllerTest* test, |
| 1869 TabStrip* not_attached_tab_strip, | 1870 TabStrip* not_attached_tab_strip, |
| 1870 size_t index) { | 1871 size_t index) { |
| 1871 ASSERT_FALSE(not_attached_tab_strip->IsDragSessionActive()); | 1872 ASSERT_FALSE(not_attached_tab_strip->IsDragSessionActive()); |
| 1872 ASSERT_TRUE(TabDragController::IsActive()); | 1873 ASSERT_TRUE(TabDragController::IsActive()); |
| 1873 | 1874 |
| 1874 if (index < arraysize(kDragPoints)) { | 1875 if (index < arraysize(kDragPoints)) { |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2208 DetachToBrowserTabDragControllerTest, | 2209 DetachToBrowserTabDragControllerTest, |
| 2209 ::testing::Values("mouse", "touch")); | 2210 ::testing::Values("mouse", "touch")); |
| 2210 INSTANTIATE_TEST_CASE_P(TabDragging, | 2211 INSTANTIATE_TEST_CASE_P(TabDragging, |
| 2211 DetachToBrowserTabDragControllerTestTouch, | 2212 DetachToBrowserTabDragControllerTestTouch, |
| 2212 ::testing::Values("touch")); | 2213 ::testing::Values("touch")); |
| 2213 #elif defined(USE_ASH) | 2214 #elif defined(USE_ASH) |
| 2214 INSTANTIATE_TEST_CASE_P(TabDragging, | 2215 INSTANTIATE_TEST_CASE_P(TabDragging, |
| 2215 DetachToBrowserTabDragControllerTest, | 2216 DetachToBrowserTabDragControllerTest, |
| 2216 ::testing::Values("mouse")); | 2217 ::testing::Values("mouse")); |
| 2217 #endif | 2218 #endif |
| OLD | NEW |