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

Side by Side Diff: ash/root_window_controller_unittest.cc

Issue 617553002: Fix size and position of the virtual keyboard after a screen rotation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable display rotation test on Windows. Created 6 years, 2 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/root_window_controller.cc ('k') | ash/wm/virtual_keyboard_container_layout_manager.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/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
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
OLDNEW
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/wm/virtual_keyboard_container_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698