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

Unified Diff: ash/focus_cycler_unittest.cc

Issue 2075923002: mash: Convert FocusCycler to wm common types and move to //ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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/focus_cycler.cc ('k') | ash/mus/bridge/wm_window_mus.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/focus_cycler_unittest.cc
diff --git a/ash/focus_cycler_unittest.cc b/ash/focus_cycler_unittest.cc
index 62d9ce9add8459921f4d00d3a28ea3432618b748..7d20988c9441eb1ac253890d6533f7529b81860b 100644
--- a/ash/focus_cycler_unittest.cc
+++ b/ash/focus_cycler_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/focus_cycler.h"
+#include "ash/common/focus_cycler.h"
#include <memory>
@@ -11,8 +11,6 @@
#include "ash/common/wm_window.h"
#include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_factory.h"
#include "ash/system/status_area_widget.h"
#include "ash/system/status_area_widget_delegate.h"
#include "ash/system/tray/system_tray.h"
@@ -61,6 +59,8 @@ class PanedWidgetDelegate : public views::WidgetDelegate {
} // namespace
+// TODO(jamescook): Migrate this test to //ash/common after the status area
+// widget moves. http://crbug.com/620955
class FocusCyclerTest : public AshTestBase {
public:
FocusCyclerTest() {}
@@ -387,8 +387,7 @@ TEST_F(FocusCyclerTest, CycleFocusThroughWindowWithPanes) {
// Pressing "Escape" while on the status area should
// deactivate it, and activate the browser window.
- aura::Window* root = Shell::GetPrimaryRootWindow();
- ui::test::EventGenerator event_generator(root, root);
+ ui::test::EventGenerator& event_generator = GetEventGenerator();
event_generator.PressKey(ui::VKEY_ESCAPE, 0);
EXPECT_TRUE(wm::IsActiveWindow(browser_window));
EXPECT_EQ(focus_manager->GetFocusedView(), view1);
@@ -418,14 +417,14 @@ TEST_F(FocusCyclerTest, RemoveWidgetOnDisplayRemoved) {
EXPECT_TRUE(wm::IsActiveWindow(window.get()));
// Cycle focus to the status area.
- Shell::GetInstance()->focus_cycler()->RotateFocus(FocusCycler::FORWARD);
+ WmShell::Get()->focus_cycler()->RotateFocus(FocusCycler::FORWARD);
EXPECT_FALSE(wm::IsActiveWindow(window.get()));
// Cycle focus to the shelf.
- Shell::GetInstance()->focus_cycler()->RotateFocus(FocusCycler::FORWARD);
+ WmShell::Get()->focus_cycler()->RotateFocus(FocusCycler::FORWARD);
// Cycle focus should go back to the browser.
- Shell::GetInstance()->focus_cycler()->RotateFocus(FocusCycler::FORWARD);
+ WmShell::Get()->focus_cycler()->RotateFocus(FocusCycler::FORWARD);
EXPECT_TRUE(wm::IsActiveWindow(window.get()));
}
« no previous file with comments | « ash/focus_cycler.cc ('k') | ash/mus/bridge/wm_window_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698