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

Side by Side Diff: ash/wm/panels/panel_window_resizer_unittest.cc

Issue 1849623002: Remove unused ash::SHELF_ALIGNMENT_TOP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 | « ash/wm/panels/panel_window_resizer.cc ('k') | ash/wm/window_animations.cc » ('j') | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ash/wm/panels/panel_window_resizer.h" 5 #include "ash/wm/panels/panel_window_resizer.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shelf/shelf.h" 8 #include "ash/shelf/shelf.h"
9 #include "ash/shelf/shelf_layout_manager.h" 9 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shelf/shelf_model.h" 10 #include "ash/shelf/shelf_model.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 return; 251 return;
252 252
253 ash::Shell* shell = ash::Shell::GetInstance(); 253 ash::Shell* shell = ash::Shell::GetInstance();
254 shell->SetShelfAlignment(SHELF_ALIGNMENT_RIGHT, 254 shell->SetShelfAlignment(SHELF_ALIGNMENT_RIGHT,
255 shell->GetPrimaryRootWindow()); 255 shell->GetPrimaryRootWindow());
256 scoped_ptr<aura::Window> window( 256 scoped_ptr<aura::Window> window(
257 CreatePanelWindow(gfx::Point(0, 0))); 257 CreatePanelWindow(gfx::Point(0, 0)));
258 DetachReattachTest(window.get(), -1, 0); 258 DetachReattachTest(window.get(), -1, 0);
259 } 259 }
260 260
261 TEST_F(PanelWindowResizerTest, PanelDetachReattachTop) {
262 if (!SupportsHostWindowResize())
263 return;
264
265 ash::Shell* shell = ash::Shell::GetInstance();
266 shell->SetShelfAlignment(SHELF_ALIGNMENT_TOP, shell->GetPrimaryRootWindow());
267 scoped_ptr<aura::Window> window(
268 CreatePanelWindow(gfx::Point(0, 0)));
269 DetachReattachTest(window.get(), 0, 1);
270 }
271
272 // Tests that a drag continues when the shelf is hidden. This occurs as part of 261 // Tests that a drag continues when the shelf is hidden. This occurs as part of
273 // the animation when switching profiles. http://crbug.com/393047. 262 // the animation when switching profiles. http://crbug.com/393047.
274 TEST_F(PanelWindowResizerTest, DetachThenHideShelf) { 263 TEST_F(PanelWindowResizerTest, DetachThenHideShelf) {
275 if (!SupportsHostWindowResize()) 264 if (!SupportsHostWindowResize())
276 return; 265 return;
277 scoped_ptr<aura::Window> window( 266 scoped_ptr<aura::Window> window(
278 CreatePanelWindow(gfx::Point(0, 0))); 267 CreatePanelWindow(gfx::Point(0, 0)));
279 wm::WindowState* state = wm::GetWindowState(window.get()); 268 wm::WindowState* state = wm::GetWindowState(window.get());
280 gfx::Rect expected_bounds = window->GetBoundsInScreen(); 269 gfx::Rect expected_bounds = window->GetBoundsInScreen();
281 expected_bounds.set_y(expected_bounds.y() - 100); 270 expected_bounds.set_y(expected_bounds.y() - 100);
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 571
583 INSTANTIATE_TEST_CASE_P(LtrRtl, PanelWindowResizerTextDirectionTest, 572 INSTANTIATE_TEST_CASE_P(LtrRtl, PanelWindowResizerTextDirectionTest,
584 testing::Bool()); 573 testing::Bool());
585 INSTANTIATE_TEST_CASE_P(NormalPanelPopup, 574 INSTANTIATE_TEST_CASE_P(NormalPanelPopup,
586 PanelWindowResizerTransientTest, 575 PanelWindowResizerTransientTest,
587 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, 576 testing::Values(ui::wm::WINDOW_TYPE_NORMAL,
588 ui::wm::WINDOW_TYPE_PANEL, 577 ui::wm::WINDOW_TYPE_PANEL,
589 ui::wm::WINDOW_TYPE_POPUP)); 578 ui::wm::WINDOW_TYPE_POPUP));
590 579
591 } // namespace ash 580 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/panels/panel_window_resizer.cc ('k') | ash/wm/window_animations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698