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

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

Issue 2035543004: Shuffles and renames ash/common/wm classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: random changes for chrome tests 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) 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/common/wm/panels/panel_window_resizer.h" 5 #include "ash/common/wm/panels/panel_window_resizer.h"
6 6
7 #include "ash/aura/wm_window_aura.h"
7 #include "ash/common/shell_window_ids.h" 8 #include "ash/common/shell_window_ids.h"
8 #include "ash/common/wm/window_state.h" 9 #include "ash/common/wm/window_state.h"
9 #include "ash/common/wm/wm_event.h" 10 #include "ash/common/wm/wm_event.h"
10 #include "ash/root_window_controller.h" 11 #include "ash/root_window_controller.h"
11 #include "ash/shelf/shelf.h" 12 #include "ash/shelf/shelf.h"
12 #include "ash/shelf/shelf_layout_manager.h" 13 #include "ash/shelf/shelf_layout_manager.h"
13 #include "ash/shelf/shelf_model.h" 14 #include "ash/shelf/shelf_model.h"
14 #include "ash/shelf/shelf_types.h" 15 #include "ash/shelf/shelf_types.h"
15 #include "ash/shelf/shelf_util.h" 16 #include "ash/shelf/shelf_util.h"
16 #include "ash/shelf/shelf_widget.h" 17 #include "ash/shelf/shelf_widget.h"
17 #include "ash/shell.h" 18 #include "ash/shell.h"
18 #include "ash/test/ash_test_base.h" 19 #include "ash/test/ash_test_base.h"
19 #include "ash/test/cursor_manager_test_api.h" 20 #include "ash/test/cursor_manager_test_api.h"
20 #include "ash/test/shell_test_api.h" 21 #include "ash/test/shell_test_api.h"
21 #include "ash/test/test_shelf_delegate.h" 22 #include "ash/test/test_shelf_delegate.h"
22 #include "ash/wm/aura/wm_window_aura.h"
23 #include "ash/wm/drag_window_resizer.h" 23 #include "ash/wm/drag_window_resizer.h"
24 #include "ash/wm/window_state_aura.h" 24 #include "ash/wm/window_state_aura.h"
25 #include "base/i18n/rtl.h" 25 #include "base/i18n/rtl.h"
26 #include "base/win/windows_version.h" 26 #include "base/win/windows_version.h"
27 #include "ui/aura/client/aura_constants.h" 27 #include "ui/aura/client/aura_constants.h"
28 #include "ui/aura/window_event_dispatcher.h" 28 #include "ui/aura/window_event_dispatcher.h"
29 #include "ui/base/hit_test.h" 29 #include "ui/base/hit_test.h"
30 #include "ui/base/ui_base_types.h" 30 #include "ui/base/ui_base_types.h"
31 #include "ui/views/widget/widget.h" 31 #include "ui/views/widget/widget.h"
32 #include "ui/wm/core/window_util.h" 32 #include "ui/wm/core/window_util.h"
(...skipping 27 matching lines...) Expand all
60 60
61 aura::Window* CreatePanelWindow(const gfx::Point& origin) { 61 aura::Window* CreatePanelWindow(const gfx::Point& origin) {
62 gfx::Rect bounds(origin, gfx::Size(101, 101)); 62 gfx::Rect bounds(origin, gfx::Size(101, 101));
63 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( 63 aura::Window* window = CreateTestWindowInShellWithDelegateAndType(
64 NULL, ui::wm::WINDOW_TYPE_PANEL, 0, bounds); 64 NULL, ui::wm::WINDOW_TYPE_PANEL, 0, bounds);
65 shelf_delegate_->AddShelfItem(window); 65 shelf_delegate_->AddShelfItem(window);
66 return window; 66 return window;
67 } 67 }
68 68
69 void DragStart(aura::Window* window) { 69 void DragStart(aura::Window* window) {
70 resizer_.reset(CreateWindowResizer(wm::WmWindowAura::Get(window), 70 resizer_.reset(CreateWindowResizer(WmWindowAura::Get(window),
71 window->bounds().origin(), HTCAPTION, 71 window->bounds().origin(), HTCAPTION,
72 aura::client::WINDOW_MOVE_SOURCE_MOUSE) 72 aura::client::WINDOW_MOVE_SOURCE_MOUSE)
73 .release()); 73 .release());
74 ASSERT_TRUE(resizer_.get()); 74 ASSERT_TRUE(resizer_.get());
75 } 75 }
76 76
77 void DragMove(int dx, int dy) { 77 void DragMove(int dx, int dy) {
78 resizer_->Drag(CalculateDragPoint(*resizer_, dx, dy), 0); 78 resizer_->Drag(CalculateDragPoint(*resizer_, dx, dy), 0);
79 } 79 }
80 80
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 557
558 INSTANTIATE_TEST_CASE_P(LtrRtl, PanelWindowResizerTextDirectionTest, 558 INSTANTIATE_TEST_CASE_P(LtrRtl, PanelWindowResizerTextDirectionTest,
559 testing::Bool()); 559 testing::Bool());
560 INSTANTIATE_TEST_CASE_P(NormalPanelPopup, 560 INSTANTIATE_TEST_CASE_P(NormalPanelPopup,
561 PanelWindowResizerTransientTest, 561 PanelWindowResizerTransientTest,
562 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, 562 testing::Values(ui::wm::WINDOW_TYPE_NORMAL,
563 ui::wm::WINDOW_TYPE_PANEL, 563 ui::wm::WINDOW_TYPE_PANEL,
564 ui::wm::WINDOW_TYPE_POPUP)); 564 ui::wm::WINDOW_TYPE_POPUP));
565 565
566 } // namespace ash 566 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698