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

Unified Diff: ui/base/l10n/l10n_util_unittest.cc

Issue 7669040: content: Move render_widget_host_view_gtk to content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chromeos fix. Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/l10n/l10n_util.cc ('k') | ui/base/text/text_elider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/l10n/l10n_util_unittest.cc
diff --git a/ui/base/l10n/l10n_util_unittest.cc b/ui/base/l10n/l10n_util_unittest.cc
index dda3efe3094512861ee63f75be2c46936d912eb0..778476c72e88dee5d5f82ea5f89cd08a33a9cc51 100644
--- a/ui/base/l10n/l10n_util_unittest.cc
+++ b/ui/base/l10n/l10n_util_unittest.cc
@@ -65,36 +65,6 @@ TEST_F(L10nUtilTest, DISABLED_GetString) {
}
#endif // defined(OS_WIN)
-TEST_F(L10nUtilTest, TruncateString) {
- string16 string = ASCIIToUTF16("foooooey bxxxar baz");
-
- // Make sure it doesn't modify the string if length > string length.
- EXPECT_EQ(string, l10n_util::TruncateString(string, 100));
-
- // Test no characters.
- EXPECT_EQ(L"", UTF16ToWide(l10n_util::TruncateString(string, 0)));
-
- // Test 1 character.
- EXPECT_EQ(L"\x2026", UTF16ToWide(l10n_util::TruncateString(string, 1)));
-
- // Test adds ... at right spot when there is enough room to break at a
- // word boundary.
- EXPECT_EQ(L"foooooey\x2026",
- UTF16ToWide(l10n_util::TruncateString(string, 14)));
-
- // Test adds ... at right spot when there is not enough space in first word.
- EXPECT_EQ(L"f\x2026", UTF16ToWide(l10n_util::TruncateString(string, 2)));
-
- // Test adds ... at right spot when there is not enough room to break at a
- // word boundary.
- EXPECT_EQ(L"foooooey\x2026",
- UTF16ToWide(l10n_util::TruncateString(string, 11)));
-
- // Test completely truncates string if break is on initial whitespace.
- EXPECT_EQ(L"\x2026",
- UTF16ToWide(l10n_util::TruncateString(ASCIIToUTF16(" "), 2)));
-}
-
void SetICUDefaultLocale(const std::string& locale_string) {
icu::Locale locale(locale_string.c_str());
UErrorCode error_code = U_ZERO_ERROR;
« no previous file with comments | « ui/base/l10n/l10n_util.cc ('k') | ui/base/text/text_elider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698