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

Side by Side Diff: ash/root_window_controller_unittest.cc

Issue 2618143002: cros: Remove some OS platform ifdefs from ash (Closed)
Patch Set: rebase Created 3 years, 11 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/shelf/shelf_layout_manager_unittest.cc » ('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 <memory> 7 #include <memory>
8 8
9 #include "ash/aura/wm_window_aura.h" 9 #include "ash/aura/wm_window_aura.h"
10 #include "ash/common/material_design/material_design_controller.h" 10 #include "ash/common/material_design/material_design_controller.h"
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 generator.MoveMouseTo(right, bottom); 1229 generator.MoveMouseTo(right, bottom);
1230 generator.ClickLeftButton(); 1230 generator.ClickLeftButton();
1231 EXPECT_EQ(2, menu_handler.num_mouse_events()); 1231 EXPECT_EQ(2, menu_handler.num_mouse_events());
1232 1232
1233 // Cleanup to ensure that the test windows are destroyed before their 1233 // Cleanup to ensure that the test windows are destroyed before their
1234 // delegates. 1234 // delegates.
1235 normal.reset(); 1235 normal.reset();
1236 menu.reset(); 1236 menu.reset();
1237 } 1237 }
1238 1238
1239 // Resolution in UpdateDisplay is not being respected on Windows 8.
1240 #if defined(OS_WIN)
1241 #define MAYBE_DisplayRotation DISABLED_DisplayRotation
1242 #else
1243 #define MAYBE_DisplayRotation DisplayRotation
1244 #endif
1245
1246 // Tests that the virtual keyboard correctly resizes with a change to display 1239 // Tests that the virtual keyboard correctly resizes with a change to display
1247 // orientation. See crbug/417612. 1240 // orientation. See crbug/417612.
1248 TEST_F(VirtualKeyboardRootWindowControllerTest, MAYBE_DisplayRotation) { 1241 TEST_F(VirtualKeyboardRootWindowControllerTest, DisplayRotation) {
1249 UpdateDisplay("800x600"); 1242 UpdateDisplay("800x600");
1250 aura::Window* root_window = Shell::GetPrimaryRootWindow(); 1243 aura::Window* root_window = Shell::GetPrimaryRootWindow();
1251 aura::Window* keyboard_container = 1244 aura::Window* keyboard_container =
1252 Shell::GetContainer(root_window, kShellWindowId_VirtualKeyboardContainer); 1245 Shell::GetContainer(root_window, kShellWindowId_VirtualKeyboardContainer);
1253 ASSERT_TRUE(keyboard_container); 1246 ASSERT_TRUE(keyboard_container);
1254 keyboard::KeyboardController* keyboard_controller = 1247 keyboard::KeyboardController* keyboard_controller =
1255 keyboard::KeyboardController::GetInstance(); 1248 keyboard::KeyboardController::GetInstance();
1256 keyboard_controller->ShowKeyboard(false); 1249 keyboard_controller->ShowKeyboard(false);
1257 keyboard_controller->ui()->GetKeyboardWindow()->SetBounds( 1250 keyboard_controller->ui()->GetKeyboardWindow()->SetBounds(
1258 gfx::Rect(0, 400, 800, 200)); 1251 gfx::Rect(0, 400, 800, 200));
1259 EXPECT_EQ("0,400 800x200", keyboard_container->bounds().ToString()); 1252 EXPECT_EQ("0,400 800x200", keyboard_container->bounds().ToString());
1260 1253
1261 UpdateDisplay("600x800"); 1254 UpdateDisplay("600x800");
1262 EXPECT_EQ("0,600 600x200", keyboard_container->bounds().ToString()); 1255 EXPECT_EQ("0,600 600x200", keyboard_container->bounds().ToString());
1263 } 1256 }
1264 1257
1265 } // namespace test 1258 } // namespace test
1266 } // namespace ash 1259 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/shelf/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698