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

Side by Side Diff: app/l10n_util_unittest.cc

Issue 194060: Add a "ToUpper" method (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « app/l10n_util.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "app/app_paths.h" 7 #include "app/app_paths.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #if !defined(OS_MACOSX) 9 #if !defined(OS_MACOSX)
10 #include "app/test/data/resource.h" 10 #include "app/test/data/resource.h"
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 EXPECT_EQ(l10n_util::LEFT_TO_RIGHT, GetTextDirection("en")); 432 EXPECT_EQ(l10n_util::LEFT_TO_RIGHT, GetTextDirection("en"));
433 // Chinese in China with '-'. 433 // Chinese in China with '-'.
434 EXPECT_EQ(l10n_util::LEFT_TO_RIGHT, GetTextDirection("zh-CN")); 434 EXPECT_EQ(l10n_util::LEFT_TO_RIGHT, GetTextDirection("zh-CN"));
435 // Filipino : 3-letter code 435 // Filipino : 3-letter code
436 EXPECT_EQ(l10n_util::LEFT_TO_RIGHT, GetTextDirection("fil")); 436 EXPECT_EQ(l10n_util::LEFT_TO_RIGHT, GetTextDirection("fil"));
437 // Russian 437 // Russian
438 EXPECT_EQ(l10n_util::LEFT_TO_RIGHT, GetTextDirection("ru")); 438 EXPECT_EQ(l10n_util::LEFT_TO_RIGHT, GetTextDirection("ru"));
439 // Japanese that uses multiple scripts 439 // Japanese that uses multiple scripts
440 EXPECT_EQ(l10n_util::LEFT_TO_RIGHT, GetTextDirection("ja")); 440 EXPECT_EQ(l10n_util::LEFT_TO_RIGHT, GetTextDirection("ja"));
441 } 441 }
442
443 // Test upper and lower case string conversion.
444 TEST_F(L10nUtilTest, UpperLower) {
445 string16 mixed(ASCIIToUTF16("Text with UPPer & lowER casE."));
446 const string16 expected_lower(ASCIIToUTF16("text with upper & lower case."));
447 const string16 expected_upper(ASCIIToUTF16("TEXT WITH UPPER & LOWER CASE."));
448
449 string16 result = l10n_util::ToLower(mixed);
450 EXPECT_EQ(result, expected_lower);
451
452 result = l10n_util::ToUpper(mixed);
453 EXPECT_EQ(result, expected_upper);
454 }
455
OLDNEW
« no previous file with comments | « app/l10n_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698