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

Side by Side Diff: ash/accelerators/accelerator_controller_unittest.cc

Issue 10914231: Map fullscreen button to maximize (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 8 years, 3 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
« no previous file with comments | « ash/accelerators/accelerator_controller.cc ('k') | ash/accelerators/accelerator_table.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/accelerators/accelerator_controller.h" 5 #include "ash/accelerators/accelerator_controller.h"
6 #include "ash/accelerators/accelerator_table.h" 6 #include "ash/accelerators/accelerator_table.h"
7 #include "ash/caps_lock_delegate.h" 7 #include "ash/caps_lock_delegate.h"
8 #include "ash/display/multi_display_manager.h" 8 #include "ash/display/multi_display_manager.h"
9 #include "ash/ime_control_delegate.h" 9 #include "ash/ime_control_delegate.h"
10 #include "ash/screenshot_delegate.h" 10 #include "ash/screenshot_delegate.h"
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 GetController()->PerformAction(WINDOW_SNAP_RIGHT, dummy); 443 GetController()->PerformAction(WINDOW_SNAP_RIGHT, dummy);
444 EXPECT_NE(window->bounds().ToString(), snap_right.ToString()); 444 EXPECT_NE(window->bounds().ToString(), snap_right.ToString());
445 445
446 // It should cycle back to the first snapped position. 446 // It should cycle back to the first snapped position.
447 GetController()->PerformAction(WINDOW_SNAP_RIGHT, dummy); 447 GetController()->PerformAction(WINDOW_SNAP_RIGHT, dummy);
448 EXPECT_EQ(window->bounds().ToString(), snap_right.ToString()); 448 EXPECT_EQ(window->bounds().ToString(), snap_right.ToString());
449 } 449 }
450 { 450 {
451 gfx::Rect normal_bounds = window->bounds(); 451 gfx::Rect normal_bounds = window->bounds();
452 452
453 GetController()->PerformAction(WINDOW_MAXIMIZE_RESTORE, dummy); 453 GetController()->PerformAction(TOGGLE_MAXIMIZED, dummy);
454 EXPECT_TRUE(wm::IsWindowMaximized(window.get())); 454 EXPECT_TRUE(wm::IsWindowMaximized(window.get()));
455 EXPECT_NE(normal_bounds.ToString(), window->bounds().ToString()); 455 EXPECT_NE(normal_bounds.ToString(), window->bounds().ToString());
456 456
457 GetController()->PerformAction(WINDOW_MAXIMIZE_RESTORE, dummy); 457 GetController()->PerformAction(TOGGLE_MAXIMIZED, dummy);
458 EXPECT_FALSE(wm::IsWindowMaximized(window.get())); 458 EXPECT_FALSE(wm::IsWindowMaximized(window.get()));
459 EXPECT_EQ(normal_bounds.ToString(), window->bounds().ToString()); 459 EXPECT_EQ(normal_bounds.ToString(), window->bounds().ToString());
460 460
461 GetController()->PerformAction(WINDOW_MAXIMIZE_RESTORE, dummy); 461 GetController()->PerformAction(TOGGLE_MAXIMIZED, dummy);
462 GetController()->PerformAction(WINDOW_SNAP_LEFT, dummy); 462 GetController()->PerformAction(WINDOW_SNAP_LEFT, dummy);
463 EXPECT_FALSE(wm::IsWindowMaximized(window.get())); 463 EXPECT_FALSE(wm::IsWindowMaximized(window.get()));
464 464
465 GetController()->PerformAction(WINDOW_MAXIMIZE_RESTORE, dummy); 465 GetController()->PerformAction(TOGGLE_MAXIMIZED, dummy);
466 GetController()->PerformAction(WINDOW_SNAP_RIGHT, dummy); 466 GetController()->PerformAction(WINDOW_SNAP_RIGHT, dummy);
467 EXPECT_FALSE(wm::IsWindowMaximized(window.get())); 467 EXPECT_FALSE(wm::IsWindowMaximized(window.get()));
468 468
469 GetController()->PerformAction(WINDOW_MAXIMIZE_RESTORE, dummy); 469 GetController()->PerformAction(TOGGLE_MAXIMIZED, dummy);
470 EXPECT_TRUE(wm::IsWindowMaximized(window.get())); 470 EXPECT_TRUE(wm::IsWindowMaximized(window.get()));
471 GetController()->PerformAction(WINDOW_MINIMIZE, dummy); 471 GetController()->PerformAction(WINDOW_MINIMIZE, dummy);
472 EXPECT_FALSE(wm::IsWindowMaximized(window.get())); 472 EXPECT_FALSE(wm::IsWindowMaximized(window.get()));
473 EXPECT_TRUE(wm::IsWindowMinimized(window.get())); 473 EXPECT_TRUE(wm::IsWindowMinimized(window.get()));
474 wm::RestoreWindow(window.get()); 474 wm::RestoreWindow(window.get());
475 wm::ActivateWindow(window.get()); 475 wm::ActivateWindow(window.get());
476 } 476 }
477 { 477 {
478 GetController()->PerformAction(WINDOW_MINIMIZE, dummy); 478 GetController()->PerformAction(WINDOW_MINIMIZE, dummy);
479 EXPECT_TRUE(wm::IsWindowMinimized(window.get())); 479 EXPECT_TRUE(wm::IsWindowMinimized(window.get()));
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 EXPECT_FALSE(GetController()->IsReservedAccelerator( 1008 EXPECT_FALSE(GetController()->IsReservedAccelerator(
1009 ui::Accelerator(ui::VKEY_PRINT, ui::EF_NONE))); 1009 ui::Accelerator(ui::VKEY_PRINT, ui::EF_NONE)));
1010 EXPECT_FALSE(GetController()->IsReservedAccelerator( 1010 EXPECT_FALSE(GetController()->IsReservedAccelerator(
1011 ui::Accelerator(ui::VKEY_TAB, ui::EF_NONE))); 1011 ui::Accelerator(ui::VKEY_TAB, ui::EF_NONE)));
1012 EXPECT_FALSE(GetController()->IsReservedAccelerator( 1012 EXPECT_FALSE(GetController()->IsReservedAccelerator(
1013 ui::Accelerator(ui::VKEY_A, ui::EF_NONE))); 1013 ui::Accelerator(ui::VKEY_A, ui::EF_NONE)));
1014 } 1014 }
1015 1015
1016 } // namespace test 1016 } // namespace test
1017 } // namespace ash 1017 } // namespace ash
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_controller.cc ('k') | ash/accelerators/accelerator_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698