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

Side by Side Diff: chrome/browser/chromeos/input_method/xkeyboard_unittest.cc

Issue 11745025: Cleanup: Fix a bunch of lint errors in chrome. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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 | « no previous file | chrome/browser/sessions/session_service_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/input_method/xkeyboard.h" 5 #include "chrome/browser/chromeos/input_method/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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 InputMethodWhitelist whitelist_; 46 InputMethodWhitelist whitelist_;
47 InputMethodUtil util_; 47 InputMethodUtil util_;
48 scoped_ptr<XKeyboard> xkey_; 48 scoped_ptr<XKeyboard> xkey_;
49 49
50 MessageLoopForUI message_loop_; 50 MessageLoopForUI message_loop_;
51 content::TestBrowserThread ui_thread_; 51 content::TestBrowserThread ui_thread_;
52 }; 52 };
53 53
54 // Returns true if X display is available. 54 // Returns true if X display is available.
55 bool DisplayAvailable() { 55 bool DisplayAvailable() {
56 return ui::GetXDisplay() ? true : false; 56 return (ui::GetXDisplay() != NULL);
57 } 57 }
58 58
59 } // namespace 59 } // namespace
60 60
61 // Tests CheckLayoutName() function. 61 // Tests CheckLayoutName() function.
62 TEST_F(XKeyboardTest, TestCheckLayoutName) { 62 TEST_F(XKeyboardTest, TestCheckLayoutName) {
63 // CheckLayoutName should not accept non-alphanumeric characters 63 // CheckLayoutName should not accept non-alphanumeric characters
64 // except "()-_". 64 // except "()-_".
65 EXPECT_FALSE(XKeyboard::CheckLayoutNameForTesting("us!")); 65 EXPECT_FALSE(XKeyboard::CheckLayoutNameForTesting("us!"));
66 EXPECT_FALSE(XKeyboard::CheckLayoutNameForTesting("us; /bin/sh")); 66 EXPECT_FALSE(XKeyboard::CheckLayoutNameForTesting("us; /bin/sh"));
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 // Restore the initial state. 215 // Restore the initial state.
216 EXPECT_TRUE(XKeyboard::SetAutoRepeatRate(rate)); 216 EXPECT_TRUE(XKeyboard::SetAutoRepeatRate(rate));
217 EXPECT_TRUE(XKeyboard::GetAutoRepeatRateForTesting(&tmp)); 217 EXPECT_TRUE(XKeyboard::GetAutoRepeatRateForTesting(&tmp));
218 EXPECT_EQ(rate.initial_delay_in_ms, tmp.initial_delay_in_ms); 218 EXPECT_EQ(rate.initial_delay_in_ms, tmp.initial_delay_in_ms);
219 EXPECT_EQ(rate.repeat_interval_in_ms, tmp.repeat_interval_in_ms); 219 EXPECT_EQ(rate.repeat_interval_in_ms, tmp.repeat_interval_in_ms);
220 } 220 }
221 221
222 } // namespace input_method 222 } // namespace input_method
223 } // namespace chromeos 223 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sessions/session_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698