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

Side by Side Diff: ui/base/ime/input_method_chromeos_unittest.cc

Issue 2298123003: Using input language instead of the application locale to determine the Omnibox's text input type o… (Closed)
Patch Set: fix compiling errors in mus. Created 4 years, 3 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
« no previous file with comments | « ui/base/ime/input_method_chromeos.cc ('k') | ui/base/ime/input_method_mac.h » ('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 2014 The Chromium Authors. All rights reserved. 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 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/base/ime/input_method_chromeos.h" 5 #include "ui/base/ime/input_method_chromeos.h"
6 6
7 #include <X11/Xlib.h> 7 #include <X11/Xlib.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 std::unique_ptr<chromeos::MockIMECandidateWindowHandler> 337 std::unique_ptr<chromeos::MockIMECandidateWindowHandler>
338 mock_ime_candidate_window_handler_; 338 mock_ime_candidate_window_handler_;
339 339
340 bool stop_propagation_post_ime_; 340 bool stop_propagation_post_ime_;
341 341
342 DISALLOW_COPY_AND_ASSIGN(InputMethodChromeOSTest); 342 DISALLOW_COPY_AND_ASSIGN(InputMethodChromeOSTest);
343 }; 343 };
344 344
345 // Tests public APIs in ui::InputMethod first. 345 // Tests public APIs in ui::InputMethod first.
346 346
347 TEST_F(InputMethodChromeOSTest, GetInputLocale) {
348 // ui::InputMethodChromeOS does not support the API.
349 EXPECT_EQ("", ime_->GetInputLocale());
350 }
351
352 TEST_F(InputMethodChromeOSTest, GetInputTextType) { 347 TEST_F(InputMethodChromeOSTest, GetInputTextType) {
353 EXPECT_EQ(TEXT_INPUT_TYPE_NONE, ime_->GetTextInputType()); 348 EXPECT_EQ(TEXT_INPUT_TYPE_NONE, ime_->GetTextInputType());
354 input_type_ = TEXT_INPUT_TYPE_PASSWORD; 349 input_type_ = TEXT_INPUT_TYPE_PASSWORD;
355 ime_->OnTextInputTypeChanged(this); 350 ime_->OnTextInputTypeChanged(this);
356 EXPECT_EQ(TEXT_INPUT_TYPE_PASSWORD, ime_->GetTextInputType()); 351 EXPECT_EQ(TEXT_INPUT_TYPE_PASSWORD, ime_->GetTextInputType());
357 input_type_ = TEXT_INPUT_TYPE_TEXT; 352 input_type_ = TEXT_INPUT_TYPE_TEXT;
358 ime_->OnTextInputTypeChanged(this); 353 ime_->OnTextInputTypeChanged(this);
359 EXPECT_EQ(TEXT_INPUT_TYPE_TEXT, ime_->GetTextInputType()); 354 EXPECT_EQ(TEXT_INPUT_TYPE_TEXT, ime_->GetTextInputType());
360 } 355 }
361 356
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 964
970 EXPECT_EQ(ET_KEY_PRESSED, key_event.type()); 965 EXPECT_EQ(ET_KEY_PRESSED, key_event.type());
971 EXPECT_EQ(VKEY_PROCESSKEY, key_event.key_code()); 966 EXPECT_EQ(VKEY_PROCESSKEY, key_event.key_code());
972 EXPECT_EQ(eventA.code(), key_event.code()); 967 EXPECT_EQ(eventA.code(), key_event.code());
973 EXPECT_EQ(eventA.flags(), key_event.flags()); 968 EXPECT_EQ(eventA.flags(), key_event.flags());
974 EXPECT_EQ(eventA.GetDomKey(), key_event.GetDomKey()); 969 EXPECT_EQ(eventA.GetDomKey(), key_event.GetDomKey());
975 EXPECT_EQ(eventA.time_stamp(), key_event.time_stamp()); 970 EXPECT_EQ(eventA.time_stamp(), key_event.time_stamp());
976 } 971 }
977 972
978 } // namespace ui 973 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_chromeos.cc ('k') | ui/base/ime/input_method_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698