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

Unified Diff: ash/wm/panels/panel_layout_manager_unittest.cc

Issue 2629643002: chromeos: Renames WmWindowAura to WmWindow (Closed)
Patch Set: feedback Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/panels/attached_panel_window_targeter.cc ('k') | ash/wm/panels/panel_window_resizer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/panels/panel_layout_manager_unittest.cc
diff --git a/ash/wm/panels/panel_layout_manager_unittest.cc b/ash/wm/panels/panel_layout_manager_unittest.cc
index 6744b1367fe3099448214f40be1e86c2b8d4f9d0..d9ee44ab7be17a7e7d53aba5104bbba02558567f 100644
--- a/ash/wm/panels/panel_layout_manager_unittest.cc
+++ b/ash/wm/panels/panel_layout_manager_unittest.cc
@@ -4,7 +4,6 @@
#include "ash/common/wm/panels/panel_layout_manager.h"
-#include "ash/aura/wm_window_aura.h"
#include "ash/common/shelf/shelf_button.h"
#include "ash/common/shelf/shelf_layout_manager.h"
#include "ash/common/shelf/shelf_model.h"
@@ -16,6 +15,7 @@
#include "ash/common/wm/mru_window_tracker.h"
#include "ash/common/wm/window_state.h"
#include "ash/common/wm_shell.h"
+#include "ash/common/wm_window.h"
#include "ash/common/wm_window_property.h"
#include "ash/public/cpp/shelf_types.h"
#include "ash/public/cpp/shell_window_ids.h"
@@ -89,8 +89,7 @@ class PanelLayoutManagerTest : public test::AshTestBase {
const gfx::Rect& bounds) {
aura::Window* window = CreateTestWindowInShellWithDelegateAndType(
delegate, ui::wm::WINDOW_TYPE_PANEL, 0, bounds);
- test::TestShelfDelegate::instance()->AddShelfItem(
- WmWindowAura::Get(window));
+ test::TestShelfDelegate::instance()->AddShelfItem(WmWindow::Get(window));
shelf_view_test()->RunMessageLoopUntilAnimationsDone();
return window;
}
@@ -105,7 +104,7 @@ class PanelLayoutManagerTest : public test::AshTestBase {
}
views::Widget* GetCalloutWidgetForPanel(aura::Window* panel) {
- WmWindow* wm_panel = WmWindowAura::Get(panel);
+ WmWindow* wm_panel = WmWindow::Get(panel);
PanelLayoutManager* manager = PanelLayoutManager::Get(wm_panel);
DCHECK(manager);
PanelLayoutManager::PanelList::iterator found =
@@ -143,7 +142,7 @@ class PanelLayoutManagerTest : public test::AshTestBase {
// Waits until all shelf view animations are done.
shelf_view_test()->RunMessageLoopUntilAnimationsDone();
- WmWindow* wm_panel = WmWindowAura::Get(panel);
+ WmWindow* wm_panel = WmWindow::Get(panel);
WmShelf* shelf = wm_panel->GetRootWindowController()->GetShelf();
gfx::Rect icon_bounds = shelf->GetScreenBoundsOfItemIconForWindow(wm_panel);
ASSERT_FALSE(icon_bounds.width() == 0 && icon_bounds.height() == 0);
@@ -179,7 +178,7 @@ class PanelLayoutManagerTest : public test::AshTestBase {
base::RunLoop().RunUntilIdle();
views::Widget* widget = GetCalloutWidgetForPanel(panel);
- WmWindow* wm_panel = WmWindowAura::Get(panel);
+ WmWindow* wm_panel = WmWindow::Get(panel);
WmShelf* shelf = wm_panel->GetRootWindowController()->GetShelf();
gfx::Rect icon_bounds = shelf->GetScreenBoundsOfItemIconForWindow(wm_panel);
ASSERT_FALSE(icon_bounds.IsEmpty());
@@ -221,7 +220,7 @@ class PanelLayoutManagerTest : public test::AshTestBase {
test_api.SetAnimationDuration(1);
test_api.RunMessageLoopUntilAnimationsDone();
int index = WmShell::Get()->shelf_model()->ItemIndexByID(
- WmWindowAura::Get(window)->GetIntProperty(WmWindowProperty::SHELF_ID));
+ WmWindow::Get(window)->GetIntProperty(WmWindowProperty::SHELF_ID));
gfx::Rect bounds = test_api.GetButton(index)->GetBoundsInScreen();
ui::test::EventGenerator& event_generator = GetEventGenerator();
@@ -232,7 +231,7 @@ class PanelLayoutManagerTest : public test::AshTestBase {
}
WmShelf* GetShelfForWindow(aura::Window* window) {
- return WmWindowAura::Get(window)->GetRootWindowController()->GetShelf();
+ return WmWindow::Get(window)->GetRootWindowController()->GetShelf();
}
void SetAlignment(aura::Window* root_window, ShelfAlignment alignment) {
@@ -604,11 +603,9 @@ TEST_F(PanelLayoutManagerTest, FanWindows) {
int window_x3 = w3->GetBoundsInRootWindow().CenterPoint().x();
WmShelf* shelf = GetPrimaryShelf();
int icon_x1 =
- shelf->GetScreenBoundsOfItemIconForWindow(WmWindowAura::Get(w1.get()))
- .x();
+ shelf->GetScreenBoundsOfItemIconForWindow(WmWindow::Get(w1.get())).x();
int icon_x2 =
- shelf->GetScreenBoundsOfItemIconForWindow(WmWindowAura::Get(w2.get()))
- .x();
+ shelf->GetScreenBoundsOfItemIconForWindow(WmWindow::Get(w2.get())).x();
EXPECT_EQ(window_x2 - window_x1, window_x3 - window_x2);
int spacing = window_x2 - window_x1;
EXPECT_GT(spacing, icon_x2 - icon_x1);
@@ -826,7 +823,7 @@ TEST_F(PanelLayoutManagerTest, PanelsHideAndRestoreWithShelf) {
// While in full-screen mode, the panel windows should still be in the
// switchable window list - http://crbug.com/313919.
- aura::Window::Windows switchable_window_list = WmWindowAura::ToAuraWindows(
+ aura::Window::Windows switchable_window_list = WmWindow::ToAuraWindows(
WmShell::Get()->mru_window_tracker()->BuildMruWindowList());
EXPECT_EQ(3u, switchable_window_list.size());
EXPECT_NE(switchable_window_list.end(),
« no previous file with comments | « ash/wm/panels/attached_panel_window_targeter.cc ('k') | ash/wm/panels/panel_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698