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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/cros_language_options_handler_unittest.cc

Issue 22980018: Disable non Latin keyboard layout on Lock screen and Sign-in screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo Created 7 years, 4 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
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/ui/webui/options/language_options_handler.h" 5 #include "chrome/browser/ui/webui/options/language_options_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" 10 #include "chrome/browser/chromeos/input_method/input_method_configuration.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 const std::string& raw_layout, 43 const std::string& raw_layout,
44 const std::string& language_code) { 44 const std::string& language_code) {
45 std::vector<std::string> layouts; 45 std::vector<std::string> layouts;
46 layouts.push_back(raw_layout); 46 layouts.push_back(raw_layout);
47 std::vector<std::string> languages; 47 std::vector<std::string> languages;
48 languages.push_back(language_code); 48 languages.push_back(language_code);
49 return InputMethodDescriptor(id, 49 return InputMethodDescriptor(id,
50 "", // name 50 "", // name
51 layouts, 51 layouts,
52 languages, 52 languages,
53 true,
Nikita (slow) 2013/08/22 14:39:57 nit: Please add comment for boolean value.
Seigo Nonaka 2013/08/24 07:57:02 Done.
53 GURL()); // options page url 54 GURL()); // options page url
54 } 55 }
55 }; 56 };
56 57
57 } // namespace 58 } // namespace
58 59
59 TEST_F(CrosLanguageOptionsHandlerTest, GetInputMethodList) { 60 TEST_F(CrosLanguageOptionsHandlerTest, GetInputMethodList) {
60 InputMethodDescriptors descriptors = CreateInputMethodDescriptors(); 61 InputMethodDescriptors descriptors = CreateInputMethodDescriptors();
61 scoped_ptr<ListValue> list( 62 scoped_ptr<ListValue> list(
62 chromeos::options::CrosLanguageOptionsHandler::GetInputMethodList( 63 chromeos::options::CrosLanguageOptionsHandler::GetInputMethodList(
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 for (size_t i = 0; i < list->GetSize(); ++i) { 119 for (size_t i = 0; i < list->GetSize(); ++i) {
119 base::DictionaryValue* dict; 120 base::DictionaryValue* dict;
120 ASSERT_TRUE(list->GetDictionary(i, &dict)); 121 ASSERT_TRUE(list->GetDictionary(i, &dict));
121 std::string code; 122 std::string code;
122 ASSERT_TRUE(dict->GetString("code", &code)); 123 ASSERT_TRUE(dict->GetString("code", &code));
123 EXPECT_NE("is", code) 124 EXPECT_NE("is", code)
124 << "Icelandic is an example language which has input method " 125 << "Icelandic is an example language which has input method "
125 << "but can't use it as UI language."; 126 << "but can't use it as UI language.";
126 } 127 }
127 } 128 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698