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/session_state_delegate.h" | 7 #include "ash/session/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 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
937 generator.MoveMouseTo(right, bottom); | 937 generator.MoveMouseTo(right, bottom); |
938 generator.ClickLeftButton(); | 938 generator.ClickLeftButton(); |
939 EXPECT_EQ(2, menu_handler.num_mouse_events()); | 939 EXPECT_EQ(2, menu_handler.num_mouse_events()); |
940 | 940 |
941 // Cleanup to ensure that the test windows are destroyed before their | 941 // Cleanup to ensure that the test windows are destroyed before their |
942 // delegates. | 942 // delegates. |
943 normal.reset(); | 943 normal.reset(); |
944 menu.reset(); | 944 menu.reset(); |
945 } | 945 } |
946 | 946 |
947 // Tests that the virtual keyboard correctly resizes with a change to display | |
948 // orientation. See crbug/417612. | |
949 TEST_F(VirtualKeyboardRootWindowControllerTest, DisplayRotation) { | |
950 UpdateDisplay("800x600"); | |
951 aura::Window* root_window = Shell::GetPrimaryRootWindow(); | |
952 aura::Window* keyboard_container = | |
953 Shell::GetContainer(root_window, kShellWindowId_VirtualKeyboardContainer); | |
954 ASSERT_TRUE(keyboard_container); | |
955 keyboard_container->Show(); | |
956 ASSERT_EQ("0,0 800x600", keyboard_container->bounds().ToString()); | |
James Cook
2014/09/29 21:38:00
nit: EXPECT_EQ since the test can proceed even if
| |
957 | |
958 UpdateDisplay("600x800"); | |
959 ASSERT_EQ("0,0 600x800", keyboard_container->bounds().ToString()); | |
960 } | |
James Cook
2014/09/29 21:38:00
nice easy-to-read test
| |
961 | |
947 } // namespace test | 962 } // namespace test |
948 } // namespace ash | 963 } // namespace ash |
OLD | NEW |