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 // Resolution in UpdateDisplay is not being respected on Windows 8. |
| 948 #if defined(OS_WIN) |
| 949 #define MAYBE_DisplayRotation DISABLED_DisplayRotation |
| 950 #else |
| 951 #define MAYBE_DisplayRotation DisplayRotation |
| 952 #endif |
| 953 |
| 954 // Tests that the virtual keyboard correctly resizes with a change to display |
| 955 // orientation. See crbug/417612. |
| 956 TEST_F(VirtualKeyboardRootWindowControllerTest, MAYBE_DisplayRotation) { |
| 957 UpdateDisplay("800x600"); |
| 958 aura::Window* root_window = Shell::GetPrimaryRootWindow(); |
| 959 aura::Window* keyboard_container = |
| 960 Shell::GetContainer(root_window, kShellWindowId_VirtualKeyboardContainer); |
| 961 ASSERT_TRUE(keyboard_container); |
| 962 keyboard_container->Show(); |
| 963 EXPECT_EQ("0,0 800x600", keyboard_container->bounds().ToString()); |
| 964 |
| 965 UpdateDisplay("600x800"); |
| 966 EXPECT_EQ("0,0 600x800", keyboard_container->bounds().ToString()); |
| 967 } |
| 968 |
947 } // namespace test | 969 } // namespace test |
948 } // namespace ash | 970 } // namespace ash |
OLD | NEW |