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

Side by Side Diff: ash/focus_cycler_unittest.cc

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « ash/drag_drop/drag_drop_tracker.cc ('k') | ash/launcher/launcher_item_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/focus_cycler.h" 5 #include "ash/focus_cycler.h"
6 6
7 #include "ash/launcher/launcher.h" 7 #include "ash/launcher/launcher.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/shelf/shelf_widget.h" 9 #include "ash/shelf/shelf_widget.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 // Back to the shelf. 376 // Back to the shelf.
377 focus_cycler()->RotateFocus(FocusCycler::BACKWARD); 377 focus_cycler()->RotateFocus(FocusCycler::BACKWARD);
378 EXPECT_TRUE(shelf_widget()->IsActive()); 378 EXPECT_TRUE(shelf_widget()->IsActive());
379 379
380 // Back to the status area. 380 // Back to the status area.
381 focus_cycler()->RotateFocus(FocusCycler::BACKWARD); 381 focus_cycler()->RotateFocus(FocusCycler::BACKWARD);
382 EXPECT_TRUE(tray()->GetWidget()->IsActive()); 382 EXPECT_TRUE(tray()->GetWidget()->IsActive());
383 383
384 // Pressing "Escape" while on the status area should 384 // Pressing "Escape" while on the status area should
385 // deactivate it, and activate the browser window. 385 // deactivate it, and activate the browser window.
386 aura::RootWindow* root = Shell::GetPrimaryRootWindow(); 386 aura::Window* root = Shell::GetPrimaryRootWindow();
387 aura::test::EventGenerator event_generator(root, root); 387 aura::test::EventGenerator event_generator(root, root);
388 event_generator.PressKey(ui::VKEY_ESCAPE, 0); 388 event_generator.PressKey(ui::VKEY_ESCAPE, 0);
389 EXPECT_TRUE(wm::IsActiveWindow(browser_window)); 389 EXPECT_TRUE(wm::IsActiveWindow(browser_window));
390 EXPECT_EQ(focus_manager->GetFocusedView(), view1); 390 EXPECT_EQ(focus_manager->GetFocusedView(), view1);
391 391
392 // Similarly, pressing "Escape" while on the shelf. 392 // Similarly, pressing "Escape" while on the shelf.
393 // should do the same thing. 393 // should do the same thing.
394 focus_cycler()->RotateFocus(FocusCycler::BACKWARD); 394 focus_cycler()->RotateFocus(FocusCycler::BACKWARD);
395 EXPECT_TRUE(shelf_widget()->IsActive()); 395 EXPECT_TRUE(shelf_widget()->IsActive());
396 event_generator.PressKey(ui::VKEY_ESCAPE, 0); 396 event_generator.PressKey(ui::VKEY_ESCAPE, 0);
397 EXPECT_TRUE(wm::IsActiveWindow(browser_window)); 397 EXPECT_TRUE(wm::IsActiveWindow(browser_window));
398 EXPECT_EQ(focus_manager->GetFocusedView(), view1); 398 EXPECT_EQ(focus_manager->GetFocusedView(), view1);
399 } 399 }
400 400
401 } // namespace test 401 } // namespace test
402 } // namespace ash 402 } // namespace ash
OLDNEW
« no previous file with comments | « ash/drag_drop/drag_drop_tracker.cc ('k') | ash/launcher/launcher_item_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698