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

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

Issue 47873003: Add a full screen virtual keyboard to virtual keyboard root window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 CommandLine::ForCurrentProcess()->AppendSwitchASCII(
27 switches::kAshHostWindowBounds, "1+1-300x300,1+301-300x300");
28 CommandLine::ForCurrentProcess()->AppendSwitch(
29 keyboard::switches::kKeyboardUsabilityExperiment);
30 test::AshTestBase::SetUp();
31 }
32
33 void set_virtual_keyboard_window_controller(
34 internal::VirtualKeyboardWindowController* controller) {
35 virtual_keyboard_window_controller_ = controller;
36 }
37
38 internal::RootWindowController* root_window_controller() {
39 return virtual_keyboard_window_controller_->
40 root_window_controller_for_test();
41 }
42
43 private:
44 internal::VirtualKeyboardWindowController*
45 virtual_keyboard_window_controller_;
46 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardWindowControllerTest);
47 };
48
49
50 TEST_F(VirtualKeyboardWindowControllerTest, VirtualKeyboardWindowTest) {
51 if (!SupportsMultipleDisplays())
52 return;
53 RunAllPendingInMessageLoop();
54 set_virtual_keyboard_window_controller(
55 Shell::GetInstance()->display_controller()->
56 virtual_keyboard_window_controller());
57 EXPECT_TRUE(root_window_controller());
58 // Keyboard container is added to virtual keyboard window.
59 EXPECT_TRUE(root_window_controller()->GetContainer(
60 internal::kShellWindowId_VirtualKeyboardContainer));
61 }
62
63 } // namespace test
64 } // 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