| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "ash/common/accessibility_delegate.h" | 8 #include "ash/common/accessibility_delegate.h" |
| 9 #include "ash/common/accessibility_types.h" | 9 #include "ash/common/accessibility_types.h" |
| 10 #include "ash/common/ash_switches.h" | 10 #include "ash/common/ash_switches.h" |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 // Tests that entering overview mode with an App-list active properly focuses | 513 // Tests that entering overview mode with an App-list active properly focuses |
| 514 // and activates the overview text filter window. | 514 // and activates the overview text filter window. |
| 515 TEST_F(WindowSelectorTest, TextFilterActive) { | 515 TEST_F(WindowSelectorTest, TextFilterActive) { |
| 516 gfx::Rect bounds(0, 0, 400, 400); | 516 gfx::Rect bounds(0, 0, 400, 400); |
| 517 std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); | 517 std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); |
| 518 wm::ActivateWindow(window1.get()); | 518 wm::ActivateWindow(window1.get()); |
| 519 | 519 |
| 520 EXPECT_TRUE(wm::IsActiveWindow(window1.get())); | 520 EXPECT_TRUE(wm::IsActiveWindow(window1.get())); |
| 521 EXPECT_EQ(window1.get(), GetFocusedWindow()); | 521 EXPECT_EQ(window1.get(), GetFocusedWindow()); |
| 522 | 522 |
| 523 WmShell::Get()->ToggleAppList(); | 523 Shell::Get()->ToggleAppList(); |
| 524 | 524 |
| 525 // Activating overview cancels the App-list which normally would activate the | 525 // Activating overview cancels the App-list which normally would activate the |
| 526 // previously active |window1|. Overview mode should properly transfer focus | 526 // previously active |window1|. Overview mode should properly transfer focus |
| 527 // and activation to the text filter widget. | 527 // and activation to the text filter widget. |
| 528 ToggleOverview(); | 528 ToggleOverview(); |
| 529 EXPECT_FALSE(wm::IsActiveWindow(window1.get())); | 529 EXPECT_FALSE(wm::IsActiveWindow(window1.get())); |
| 530 EXPECT_TRUE(wm::IsActiveWindow(GetFocusedWindow())); | 530 EXPECT_TRUE(wm::IsActiveWindow(GetFocusedWindow())); |
| 531 EXPECT_EQ(text_filter_widget()->GetNativeWindow(), GetFocusedWindow()); | 531 EXPECT_EQ(text_filter_widget()->GetNativeWindow(), GetFocusedWindow()); |
| 532 } | 532 } |
| 533 | 533 |
| (...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2164 aura::client::WINDOW_MOVE_SOURCE_MOUSE)); | 2164 aura::client::WINDOW_MOVE_SOURCE_MOUSE)); |
| 2165 ASSERT_TRUE(resizer.get()); | 2165 ASSERT_TRUE(resizer.get()); |
| 2166 gfx::Point location = resizer->GetInitialLocation(); | 2166 gfx::Point location = resizer->GetInitialLocation(); |
| 2167 location.Offset(20, 20); | 2167 location.Offset(20, 20); |
| 2168 resizer->Drag(location, 0); | 2168 resizer->Drag(location, 0); |
| 2169 ToggleOverview(); | 2169 ToggleOverview(); |
| 2170 resizer->RevertDrag(); | 2170 resizer->RevertDrag(); |
| 2171 } | 2171 } |
| 2172 | 2172 |
| 2173 } // namespace ash | 2173 } // namespace ash |
| OLD | NEW |