OLD | NEW |
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 29 matching lines...) Expand all Loading... |
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 return InputMethodDescriptor(id, | 46 return InputMethodDescriptor(id, |
47 "", // name | 47 "", // name |
48 raw_layout, | 48 raw_layout, |
49 language_code, | 49 language_code, |
50 "", // options page url | 50 ""); // options page url |
51 false); | |
52 } | 51 } |
53 }; | 52 }; |
54 | 53 |
55 } // namespace | 54 } // namespace |
56 | 55 |
57 TEST_F(CrosLanguageOptionsHandlerTest, GetInputMethodList) { | 56 TEST_F(CrosLanguageOptionsHandlerTest, GetInputMethodList) { |
58 InputMethodDescriptors descriptors = CreateInputMethodDescriptors(); | 57 InputMethodDescriptors descriptors = CreateInputMethodDescriptors(); |
59 scoped_ptr<ListValue> list( | 58 scoped_ptr<ListValue> list( |
60 chromeos::options::CrosLanguageOptionsHandler::GetInputMethodList( | 59 chromeos::options::CrosLanguageOptionsHandler::GetInputMethodList( |
61 descriptors)); | 60 descriptors)); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 for (size_t i = 0; i < list->GetSize(); ++i) { | 126 for (size_t i = 0; i < list->GetSize(); ++i) { |
128 base::DictionaryValue* dict; | 127 base::DictionaryValue* dict; |
129 ASSERT_TRUE(list->GetDictionary(i, &dict)); | 128 ASSERT_TRUE(list->GetDictionary(i, &dict)); |
130 std::string code; | 129 std::string code; |
131 ASSERT_TRUE(dict->GetString("code", &code)); | 130 ASSERT_TRUE(dict->GetString("code", &code)); |
132 EXPECT_NE("is", code) | 131 EXPECT_NE("is", code) |
133 << "Icelandic is an example language which has input method " | 132 << "Icelandic is an example language which has input method " |
134 << "but can't use it as UI language."; | 133 << "but can't use it as UI language."; |
135 } | 134 } |
136 } | 135 } |
OLD | NEW |