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

Side by Side Diff: ash/wm/window_cycle_controller_unittest.cc

Issue 2893643003: [mus+ash] Removes WmWindow from ash/wm/window_cycle_* (Closed)
Patch Set: [mus+ash] Removes WmWindow from ash/wm/window_cycle_* (nits) Created 3 years, 7 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/window_cycle_controller.cc ('k') | ash/wm/window_cycle_list.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/window_cycle_controller.h" 5 #include "ash/wm/window_cycle_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/focus_cycler.h" 10 #include "ash/focus_cycler.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 void OnMouseEvent(ui::MouseEvent* event) override { mouse_events_++; } 66 void OnMouseEvent(ui::MouseEvent* event) override { mouse_events_++; }
67 67
68 private: 68 private:
69 int key_events_; 69 int key_events_;
70 int mouse_events_; 70 int mouse_events_;
71 71
72 DISALLOW_COPY_AND_ASSIGN(EventCounter); 72 DISALLOW_COPY_AND_ASSIGN(EventCounter);
73 }; 73 };
74 74
75 bool IsWindowMinimized(aura::Window* window) { 75 bool IsWindowMinimized(aura::Window* window) {
76 return WmWindow::Get(window)->GetWindowState()->IsMinimized(); 76 return wm::GetWindowState(window)->IsMinimized();
77 } 77 }
78 78
79 } // namespace 79 } // namespace
80 80
81 using aura::test::CreateTestWindowWithId; 81 using aura::test::CreateTestWindowWithId;
82 using aura::test::TestWindowDelegate; 82 using aura::test::TestWindowDelegate;
83 using aura::Window; 83 using aura::Window;
84 84
85 class WindowCycleControllerTest : public test::AshTestBase { 85 class WindowCycleControllerTest : public test::AshTestBase {
86 public: 86 public:
(...skipping 12 matching lines...) Expand all
99 99
100 aura::Window* CreatePanelWindow() { 100 aura::Window* CreatePanelWindow() {
101 gfx::Rect rect(100, 100); 101 gfx::Rect rect(100, 100);
102 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( 102 aura::Window* window = CreateTestWindowInShellWithDelegateAndType(
103 NULL, ui::wm::WINDOW_TYPE_PANEL, 0, rect); 103 NULL, ui::wm::WINDOW_TYPE_PANEL, 0, rect);
104 shelf_view_test_->RunMessageLoopUntilAnimationsDone(); 104 shelf_view_test_->RunMessageLoopUntilAnimationsDone();
105 return window; 105 return window;
106 } 106 }
107 107
108 const aura::Window::Windows GetWindows(WindowCycleController* controller) { 108 const aura::Window::Windows GetWindows(WindowCycleController* controller) {
109 return WmWindow::ToAuraWindows(controller->window_cycle_list()->windows()); 109 return controller->window_cycle_list()->windows();
110 } 110 }
111 111
112 const views::Widget* GetWindowCycleListWidget() const { 112 const views::Widget* GetWindowCycleListWidget() const {
113 return Shell::Get() 113 return Shell::Get()
114 ->window_cycle_controller() 114 ->window_cycle_controller()
115 ->window_cycle_list() 115 ->window_cycle_list()
116 ->widget(); 116 ->widget();
117 } 117 }
118 118
119 private: 119 private:
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 // Base case sets the expectation for other cases. 761 // Base case sets the expectation for other cases.
762 if (expected_bounds.IsEmpty()) 762 if (expected_bounds.IsEmpty())
763 expected_bounds = display_relative_bounds; 763 expected_bounds = display_relative_bounds;
764 else 764 else
765 EXPECT_EQ(expected_bounds, display_relative_bounds); 765 EXPECT_EQ(expected_bounds, display_relative_bounds);
766 controller->CompleteCycling(); 766 controller->CompleteCycling();
767 } 767 }
768 } 768 }
769 769
770 } // namespace ash 770 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_cycle_controller.cc ('k') | ash/wm/window_cycle_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698