| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 "ui/keyboard/keyboard_util.h" | 5 #include "ui/keyboard/keyboard_util.h" |
| 6 | 6 |
| 7 #include "base/macros.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 8 | 9 |
| 9 namespace keyboard { | 10 namespace keyboard { |
| 10 | 11 |
| 11 class KeyboardUtilTest : public testing::Test { | 12 class KeyboardUtilTest : public testing::Test { |
| 12 public: | 13 public: |
| 13 KeyboardUtilTest() {} | 14 KeyboardUtilTest() {} |
| 14 ~KeyboardUtilTest() override {} | 15 ~KeyboardUtilTest() override {} |
| 15 | 16 |
| 16 // Sets all flags controlling whether the keyboard should be shown to | 17 // Sets all flags controlling whether the keyboard should be shown to |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 // SetTouchKeyboardEnabled has the lowest priority, but should still work when | 107 // SetTouchKeyboardEnabled has the lowest priority, but should still work when |
| 107 // none of the other flags are enabled. | 108 // none of the other flags are enabled. |
| 108 TEST_F(KeyboardUtilTest, HideKeyboardWhenTouchEnabled) { | 109 TEST_F(KeyboardUtilTest, HideKeyboardWhenTouchEnabled) { |
| 109 ResetAllFlags(); | 110 ResetAllFlags(); |
| 110 ASSERT_FALSE(keyboard::IsKeyboardEnabled()); | 111 ASSERT_FALSE(keyboard::IsKeyboardEnabled()); |
| 111 keyboard::SetTouchKeyboardEnabled(true); | 112 keyboard::SetTouchKeyboardEnabled(true); |
| 112 ASSERT_TRUE(keyboard::IsKeyboardEnabled()); | 113 ASSERT_TRUE(keyboard::IsKeyboardEnabled()); |
| 113 } | 114 } |
| 114 | 115 |
| 115 } // namespace keyboard | 116 } // namespace keyboard |
| OLD | NEW |