Chromium Code Reviews| 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 eef26a99ba832d49b968073d1bafb0a3afbecbfc..f5f53a15ff0cc71870e4f37aa554dc42bf06a15f 100644 |
| --- a/ash/wm/overview/window_selector_unittest.cc |
| +++ b/ash/wm/overview/window_selector_unittest.cc |
| @@ -453,6 +453,27 @@ TEST_P(WindowSelectorTest, Basic) { |
| EXPECT_FALSE(aura::client::GetCursorClient(root_window)->IsCursorLocked()); |
| } |
| +// Tests that entering overview mode with an App-list active properly focuses |
| +// and activates the overview text filter window. |
| +TEST_P(WindowSelectorTest, TextFilterActive) { |
| + gfx::Rect bounds(0, 0, 400, 400); |
| + std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); |
| + wm::ActivateWindow(window1.get()); |
| + |
| + EXPECT_TRUE(wm::IsActiveWindow(window1.get())); |
| + EXPECT_EQ(window1.get(), GetFocusedWindow()); |
| + |
| + WmShell::Get()->ToggleAppList(); |
| + |
| + // Activating overview cancels the App-list which normally would activate the |
| + // previously active |window1|. Overview mode should properly transfer focus |
| + // and activation to the text filter widget. |
| + ToggleOverview(); |
| + EXPECT_FALSE(wm::IsActiveWindow(window1.get())); |
| + EXPECT_TRUE(wm::IsActiveWindow(GetFocusedWindow())); |
| + EXPECT_EQ(text_filter_widget()->GetNativeWindow(), GetFocusedWindow()); |
| +} |
|
James Cook
2016/08/10 15:55:59
Nice test. Easy to read.
varkha
2016/08/10 16:04:54
Acknowledged.
|
| + |
| // Tests that the ordering of windows is near the windows' original positions. |
| TEST_P(WindowSelectorTest, MinimizeMovement) { |
| // With Material Design the order of windows in overview mode is MRU. |