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

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: 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 const std::string& raw_layout, 44 const std::string& raw_layout,
45 const std::string& language_code) { 45 const std::string& language_code) {
46 std::vector<std::string> layouts; 46 std::vector<std::string> layouts;
47 layouts.push_back(raw_layout); 47 layouts.push_back(raw_layout);
48 std::vector<std::string> languages; 48 std::vector<std::string> languages;
49 languages.push_back(language_code); 49 languages.push_back(language_code);
50 return InputMethodDescriptor(id, 50 return InputMethodDescriptor(id,
51 "", // name 51 "", // name
52 layouts, 52 layouts,
53 languages, 53 languages,
54 true,
54 GURL()); // options page url 55 GURL()); // options page url
55 } 56 }
56 }; 57 };
57 58
58 } // namespace 59 } // namespace
59 60
60 TEST_F(CrosLanguageOptionsHandlerTest, GetInputMethodList) { 61 TEST_F(CrosLanguageOptionsHandlerTest, GetInputMethodList) {
61 InputMethodDescriptors descriptors = CreateInputMethodDescriptors(); 62 InputMethodDescriptors descriptors = CreateInputMethodDescriptors();
62 scoped_ptr<ListValue> list( 63 scoped_ptr<ListValue> list(
63 chromeos::options::CrosLanguageOptionsHandler::GetInputMethodList( 64 chromeos::options::CrosLanguageOptionsHandler::GetInputMethodList(
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 for (size_t i = 0; i < list->GetSize(); ++i) { 131 for (size_t i = 0; i < list->GetSize(); ++i) {
131 base::DictionaryValue* dict; 132 base::DictionaryValue* dict;
132 ASSERT_TRUE(list->GetDictionary(i, &dict)); 133 ASSERT_TRUE(list->GetDictionary(i, &dict));
133 std::string code; 134 std::string code;
134 ASSERT_TRUE(dict->GetString("code", &code)); 135 ASSERT_TRUE(dict->GetString("code", &code));
135 EXPECT_NE("is", code) 136 EXPECT_NE("is", code)
136 << "Icelandic is an example language which has input method " 137 << "Icelandic is an example language which has input method "
137 << "but can't use it as UI language."; 138 << "but can't use it as UI language.";
138 } 139 }
139 } 140 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698