Chromium Code Reviews| Index: chrome/browser/ui/ash/app_list/app_list_interactive_uitest.cc |
| diff --git a/chrome/browser/ui/ash/app_list/app_list_interactive_uitest.cc b/chrome/browser/ui/ash/app_list/app_list_interactive_uitest.cc |
| index c74e1da33d5abb9a23e324f2cd5478d4ee598ecb..df3f22dc79db4d556073c9de53d4795f464d6eaa 100644 |
| --- a/chrome/browser/ui/ash/app_list/app_list_interactive_uitest.cc |
| +++ b/chrome/browser/ui/ash/app_list/app_list_interactive_uitest.cc |
| @@ -14,6 +14,7 @@ |
| #include "base/run_loop.h" |
| #include "chrome/test/base/in_process_browser_test.h" |
| #include "ui/app_list/presenter/app_list.h" |
| +#include "ui/aura/window.h" |
| #include "ui/events/test/event_generator.h" |
| using AppListTest = InProcessBrowserTest; |
| @@ -25,29 +26,30 @@ IN_PROC_BROWSER_TEST_F(AppListTest, PressAppListButtonToShowAndDismiss) { |
| ash::ShelfWidget* shelf_widget = shelf->shelf_widget(); |
| ash::AppListButton* app_list_button = shelf_widget->GetAppListButton(); |
| - ash::WmWindow* root_window = |
| - ash::WmWindow::Get(ash::wm::GetActiveWindow())->GetRootWindow(); |
| - ash::WmWindow* app_list_container = root_window->GetChildByShellWindowId( |
| - ash::kShellWindowId_AppListContainer); |
| + aura::Window* root_window = ash::WmWindow::Get(ash::wm::GetActiveWindow()) |
|
msw
2017/04/12 22:12:50
nit: avoid WmWindow roundabout here?
sky
2017/04/12 22:35:04
Done.
|
| + ->GetRootWindow() |
| + ->aura_window(); |
| + aura::Window* app_list_container = |
| + root_window->GetChildById(ash::kShellWindowId_AppListContainer); |
| ui::test::EventGenerator generator(shelf_widget->GetNativeWindow()); |
| // Click the app list button to show the app list. |
| ash::Shell* shell = ash::Shell::Get(); |
| EXPECT_FALSE(shell->app_list()->GetTargetVisibility()); |
| - EXPECT_EQ(0u, app_list_container->GetChildren().size()); |
| + EXPECT_EQ(0u, app_list_container->children().size()); |
| EXPECT_FALSE(app_list_button->is_showing_app_list()); |
| generator.set_current_location( |
| app_list_button->GetBoundsInScreen().CenterPoint()); |
| generator.ClickLeftButton(); |
| base::RunLoop().RunUntilIdle(); |
| EXPECT_TRUE(shell->app_list()->GetTargetVisibility()); |
| - EXPECT_EQ(1u, app_list_container->GetChildren().size()); |
| + EXPECT_EQ(1u, app_list_container->children().size()); |
| EXPECT_TRUE(app_list_button->is_showing_app_list()); |
| // Click the button again to dismiss the app list; the window animates closed. |
| generator.ClickLeftButton(); |
| base::RunLoop().RunUntilIdle(); |
| EXPECT_FALSE(shell->app_list()->GetTargetVisibility()); |
| - EXPECT_EQ(1u, app_list_container->GetChildren().size()); |
| + EXPECT_EQ(1u, app_list_container->children().size()); |
| EXPECT_FALSE(app_list_button->is_showing_app_list()); |
| } |