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

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

Issue 815363002: replace COMPILE_ASSERT with static_assert in chrome/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 5 years, 12 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 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698