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

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

Issue 2700523004: Remove docked windows entirely in M59. (Closed)
Patch Set: Rebase and fix 1 test Created 3 years, 10 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 (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/common/accelerators/accelerator_controller.h" 5 #include "ash/common/accelerators/accelerator_controller.h"
6 6
7 #include "ash/common/accelerators/accelerator_table.h" 7 #include "ash/common/accelerators/accelerator_table.h"
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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 } 435 }
436 436
437 TEST_F(AcceleratorControllerTest, WindowSnap) { 437 TEST_F(AcceleratorControllerTest, WindowSnap) {
438 std::unique_ptr<aura::Window> window( 438 std::unique_ptr<aura::Window> window(
439 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20))); 439 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
440 wm::WindowState* window_state = wm::GetWindowState(window.get()); 440 wm::WindowState* window_state = wm::GetWindowState(window.get());
441 441
442 window_state->Activate(); 442 window_state->Activate();
443 443
444 { 444 {
445 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT); 445 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_LEFT);
446 gfx::Rect expected_bounds = wm::GetDefaultLeftSnappedWindowBoundsInParent( 446 gfx::Rect expected_bounds = wm::GetDefaultLeftSnappedWindowBoundsInParent(
447 WmWindow::Get(window.get())); 447 WmWindow::Get(window.get()));
448 EXPECT_EQ(expected_bounds.ToString(), window->bounds().ToString()); 448 EXPECT_EQ(expected_bounds.ToString(), window->bounds().ToString());
449 } 449 }
450 { 450 {
451 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_RIGHT); 451 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_RIGHT);
452 gfx::Rect expected_bounds = wm::GetDefaultRightSnappedWindowBoundsInParent( 452 gfx::Rect expected_bounds = wm::GetDefaultRightSnappedWindowBoundsInParent(
453 WmWindow::Get(window.get())); 453 WmWindow::Get(window.get()));
454 EXPECT_EQ(expected_bounds.ToString(), window->bounds().ToString()); 454 EXPECT_EQ(expected_bounds.ToString(), window->bounds().ToString());
455 } 455 }
456 { 456 {
457 gfx::Rect normal_bounds = window_state->GetRestoreBoundsInParent(); 457 gfx::Rect normal_bounds = window_state->GetRestoreBoundsInParent();
458 458
459 GetController()->PerformActionIfEnabled(TOGGLE_MAXIMIZED); 459 GetController()->PerformActionIfEnabled(TOGGLE_MAXIMIZED);
460 EXPECT_TRUE(window_state->IsMaximized()); 460 EXPECT_TRUE(window_state->IsMaximized());
461 EXPECT_NE(normal_bounds.ToString(), window->bounds().ToString()); 461 EXPECT_NE(normal_bounds.ToString(), window->bounds().ToString());
462 462
463 GetController()->PerformActionIfEnabled(TOGGLE_MAXIMIZED); 463 GetController()->PerformActionIfEnabled(TOGGLE_MAXIMIZED);
464 EXPECT_FALSE(window_state->IsMaximized()); 464 EXPECT_FALSE(window_state->IsMaximized());
465 // Window gets restored to its restore bounds since side-maximized state 465 // Window gets restored to its restore bounds since side-maximized state
466 // is treated as a "maximized" state. 466 // is treated as a "maximized" state.
467 EXPECT_EQ(normal_bounds.ToString(), window->bounds().ToString()); 467 EXPECT_EQ(normal_bounds.ToString(), window->bounds().ToString());
468 468
469 GetController()->PerformActionIfEnabled(TOGGLE_MAXIMIZED); 469 GetController()->PerformActionIfEnabled(TOGGLE_MAXIMIZED);
470 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT); 470 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_LEFT);
471 EXPECT_FALSE(window_state->IsMaximized()); 471 EXPECT_FALSE(window_state->IsMaximized());
472 472
473 GetController()->PerformActionIfEnabled(TOGGLE_MAXIMIZED); 473 GetController()->PerformActionIfEnabled(TOGGLE_MAXIMIZED);
474 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_RIGHT); 474 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_RIGHT);
475 EXPECT_FALSE(window_state->IsMaximized()); 475 EXPECT_FALSE(window_state->IsMaximized());
476 476
477 GetController()->PerformActionIfEnabled(TOGGLE_MAXIMIZED); 477 GetController()->PerformActionIfEnabled(TOGGLE_MAXIMIZED);
478 EXPECT_TRUE(window_state->IsMaximized()); 478 EXPECT_TRUE(window_state->IsMaximized());
479 GetController()->PerformActionIfEnabled(WINDOW_MINIMIZE); 479 GetController()->PerformActionIfEnabled(WINDOW_MINIMIZE);
480 EXPECT_FALSE(window_state->IsMaximized()); 480 EXPECT_FALSE(window_state->IsMaximized());
481 EXPECT_TRUE(window_state->IsMinimized()); 481 EXPECT_TRUE(window_state->IsMinimized());
482 window_state->Restore(); 482 window_state->Restore();
483 window_state->Activate(); 483 window_state->Activate();
484 } 484 }
485 { 485 {
486 GetController()->PerformActionIfEnabled(WINDOW_MINIMIZE); 486 GetController()->PerformActionIfEnabled(WINDOW_MINIMIZE);
487 EXPECT_TRUE(window_state->IsMinimized()); 487 EXPECT_TRUE(window_state->IsMinimized());
488 } 488 }
489 } 489 }
490 490
491 // Tests that when window docking is disabled, only snapping windows works. 491 // Tests that window snapping works.
492 TEST_F(AcceleratorControllerTest, WindowSnapWithoutDocking) { 492 TEST_F(AcceleratorControllerTest, WindowSnapWithoutDocking) {
493 ASSERT_FALSE(ash::switches::DockedWindowsEnabled());
494 std::unique_ptr<aura::Window> window( 493 std::unique_ptr<aura::Window> window(
495 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20))); 494 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
496 495
497 wm::WindowState* window_state = wm::GetWindowState(window.get()); 496 wm::WindowState* window_state = wm::GetWindowState(window.get());
498 window_state->Activate(); 497 window_state->Activate();
499 498
500 // Snap right. 499 // Snap right.
501 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_RIGHT); 500 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_RIGHT);
502 gfx::Rect normal_bounds = window_state->GetRestoreBoundsInParent(); 501 gfx::Rect normal_bounds = window_state->GetRestoreBoundsInParent();
503 gfx::Rect expected_bounds = wm::GetDefaultRightSnappedWindowBoundsInParent( 502 gfx::Rect expected_bounds = wm::GetDefaultRightSnappedWindowBoundsInParent(
504 WmWindow::Get(window.get())); 503 WmWindow::Get(window.get()));
505 EXPECT_EQ(expected_bounds.ToString(), window->bounds().ToString()); 504 EXPECT_EQ(expected_bounds.ToString(), window->bounds().ToString());
506 EXPECT_TRUE(window_state->IsSnapped()); 505 EXPECT_TRUE(window_state->IsSnapped());
507 // Snap right again ->> becomes normal. 506 // Snap right again ->> becomes normal.
508 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_RIGHT); 507 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_RIGHT);
509 EXPECT_TRUE(window_state->IsNormalStateType()); 508 EXPECT_TRUE(window_state->IsNormalStateType());
510 EXPECT_FALSE(window_state->IsDocked());
511 EXPECT_EQ(normal_bounds.ToString(), window->bounds().ToString()); 509 EXPECT_EQ(normal_bounds.ToString(), window->bounds().ToString());
512 // Snap right. 510 // Snap right.
513 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_RIGHT); 511 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_RIGHT);
514 EXPECT_TRUE(window_state->IsSnapped()); 512 EXPECT_TRUE(window_state->IsSnapped());
515 EXPECT_FALSE(window_state->IsDocked());
516 // Snap left. 513 // Snap left.
517 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT); 514 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_LEFT);
518 EXPECT_TRUE(window_state->IsSnapped()); 515 EXPECT_TRUE(window_state->IsSnapped());
519 EXPECT_FALSE(window_state->IsDocked());
520 expected_bounds = wm::GetDefaultLeftSnappedWindowBoundsInParent( 516 expected_bounds = wm::GetDefaultLeftSnappedWindowBoundsInParent(
521 WmWindow::Get(window.get())); 517 WmWindow::Get(window.get()));
522 EXPECT_EQ(expected_bounds.ToString(), window->bounds().ToString()); 518 EXPECT_EQ(expected_bounds.ToString(), window->bounds().ToString());
523 // Snap left again ->> becomes normal. 519 // Snap left again ->> becomes normal.
524 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT); 520 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_LEFT);
525 EXPECT_TRUE(window_state->IsNormalStateType()); 521 EXPECT_TRUE(window_state->IsNormalStateType());
526 EXPECT_FALSE(window_state->IsDocked());
527 EXPECT_EQ(normal_bounds.ToString(), window->bounds().ToString()); 522 EXPECT_EQ(normal_bounds.ToString(), window->bounds().ToString());
528 } 523 }
529 524
530 // Test class used for testing docked windows.
531 class EnabledDockedWindowsAcceleratorControllerTest
532 : public AcceleratorControllerTest {
533 public:
534 EnabledDockedWindowsAcceleratorControllerTest() = default;
535 ~EnabledDockedWindowsAcceleratorControllerTest() override = default;
536
537 void SetUp() override {
538 base::CommandLine::ForCurrentProcess()->AppendSwitch(
539 ash::switches::kAshEnableDockedWindows);
540 AcceleratorControllerTest::SetUp();
541 }
542
543 private:
544 DISALLOW_COPY_AND_ASSIGN(EnabledDockedWindowsAcceleratorControllerTest);
545 };
546
547 TEST_F(EnabledDockedWindowsAcceleratorControllerTest,
548 WindowSnapLeftDockLeftRestore) {
549 std::unique_ptr<aura::Window> window0(
550 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
551 std::unique_ptr<aura::Window> window1(
552 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
553 wm::WindowState* window1_state = wm::GetWindowState(window1.get());
554 window1_state->Activate();
555
556 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT);
557 gfx::Rect normal_bounds = window1_state->GetRestoreBoundsInParent();
558 gfx::Rect expected_bounds = wm::GetDefaultLeftSnappedWindowBoundsInParent(
559 WmWindow::Get(window1.get()));
560 EXPECT_EQ(expected_bounds.ToString(), window1->bounds().ToString());
561 EXPECT_TRUE(window1_state->IsSnapped());
562 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT);
563 EXPECT_FALSE(window1_state->IsNormalOrSnapped());
564 EXPECT_TRUE(window1_state->IsDocked());
565 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT);
566 EXPECT_FALSE(window1_state->IsDocked());
567 EXPECT_EQ(normal_bounds.ToString(), window1->bounds().ToString());
568 }
569
570 TEST_F(EnabledDockedWindowsAcceleratorControllerTest,
571 WindowSnapRightDockRightRestore) {
572 std::unique_ptr<aura::Window> window0(
573 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
574 std::unique_ptr<aura::Window> window1(
575 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
576
577 wm::WindowState* window1_state = wm::GetWindowState(window1.get());
578 window1_state->Activate();
579
580 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_RIGHT);
581 gfx::Rect normal_bounds = window1_state->GetRestoreBoundsInParent();
582 gfx::Rect expected_bounds = wm::GetDefaultRightSnappedWindowBoundsInParent(
583 WmWindow::Get(window1.get()));
584 EXPECT_EQ(expected_bounds.ToString(), window1->bounds().ToString());
585 EXPECT_TRUE(window1_state->IsSnapped());
586 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_RIGHT);
587 EXPECT_FALSE(window1_state->IsNormalOrSnapped());
588 EXPECT_TRUE(window1_state->IsDocked());
589 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_RIGHT);
590 EXPECT_FALSE(window1_state->IsDocked());
591 EXPECT_EQ(normal_bounds.ToString(), window1->bounds().ToString());
592 }
593
594 TEST_F(EnabledDockedWindowsAcceleratorControllerTest,
595 WindowSnapLeftDockLeftSnapRight) {
596 std::unique_ptr<aura::Window> window0(
597 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
598 std::unique_ptr<aura::Window> window1(
599 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
600
601 wm::WindowState* window1_state = wm::GetWindowState(window1.get());
602 window1_state->Activate();
603
604 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT);
605 gfx::Rect expected_bounds = wm::GetDefaultLeftSnappedWindowBoundsInParent(
606 WmWindow::Get(window1.get()));
607 gfx::Rect expected_bounds2 = wm::GetDefaultRightSnappedWindowBoundsInParent(
608 WmWindow::Get(window1.get()));
609 EXPECT_EQ(expected_bounds.ToString(), window1->bounds().ToString());
610 EXPECT_TRUE(window1_state->IsSnapped());
611 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT);
612 EXPECT_FALSE(window1_state->IsNormalOrSnapped());
613 EXPECT_TRUE(window1_state->IsDocked());
614 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_RIGHT);
615 EXPECT_FALSE(window1_state->IsDocked());
616 EXPECT_TRUE(window1_state->IsSnapped());
617 EXPECT_EQ(expected_bounds2.ToString(), window1->bounds().ToString());
618 }
619
620 TEST_F(EnabledDockedWindowsAcceleratorControllerTest,
621 WindowDockLeftMinimizeWindowWithRestore) {
622 std::unique_ptr<aura::Window> window0(
623 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
624 std::unique_ptr<aura::Window> window1(
625 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
626
627 wm::WindowState* window1_state = wm::GetWindowState(window1.get());
628 window1_state->Activate();
629
630 std::unique_ptr<aura::Window> window2(
631 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
632
633 wm::WindowState* window2_state = wm::GetWindowState(window2.get());
634
635 std::unique_ptr<aura::Window> window3(
636 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
637
638 wm::WindowState* window3_state = wm::GetWindowState(window3.get());
639 window3_state->Activate();
640
641 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT);
642 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT);
643 gfx::Rect window3_docked_bounds = window3->bounds();
644
645 window2_state->Activate();
646 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT);
647 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT);
648 window1_state->Activate();
649 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT);
650 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT);
651
652 EXPECT_TRUE(window3_state->IsDocked());
653 EXPECT_TRUE(window2_state->IsDocked());
654 EXPECT_TRUE(window1_state->IsDocked());
655 EXPECT_TRUE(window3_state->IsMinimized());
656
657 window1_state->Activate();
658 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT);
659 window2_state->Activate();
660 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT);
661 window3_state->Unminimize();
662 EXPECT_FALSE(window1_state->IsDocked());
663 EXPECT_FALSE(window2_state->IsDocked());
664 EXPECT_TRUE(window3_state->IsDocked());
665 EXPECT_EQ(window3_docked_bounds.ToString(), window3->bounds().ToString());
666 }
667
668 TEST_F(EnabledDockedWindowsAcceleratorControllerTest,
669 WindowPanelDockLeftDockRightRestore) {
670 std::unique_ptr<aura::Window> window0(
671 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
672
673 std::unique_ptr<aura::Window> window(CreatePanel());
674 wm::WindowState* window_state = wm::GetWindowState(window.get());
675 window_state->Activate();
676
677 gfx::Rect window_restore_bounds2 = window->bounds();
678 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT);
679 gfx::Rect expected_bounds = wm::GetDefaultLeftSnappedWindowBoundsInParent(
680 WmWindow::Get(window.get()));
681 gfx::Rect window_restore_bounds = window_state->GetRestoreBoundsInScreen();
682 EXPECT_NE(expected_bounds.ToString(), window->bounds().ToString());
683 EXPECT_FALSE(window_state->IsSnapped());
684 EXPECT_FALSE(window_state->IsNormalOrSnapped());
685 EXPECT_TRUE(window_state->IsDocked());
686 window_state->Restore();
687 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_RIGHT);
688 EXPECT_TRUE(window_state->IsDocked());
689 GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_RIGHT);
690 EXPECT_FALSE(window_state->IsDocked());
691 EXPECT_EQ(window_restore_bounds.ToString(),
692 window_restore_bounds2.ToString());
693 EXPECT_EQ(window_restore_bounds.ToString(), window->bounds().ToString());
694 }
695
696 TEST_F(EnabledDockedWindowsAcceleratorControllerTest, CenterWindowAccelerator) {
697 std::unique_ptr<aura::Window> window(
698 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
699 wm::WindowState* window_state = wm::GetWindowState(window.get());
700 window_state->Activate();
701
702 // Center the window using accelerator.
703 GetController()->PerformActionIfEnabled(WINDOW_POSITION_CENTER);
704 gfx::Rect work_area = display::Screen::GetScreen()
705 ->GetDisplayNearestWindow(window.get())
706 .work_area();
707 gfx::Rect bounds = window->GetBoundsInScreen();
708 EXPECT_NEAR(bounds.x() - work_area.x(), work_area.right() - bounds.right(),
709 1);
710 EXPECT_NEAR(bounds.y() - work_area.y(), work_area.bottom() - bounds.bottom(),
711 1);
712
713 // Add the window to docked container and try to center it.
714 window->SetBounds(gfx::Rect(0, 0, 20, 20));
715 const wm::WMEvent event(wm::WM_EVENT_DOCK);
716 wm::GetWindowState(window.get())->OnWMEvent(&event);
717 EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id());
718
719 gfx::Rect docked_bounds = window->GetBoundsInScreen();
720 GetController()->PerformActionIfEnabled(WINDOW_POSITION_CENTER);
721 // It should not get centered and should remain docked.
722 EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id());
723 EXPECT_EQ(docked_bounds.ToString(), window->GetBoundsInScreen().ToString());
724 }
725
726 TEST_F(AcceleratorControllerTest, AutoRepeat) { 525 TEST_F(AcceleratorControllerTest, AutoRepeat) {
727 ui::Accelerator accelerator_a(ui::VKEY_A, ui::EF_CONTROL_DOWN); 526 ui::Accelerator accelerator_a(ui::VKEY_A, ui::EF_CONTROL_DOWN);
728 accelerator_a.set_type(ui::ET_KEY_PRESSED); 527 accelerator_a.set_type(ui::ET_KEY_PRESSED);
729 TestTarget target_a; 528 TestTarget target_a;
730 GetController()->Register({accelerator_a}, &target_a); 529 GetController()->Register({accelerator_a}, &target_a);
731 ui::Accelerator accelerator_b(ui::VKEY_B, ui::EF_CONTROL_DOWN); 530 ui::Accelerator accelerator_b(ui::VKEY_B, ui::EF_CONTROL_DOWN);
732 accelerator_b.set_type(ui::ET_KEY_PRESSED); 531 accelerator_b.set_type(ui::ET_KEY_PRESSED);
733 TestTarget target_b; 532 TestTarget target_b;
734 GetController()->Register({accelerator_b}, &target_b); 533 GetController()->Register({accelerator_b}, &target_b);
735 534
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
1525 // Expect no notifications from the new accelerators. 1324 // Expect no notifications from the new accelerators.
1526 EXPECT_TRUE(IsMessageCenterEmpty()); 1325 EXPECT_TRUE(IsMessageCenterEmpty());
1527 1326
1528 // If the action is LOCK_SCREEN, we must reset the state by unlocking the 1327 // If the action is LOCK_SCREEN, we must reset the state by unlocking the
1529 // screen before we proceed testing the rest of accelerators. 1328 // screen before we proceed testing the rest of accelerators.
1530 ResetStateIfNeeded(); 1329 ResetStateIfNeeded();
1531 } 1330 }
1532 } 1331 }
1533 1332
1534 } // namespace ash 1333 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698