| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 return locale->timeAMPMLabels()[index]; | 182 return locale->timeAMPMLabels()[index]; |
| 183 } | 183 } |
| 184 | 184 |
| 185 String decimalSeparator(const String& localeString) { | 185 String decimalSeparator(const String& localeString) { |
| 186 std::unique_ptr<LocaleMac> locale = LocaleMac::create(localeString); | 186 std::unique_ptr<LocaleMac> locale = LocaleMac::create(localeString); |
| 187 return locale->localizedDecimalSeparator(); | 187 return locale->localizedDecimalSeparator(); |
| 188 } | 188 } |
| 189 }; | 189 }; |
| 190 | 190 |
| 191 TEST_F(LocaleMacTest, formatWeek) { | 191 TEST_F(LocaleMacTest, formatWeek) { |
| 192 LocalePlatformSupport support; | 192 ScopedTestingPlatformSupport<LocalePlatformSupport> support; |
| 193 EXPECT_STREQ("Week 04, 2005", formatWeek("en_US", "2005-W04").utf8().data()); | 193 EXPECT_STREQ("Week 04, 2005", formatWeek("en_US", "2005-W04").utf8().data()); |
| 194 EXPECT_STREQ("Week 52, 2005", formatWeek("en_US", "2005-W52").utf8().data()); | 194 EXPECT_STREQ("Week 52, 2005", formatWeek("en_US", "2005-W52").utf8().data()); |
| 195 } | 195 } |
| 196 | 196 |
| 197 TEST_F(LocaleMacTest, formatMonth) { | 197 TEST_F(LocaleMacTest, formatMonth) { |
| 198 EXPECT_STREQ("April 2005", | 198 EXPECT_STREQ("April 2005", |
| 199 formatMonth("en_US", "2005-04", false).utf8().data()); | 199 formatMonth("en_US", "2005-04", false).utf8().data()); |
| 200 EXPECT_STREQ("avril 2005", | 200 EXPECT_STREQ("avril 2005", |
| 201 formatMonth("fr_FR", "2005-04", false).utf8().data()); | 201 formatMonth("fr_FR", "2005-04", false).utf8().data()); |
| 202 EXPECT_STREQ( | 202 EXPECT_STREQ( |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 testNumbers("es_ES"); | 436 testNumbers("es_ES"); |
| 437 testNumbers("fa"); | 437 testNumbers("fa"); |
| 438 testNumbers("ja_JP"); | 438 testNumbers("ja_JP"); |
| 439 testNumbers("ko_KR"); | 439 testNumbers("ko_KR"); |
| 440 testNumbers("zh_CN"); | 440 testNumbers("zh_CN"); |
| 441 testNumbers("zh_HK"); | 441 testNumbers("zh_HK"); |
| 442 testNumbers("zh_TW"); | 442 testNumbers("zh_TW"); |
| 443 } | 443 } |
| 444 | 444 |
| 445 } // namespace blink | 445 } // namespace blink |
| OLD | NEW |