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

Side by Side Diff: ash/display/virtual_keyboard_window_controller_unittest.cc

Issue 62833010: Reland "Add a full screen virtual keyboard to virtual keyboard root window" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: format nit. The main change is patchset 2 Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « ash/display/virtual_keyboard_window_controller.cc ('k') | ash/keyboard_controller_proxy_stub.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ash/display/virtual_keyboard_window_controller.h"
6
7 #include "ash/ash_switches.h"
8 #include "ash/display/display_controller.h"
9 #include "ash/root_window_controller.h"
10 #include "ash/shell.h"
11 #include "ash/shell_window_ids.h"
12 #include "ash/test/ash_test_base.h"
13 #include "base/command_line.h"
14 #include "ui/keyboard/keyboard_switches.h"
15
16 namespace ash {
17 namespace test {
18
19 class VirtualKeyboardWindowControllerTest : public AshTestBase {
20 public:
21 VirtualKeyboardWindowControllerTest()
22 : virtual_keyboard_window_controller_(NULL) {}
23 virtual ~VirtualKeyboardWindowControllerTest() {}
24
25 virtual void SetUp() OVERRIDE {
26 if (SupportsMultipleDisplays()) {
27 CommandLine::ForCurrentProcess()->AppendSwitchASCII(
28 switches::kAshHostWindowBounds, "1+1-300x300,1+301-300x300");
29 CommandLine::ForCurrentProcess()->AppendSwitch(
30 keyboard::switches::kKeyboardUsabilityExperiment);
31 }
32 test::AshTestBase::SetUp();
33 }
34
35 void set_virtual_keyboard_window_controller(
36 internal::VirtualKeyboardWindowController* controller) {
37 virtual_keyboard_window_controller_ = controller;
38 }
39
40 internal::RootWindowController* root_window_controller() {
41 return virtual_keyboard_window_controller_->
42 root_window_controller_for_test();
43 }
44
45 private:
46 internal::VirtualKeyboardWindowController*
47 virtual_keyboard_window_controller_;
48 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardWindowControllerTest);
49 };
50
51
52 TEST_F(VirtualKeyboardWindowControllerTest, VirtualKeyboardWindowTest) {
53 if (!SupportsMultipleDisplays())
54 return;
55 RunAllPendingInMessageLoop();
56 set_virtual_keyboard_window_controller(
57 Shell::GetInstance()->display_controller()->
58 virtual_keyboard_window_controller());
59 EXPECT_TRUE(root_window_controller());
60 // Keyboard container is added to virtual keyboard window.
61 EXPECT_TRUE(root_window_controller()->GetContainer(
62 internal::kShellWindowId_VirtualKeyboardContainer));
63 }
64
65 } // namespace test
66 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/virtual_keyboard_window_controller.cc ('k') | ash/keyboard_controller_proxy_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698