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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
| 8 #include "base/macros.h" |
8 #include "chrome/installer/util/language_selector.h" | 9 #include "chrome/installer/util/language_selector.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
10 | 11 |
11 namespace { | 12 namespace { |
12 | 13 |
13 const wchar_t* const kExactMatchCandidates[] = { | 14 const wchar_t* const kExactMatchCandidates[] = { |
14 L"am", L"ar", L"bg", L"bn", L"ca", L"cs", L"da", L"de", L"el", L"en-gb", | 15 L"am", L"ar", L"bg", L"bn", L"ca", L"cs", L"da", L"de", L"el", L"en-gb", |
15 L"en-us", L"es", L"es-419", L"et", L"fa", L"fi", L"fil", L"fr", L"gu", L"hi", | 16 L"en-us", L"es", L"es-419", L"et", L"fa", L"fi", L"fil", L"fr", L"gu", L"hi", |
16 L"hr", L"hu", L"id", L"it", L"iw", L"ja", L"kn", L"ko", L"lt", L"lv", L"ml", | 17 L"hr", L"hu", L"id", L"it", L"iw", L"ja", L"kn", L"ko", L"lt", L"lv", L"ml", |
17 L"mr", L"nl", L"no", L"pl", L"pt-br", L"pt-pt", L"ro", L"ru", L"sk", L"sl", | 18 L"mr", L"nl", L"no", L"pl", L"pt-br", L"pt-pt", L"ro", L"ru", L"sk", L"sl", |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 ::testing::Combine( | 163 ::testing::Combine( |
163 ::testing::Values(L"zh-tw"), | 164 ::testing::Values(L"zh-tw"), |
164 ::testing::Values(L"zh-cht", L"zh-hant", L"zh-hk", L"zh-mo"))); | 165 ::testing::Values(L"zh-cht", L"zh-hant", L"zh-hk", L"zh-mo"))); |
165 | 166 |
166 // Test that we can get the name of the default language. | 167 // Test that we can get the name of the default language. |
167 TEST(LanguageSelectorTest, DefaultLanguageName) { | 168 TEST(LanguageSelectorTest, DefaultLanguageName) { |
168 installer::LanguageSelector instance; | 169 installer::LanguageSelector instance; |
169 EXPECT_FALSE(instance.GetLanguageName(instance.offset()).empty()); | 170 EXPECT_FALSE(instance.GetLanguageName(instance.offset()).empty()); |
170 } | 171 } |
171 | 172 |
OLD | NEW |