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

Side by Side Diff: third_party/WebKit/Source/platform/text/LocaleMacTest.cpp

Issue 2588403002: TestingPlatformSupport: register Platform instance correctly (Closed)
Patch Set: review #32 Created 3 years, 11 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
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698