Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / ash / virtual_keyboard_controller_unittest.cc
1 // Copyright 2014 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/virtual_keyboard_controller.h"
6
7 #include "ash/shell.h"
8 #include "ash/test/ash_test_base.h"
9 #include "ash/wm/maximize_mode/maximize_mode_controller.h"
10 #include "ui/keyboard/keyboard_util.h"
11
12 namespace ash {
13 namespace test {
14
15 typedef AshTestBase VirtualKeyboardControllerTest;
16
17 // Tests that the onscreen keyboard becomes enabled when maximize mode is
18 // enabled.
19 TEST_F(VirtualKeyboardControllerTest, EnabledDuringMaximizeMode) {
20   ASSERT_FALSE(keyboard::IsKeyboardEnabled());
21   Shell::GetInstance()->maximize_mode_controller()->
22       EnableMaximizeModeWindowManager(true);
23   EXPECT_TRUE(keyboard::IsKeyboardEnabled());
24   Shell::GetInstance()->maximize_mode_controller()->
25       EnableMaximizeModeWindowManager(false);
26   EXPECT_FALSE(keyboard::IsKeyboardEnabled());
27 }
28
29 }  // namespace test
30 }  // namespace ash