OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 "chromeos/ime/xkeyboard.h" | 5 #include "chromeos/ime/xkeyboard.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 virtual void SetUp() { | 28 virtual void SetUp() { |
29 xkey_.reset(XKeyboard::Create()); | 29 xkey_.reset(XKeyboard::Create()); |
30 } | 30 } |
31 | 31 |
32 virtual void TearDown() { | 32 virtual void TearDown() { |
33 xkey_.reset(); | 33 xkey_.reset(); |
34 } | 34 } |
35 | 35 |
36 scoped_ptr<XKeyboard> xkey_; | 36 scoped_ptr<XKeyboard> xkey_; |
37 | 37 |
38 MessageLoopForUI message_loop_; | 38 base::MessageLoopForUI message_loop_; |
39 }; | 39 }; |
40 | 40 |
41 // Returns true if X display is available. | 41 // Returns true if X display is available. |
42 bool DisplayAvailable() { | 42 bool DisplayAvailable() { |
43 return (base::MessagePumpForUI::GetDefaultXDisplay() != NULL); | 43 return (base::MessagePumpForUI::GetDefaultXDisplay() != NULL); |
44 } | 44 } |
45 | 45 |
46 } // namespace | 46 } // namespace |
47 | 47 |
48 // Tests CheckLayoutName() function. | 48 // Tests CheckLayoutName() function. |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 | 201 |
202 // Restore the initial state. | 202 // Restore the initial state. |
203 EXPECT_TRUE(XKeyboard::SetAutoRepeatRate(rate)); | 203 EXPECT_TRUE(XKeyboard::SetAutoRepeatRate(rate)); |
204 EXPECT_TRUE(XKeyboard::GetAutoRepeatRateForTesting(&tmp)); | 204 EXPECT_TRUE(XKeyboard::GetAutoRepeatRateForTesting(&tmp)); |
205 EXPECT_EQ(rate.initial_delay_in_ms, tmp.initial_delay_in_ms); | 205 EXPECT_EQ(rate.initial_delay_in_ms, tmp.initial_delay_in_ms); |
206 EXPECT_EQ(rate.repeat_interval_in_ms, tmp.repeat_interval_in_ms); | 206 EXPECT_EQ(rate.repeat_interval_in_ms, tmp.repeat_interval_in_ms); |
207 } | 207 } |
208 | 208 |
209 } // namespace input_method | 209 } // namespace input_method |
210 } // namespace chromeos | 210 } // namespace chromeos |
OLD | NEW |