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

Side by Side Diff: ash/wm/overview/window_selector_unittest.cc

Issue 2750483005: Moves app_list() and related functions from Shell to WmShell (Closed)
Patch Set: dont explicitly delete Created 3 years, 9 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/shell/content/client/shell_browser_main_parts.cc ('k') | chrome/browser/chromeos/accessibility/sticky_keys_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698