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

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: 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
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 // 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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698