| 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/options2/language_options_handler2.h" | 5 #include "chrome/browser/ui/webui/options2/language_options_handler2.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 return descriptors; | 40 return descriptors; |
| 41 } | 41 } |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 InputMethodDescriptor GetDesc(const std::string& id, | 44 InputMethodDescriptor GetDesc(const std::string& id, |
| 45 const std::string& raw_layout, | 45 const std::string& raw_layout, |
| 46 const std::string& language_code) { | 46 const std::string& language_code) { |
| 47 return InputMethodDescriptor(id, | 47 return InputMethodDescriptor(id, |
| 48 "", // name | 48 "", // name |
| 49 raw_layout, | 49 raw_layout, |
| 50 language_code); | 50 language_code, |
| 51 false); |
| 51 } | 52 } |
| 52 }; | 53 }; |
| 53 | 54 |
| 54 } // namespace | 55 } // namespace |
| 55 #else | 56 #else |
| 56 typedef testing::Test LanguageOptionsHandlerTest; | 57 typedef testing::Test LanguageOptionsHandlerTest; |
| 57 #endif | 58 #endif |
| 58 | 59 |
| 59 #if defined(OS_CHROMEOS) | 60 #if defined(OS_CHROMEOS) |
| 60 TEST_F(LanguageOptionsHandlerTest, GetInputMethodList) { | 61 TEST_F(LanguageOptionsHandlerTest, GetInputMethodList) { |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 // fail when we add support for the language. | 217 // fail when we add support for the language. |
| 217 // EXPECT_FALSE(dictionary->HasKey("no")); | 218 // EXPECT_FALSE(dictionary->HasKey("no")); |
| 218 } | 219 } |
| 219 #endif // !defined(OS_MACOSX) | 220 #endif // !defined(OS_MACOSX) |
| 220 | 221 |
| 221 TEST_F(LanguageOptionsHandlerTest, GetSpellCheckLanguageCodeSet) { | 222 TEST_F(LanguageOptionsHandlerTest, GetSpellCheckLanguageCodeSet) { |
| 222 scoped_ptr<DictionaryValue> dictionary( | 223 scoped_ptr<DictionaryValue> dictionary( |
| 223 options2::LanguageOptionsHandler::GetSpellCheckLanguageCodeSet()); | 224 options2::LanguageOptionsHandler::GetSpellCheckLanguageCodeSet()); |
| 224 EXPECT_TRUE(dictionary->HasKey("en-US")); | 225 EXPECT_TRUE(dictionary->HasKey("en-US")); |
| 225 } | 226 } |
| OLD | NEW |