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

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

Issue 13949015: Supporting multiple keyboard layouts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing comment 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
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 25 matching lines...) Expand all
36 descriptors.push_back(GetDesc("xkb:be::fra", "be", "fr")); 36 descriptors.push_back(GetDesc("xkb:be::fra", "be", "fr"));
37 descriptors.push_back(GetDesc("xkb:is::ice", "is", "is")); 37 descriptors.push_back(GetDesc("xkb:is::ice", "is", "is"));
38 descriptors.push_back(GetDesc("mozc", "us", "ja")); 38 descriptors.push_back(GetDesc("mozc", "us", "ja"));
39 return descriptors; 39 return descriptors;
40 } 40 }
41 41
42 private: 42 private:
43 InputMethodDescriptor GetDesc(const std::string& id, 43 InputMethodDescriptor GetDesc(const std::string& id,
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;
47 layouts.push_back(raw_layout);
46 return InputMethodDescriptor(id, 48 return InputMethodDescriptor(id,
47 "", // name 49 "", // name
48 raw_layout, 50 layouts,
49 language_code, 51 language_code,
50 ""); // options page url 52 ""); // options page url
51 } 53 }
52 }; 54 };
53 55
54 } // namespace 56 } // namespace
55 57
56 TEST_F(CrosLanguageOptionsHandlerTest, GetInputMethodList) { 58 TEST_F(CrosLanguageOptionsHandlerTest, GetInputMethodList) {
57 InputMethodDescriptors descriptors = CreateInputMethodDescriptors(); 59 InputMethodDescriptors descriptors = CreateInputMethodDescriptors();
58 scoped_ptr<ListValue> list( 60 scoped_ptr<ListValue> list(
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 for (size_t i = 0; i < list->GetSize(); ++i) { 128 for (size_t i = 0; i < list->GetSize(); ++i) {
127 base::DictionaryValue* dict; 129 base::DictionaryValue* dict;
128 ASSERT_TRUE(list->GetDictionary(i, &dict)); 130 ASSERT_TRUE(list->GetDictionary(i, &dict));
129 std::string code; 131 std::string code;
130 ASSERT_TRUE(dict->GetString("code", &code)); 132 ASSERT_TRUE(dict->GetString("code", &code));
131 EXPECT_NE("is", code) 133 EXPECT_NE("is", code)
132 << "Icelandic is an example language which has input method " 134 << "Icelandic is an example language which has input method "
133 << "but can't use it as UI language."; 135 << "but can't use it as UI language.";
134 } 136 }
135 } 137 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/input_method/mock_input_method_manager.cc ('k') | chromeos/ime/component_extension_ime_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698