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

Side by Side Diff: chromeos/ime/xkeyboard_unittest.cc

Issue 14200032: Decouple l10n_util from InputMethodUtil. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: /MockInputMethodDelegate/FakeInputMethodDelegate/ Created 7 years, 8 months 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 | « chromeos/ime/mock_input_method_delegate.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop.h"
14 #include "chromeos/ime/input_method_whitelist.h"
15 #include "chromeos/ime/mock_input_method_delegate.h"
16 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
17 15
18 #include <X11/Xlib.h> 16 #include <X11/Xlib.h>
19 17
20 namespace chromeos { 18 namespace chromeos {
21 namespace input_method { 19 namespace input_method {
22 20
23 namespace { 21 namespace {
24 22
25 class XKeyboardTest : public testing::Test { 23 class XKeyboardTest : public testing::Test {
26 public: 24 public:
27 XKeyboardTest() { 25 XKeyboardTest() {
28 } 26 }
29 27
30 virtual void SetUp() { 28 virtual void SetUp() {
31 xkey_.reset(XKeyboard::Create()); 29 xkey_.reset(XKeyboard::Create());
32 } 30 }
33 31
34 virtual void TearDown() { 32 virtual void TearDown() {
35 xkey_.reset(); 33 xkey_.reset();
36 } 34 }
37 35
38 InputMethodWhitelist whitelist_;
39 scoped_ptr<XKeyboard> xkey_; 36 scoped_ptr<XKeyboard> xkey_;
40 37
41 MessageLoopForUI message_loop_; 38 MessageLoopForUI message_loop_;
42 }; 39 };
43 40
44 // Returns true if X display is available. 41 // Returns true if X display is available.
45 bool DisplayAvailable() { 42 bool DisplayAvailable() {
46 return (base::MessagePumpForUI::GetDefaultXDisplay() != NULL); 43 return (base::MessagePumpForUI::GetDefaultXDisplay() != NULL);
47 } 44 }
48 45
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 201
205 // Restore the initial state. 202 // Restore the initial state.
206 EXPECT_TRUE(XKeyboard::SetAutoRepeatRate(rate)); 203 EXPECT_TRUE(XKeyboard::SetAutoRepeatRate(rate));
207 EXPECT_TRUE(XKeyboard::GetAutoRepeatRateForTesting(&tmp)); 204 EXPECT_TRUE(XKeyboard::GetAutoRepeatRateForTesting(&tmp));
208 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);
209 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);
210 } 207 }
211 208
212 } // namespace input_method 209 } // namespace input_method
213 } // namespace chromeos 210 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/ime/mock_input_method_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698