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

Unified Diff: ash/wm/overview/window_selector_unittest.cc

Issue 1918883002: Makes Panel related classes use ash/wm/common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@phantom_window_controller
Patch Set: feedback 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/overview/window_selector.cc ('k') | ash/wm/panels/panel_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/overview/window_selector_unittest.cc
diff --git a/ash/wm/overview/window_selector_unittest.cc b/ash/wm/overview/window_selector_unittest.cc
index 5593e08e5379a8970c7171f60496d34e6684eb60..714072df1b24720c171e207c7a98eda805532c8d 100644
--- a/ash/wm/overview/window_selector_unittest.cc
+++ b/ash/wm/overview/window_selector_unittest.cc
@@ -20,6 +20,7 @@
#include "ash/test/shelf_view_test_api.h"
#include "ash/test/shell_test_api.h"
#include "ash/test/test_shelf_delegate.h"
+#include "ash/wm/aura/wm_window_aura.h"
#include "ash/wm/common/wm_event.h"
#include "ash/wm/maximize_mode/maximize_mode_controller.h"
#include "ash/wm/mru_window_tracker.h"
@@ -1484,30 +1485,25 @@ TEST_F(WindowSelectorTest, SelectWindowWithReturnKey) {
TEST_F(WindowSelectorTest, WindowOverviewHidesCalloutWidgets) {
std::unique_ptr<aura::Window> panel1(
CreatePanelWindow(gfx::Rect(0, 0, 100, 100)));
+ wm::WmWindow* wm_panel1 = wm::WmWindowAura::Get(panel1.get());
std::unique_ptr<aura::Window> panel2(
CreatePanelWindow(gfx::Rect(0, 0, 100, 100)));
- PanelLayoutManager* panel_manager =
- static_cast<PanelLayoutManager*>(panel1->parent()->layout_manager());
+ wm::WmWindow* wm_panel2 = wm::WmWindowAura::Get(panel2.get());
+ PanelLayoutManager* panel_manager = PanelLayoutManager::Get(wm_panel1);
// By default, panel callout widgets are visible.
- EXPECT_TRUE(
- panel_manager->GetCalloutWidgetForPanel(panel1.get())->IsVisible());
- EXPECT_TRUE(
- panel_manager->GetCalloutWidgetForPanel(panel2.get())->IsVisible());
+ EXPECT_TRUE(panel_manager->GetCalloutWidgetForPanel(wm_panel1)->IsVisible());
+ EXPECT_TRUE(panel_manager->GetCalloutWidgetForPanel(wm_panel2)->IsVisible());
// Toggling the overview should hide the callout widgets.
ToggleOverview();
- EXPECT_FALSE(
- panel_manager->GetCalloutWidgetForPanel(panel1.get())->IsVisible());
- EXPECT_FALSE(
- panel_manager->GetCalloutWidgetForPanel(panel2.get())->IsVisible());
+ EXPECT_FALSE(panel_manager->GetCalloutWidgetForPanel(wm_panel1)->IsVisible());
+ EXPECT_FALSE(panel_manager->GetCalloutWidgetForPanel(wm_panel2)->IsVisible());
// Ending the overview should show them again.
ToggleOverview();
- EXPECT_TRUE(
- panel_manager->GetCalloutWidgetForPanel(panel1.get())->IsVisible());
- EXPECT_TRUE(
- panel_manager->GetCalloutWidgetForPanel(panel2.get())->IsVisible());
+ EXPECT_TRUE(panel_manager->GetCalloutWidgetForPanel(wm_panel1)->IsVisible());
+ EXPECT_TRUE(panel_manager->GetCalloutWidgetForPanel(wm_panel2)->IsVisible());
}
// Creates three windows and tests filtering them by title.
« no previous file with comments | « ash/wm/overview/window_selector.cc ('k') | ash/wm/panels/panel_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698