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

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

Issue 1755513002: Fix ifdefs around INSTANTIATE_TEST_CASE_P in tab_drag_controller_interactive_uitest.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nested #if chromeos Created 4 years, 9 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 // Should be two windows and not dragging. 1500 // Should be two windows and not dragging.
1501 ASSERT_FALSE(TabDragController::IsActive()); 1501 ASSERT_FALSE(TabDragController::IsActive());
1502 ASSERT_EQ(2u, browser_list->size()); 1502 ASSERT_EQ(2u, browser_list->size());
1503 for (auto* browser : *BrowserList::GetInstance()) { 1503 for (auto* browser : *BrowserList::GetInstance()) {
1504 EXPECT_FALSE(GetIsDragged(browser)); 1504 EXPECT_FALSE(GetIsDragged(browser));
1505 // Should not be maximized 1505 // Should not be maximized
1506 EXPECT_FALSE(browser->window()->IsMaximized()); 1506 EXPECT_FALSE(browser->window()->IsMaximized());
1507 } 1507 }
1508 } 1508 }
1509 1509
1510 #if defined(OS_CHROMEOS) 1510 #if defined(OS_CHROMEOS)
tapted 2016/03/01 08:28:52 (balanced on line 2341)
1511 // TODO(sky,sad): A number of tests below are disabled as they fail due to 1511 // TODO(sky,sad): A number of tests below are disabled as they fail due to
1512 // resize locks with a real compositor. crbug.com/331924 1512 // resize locks with a real compositor. crbug.com/331924
1513 namespace { 1513 namespace {
1514 1514
1515 void DragInMaximizedWindowStep2(DetachToBrowserTabDragControllerTest* test, 1515 void DragInMaximizedWindowStep2(DetachToBrowserTabDragControllerTest* test,
1516 Browser* browser, 1516 Browser* browser,
1517 TabStrip* tab_strip, 1517 TabStrip* tab_strip,
1518 const BrowserList* browser_list) { 1518 const BrowserList* browser_list) {
1519 // There should be another browser. 1519 // There should be another browser.
1520 ASSERT_EQ(2u, browser_list->size()); 1520 ASSERT_EQ(2u, browser_list->size());
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
2248 // The drag should have been reverted. 2248 // The drag should have been reverted.
2249 ASSERT_EQ(1u, browser_list->size()); 2249 ASSERT_EQ(1u, browser_list->size());
2250 ASSERT_FALSE(tab_strip->IsDragSessionActive()); 2250 ASSERT_FALSE(tab_strip->IsDragSessionActive());
2251 ASSERT_FALSE(TabDragController::IsActive()); 2251 ASSERT_FALSE(TabDragController::IsActive());
2252 EXPECT_EQ("0 1", IDString(browser()->tab_strip_model())); 2252 EXPECT_EQ("0 1", IDString(browser()->tab_strip_model()));
2253 2253
2254 ASSERT_TRUE(ReleaseInput()); 2254 ASSERT_TRUE(ReleaseInput());
2255 ASSERT_TRUE(ReleaseInput2()); 2255 ASSERT_TRUE(ReleaseInput2());
2256 } 2256 }
2257 2257
2258 #if defined(OS_CHROMEOS)
2259
2260 namespace { 2258 namespace {
2261 2259
2262 void DetachToDockedWindowNextStep( 2260 void DetachToDockedWindowNextStep(
2263 DetachToBrowserTabDragControllerTest* test, 2261 DetachToBrowserTabDragControllerTest* test,
2264 const gfx::Point& target_point, 2262 const gfx::Point& target_point,
2265 int iteration) { 2263 int iteration) {
2266 ASSERT_EQ(2u, test->browser_list->size()); 2264 ASSERT_EQ(2u, test->browser_list->size());
2267 Browser* new_browser = test->browser_list->get(1); 2265 Browser* new_browser = test->browser_list->get(1);
2268 ASSERT_TRUE(new_browser->window()->IsActive()); 2266 ASSERT_TRUE(new_browser->window()->IsActive());
2269 2267
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
2333 2331
2334 ash::wm::WindowState* window_state = 2332 ash::wm::WindowState* window_state =
2335 ash::wm::GetWindowState(new_browser->window()->GetNativeWindow()); 2333 ash::wm::GetWindowState(new_browser->window()->GetNativeWindow());
2336 // The new window should not be maximized because it gets docked or snapped. 2334 // The new window should not be maximized because it gets docked or snapped.
2337 EXPECT_FALSE(new_browser->window()->IsMaximized()); 2335 EXPECT_FALSE(new_browser->window()->IsMaximized());
2338 // The new window should be docked and not snapped. 2336 // The new window should be docked and not snapped.
2339 EXPECT_TRUE(window_state->IsDocked()); 2337 EXPECT_TRUE(window_state->IsDocked());
2340 EXPECT_FALSE(window_state->IsSnapped()); 2338 EXPECT_FALSE(window_state->IsSnapped());
2341 } 2339 }
2342 2340
2343 #endif // OS_CHROMEOS 2341 #endif // OS_CHROMEOS
tapted 2016/03/01 08:28:52 This actually balances the #if defined(OS_CHROMEOS
msw 2016/03/01 18:08:32 Acknowledged.
2344 2342
2345 #endif 2343 #if defined(USE_ASH)
2346
2347 #if defined(USE_ASH) && defined(OS_CHROMEOS) // TODO(win_ash,linux_ash)
msw 2016/03/01 18:08:32 You CL desc says "#if ash && !chromeos", but this
tapted 2016/03/01 23:06:45 oops - fixed. (I probably had it right the first t
2348 INSTANTIATE_TEST_CASE_P(TabDragging, 2344 INSTANTIATE_TEST_CASE_P(TabDragging,
msw 2016/03/01 18:08:32 Did you try any of these with just USE_AURA? (it's
tapted 2016/03/01 23:06:45 Yeah.. so like you say this file is in a sorry sta
2349 DetachToBrowserInSeparateDisplayTabDragControllerTest, 2345 DetachToBrowserInSeparateDisplayTabDragControllerTest,
2350 ::testing::Values("mouse", "touch")); 2346 ::testing::Values("mouse", "touch"));
2351 INSTANTIATE_TEST_CASE_P(TabDragging, 2347 INSTANTIATE_TEST_CASE_P(TabDragging,
2352 DifferentDeviceScaleFactorDisplayTabDragControllerTest, 2348 DifferentDeviceScaleFactorDisplayTabDragControllerTest,
2353 ::testing::Values("mouse")); 2349 ::testing::Values("mouse"));
2354 INSTANTIATE_TEST_CASE_P(TabDragging, 2350 INSTANTIATE_TEST_CASE_P(TabDragging,
2355 DetachToBrowserTabDragControllerTest, 2351 DetachToBrowserTabDragControllerTest,
2356 ::testing::Values("mouse", "touch")); 2352 ::testing::Values("mouse", "touch"));
2357 INSTANTIATE_TEST_CASE_P(TabDragging, 2353 INSTANTIATE_TEST_CASE_P(TabDragging,
2358 DetachToBrowserTabDragControllerTestTouch, 2354 DetachToBrowserTabDragControllerTestTouch,
2359 ::testing::Values("touch")); 2355 ::testing::Values("touch"));
2360 #elif defined(USE_ASH) 2356 #else
2361 INSTANTIATE_TEST_CASE_P(TabDragging, 2357 INSTANTIATE_TEST_CASE_P(TabDragging,
2362 DetachToBrowserTabDragControllerTest, 2358 DetachToBrowserTabDragControllerTest,
2363 ::testing::Values("mouse")); 2359 ::testing::Values("mouse"));
2364 #endif 2360 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698