| OLD | NEW |
| 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/root_window_controller.h" | 5 #include "ash/root_window_controller.h" |
| 6 | 6 |
| 7 #include "ash/session_state_delegate.h" | 7 #include "ash/session_state_delegate.h" |
| 8 #include "ash/shelf/shelf_layout_manager.h" | 8 #include "ash/shelf/shelf_layout_manager.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 | 614 |
| 615 class VirtualKeyboardRootWindowControllerTest : public test::AshTestBase { | 615 class VirtualKeyboardRootWindowControllerTest : public test::AshTestBase { |
| 616 public: | 616 public: |
| 617 VirtualKeyboardRootWindowControllerTest() {}; | 617 VirtualKeyboardRootWindowControllerTest() {}; |
| 618 virtual ~VirtualKeyboardRootWindowControllerTest() {}; | 618 virtual ~VirtualKeyboardRootWindowControllerTest() {}; |
| 619 | 619 |
| 620 virtual void SetUp() OVERRIDE { | 620 virtual void SetUp() OVERRIDE { |
| 621 CommandLine::ForCurrentProcess()->AppendSwitch( | 621 CommandLine::ForCurrentProcess()->AppendSwitch( |
| 622 keyboard::switches::kEnableVirtualKeyboard); | 622 keyboard::switches::kEnableVirtualKeyboard); |
| 623 test::AshTestBase::SetUp(); | 623 test::AshTestBase::SetUp(); |
| 624 Shell::GetPrimaryRootWindowController()->ActivateKeyboard( |
| 625 Shell::GetInstance()->keyboard_controller()); |
| 624 } | 626 } |
| 625 | 627 |
| 626 private: | 628 private: |
| 627 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardRootWindowControllerTest); | 629 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardRootWindowControllerTest); |
| 628 }; | 630 }; |
| 629 | 631 |
| 630 // Test for http://crbug.com/297858. Virtual keyboard container should only show | 632 // Test for http://crbug.com/297858. Virtual keyboard container should only show |
| 631 // on primary root window. | 633 // on primary root window. |
| 632 TEST_F(VirtualKeyboardRootWindowControllerTest, | 634 TEST_F(VirtualKeyboardRootWindowControllerTest, |
| 633 VirtualKeyboardOnPrimaryRootWindowOnly) { | 635 VirtualKeyboardOnPrimaryRootWindowOnly) { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 aura::WindowTracker tracker; | 697 aura::WindowTracker tracker; |
| 696 tracker.Add(keyboard_container); | 698 tracker.Add(keyboard_container); |
| 697 // Mock a login state change to reinitialize the keyboard. | 699 // Mock a login state change to reinitialize the keyboard. |
| 698 ash::Shell::GetInstance()->OnLoginStateChanged(user::LOGGED_IN_OWNER); | 700 ash::Shell::GetInstance()->OnLoginStateChanged(user::LOGGED_IN_OWNER); |
| 699 // keyboard_container should no longer be present. | 701 // keyboard_container should no longer be present. |
| 700 EXPECT_FALSE(tracker.Contains(keyboard_container)); | 702 EXPECT_FALSE(tracker.Contains(keyboard_container)); |
| 701 } | 703 } |
| 702 | 704 |
| 703 } // namespace test | 705 } // namespace test |
| 704 } // namespace ash | 706 } // namespace ash |
| OLD | NEW |