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

Unified Diff: chrome/common/l10n_util_unittest.cc

Issue 49034: Review request: fix 8997 -- RTL Regression: Word order separated by slash is reversed on "Bookmark M (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 | « chrome/common/l10n_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/l10n_util_unittest.cc
===================================================================
--- chrome/common/l10n_util_unittest.cc (revision 12386)
+++ chrome/common/l10n_util_unittest.cc (working copy)
@@ -309,60 +309,66 @@
const PathAndWrappedPath test_data[] = {
// Test common path, such as "c:\foo\bar".
{ L"c:" + kSeparator + L"foo" + kSeparator + L"bar",
- L"\x202a"L"c:" + kSeparator + L"\x200e"L"foo" + kSeparator +
- L"\x200e"L"bar\x202c"
+ L"\x202a"L"c:" + kSeparator + L"foo" + kSeparator +
+ L"bar\x202c"
},
// Test path with file name, such as "c:\foo\bar\test.jpg".
{ L"c:" + kSeparator + L"foo" + kSeparator + L"bar" + kSeparator +
L"test.jpg",
- L"\x202a"L"c:" + kSeparator + L"\x200e"L"foo" + kSeparator +
- L"\x200e"L"bar" + kSeparator + L"\x200e"L"test.jpg\x202c"
+ L"\x202a"L"c:" + kSeparator + L"foo" + kSeparator +
+ L"bar" + kSeparator + L"test.jpg\x202c"
},
// Test path ending with punctuation, such as "c:\(foo)\bar.".
{ L"c:" + kSeparator + L"(foo)" + kSeparator + L"bar.",
- L"\x202a"L"c:" + kSeparator + L"\x200e"L"(foo)" + kSeparator +
- L"\x200e"L"bar.\x202c"
+ L"\x202a"L"c:" + kSeparator + L"(foo)" + kSeparator +
+ L"bar.\x202c"
},
// Test path ending with separator, such as "c:\foo\bar\".
{ L"c:" + kSeparator + L"foo" + kSeparator + L"bar" + kSeparator,
- L"\x202a"L"c:" + kSeparator + L"\x200e"L"foo" + kSeparator +
- L"\x200e"L"bar" + kSeparator + L"\x200e\x202c"
+ L"\x202a"L"c:" + kSeparator + L"foo" + kSeparator +
+ L"bar" + kSeparator + L"\x202c",
},
// Test path with RTL character.
{ L"c:" + kSeparator + L"\x05d0",
- L"\x202a"L"c:" + kSeparator + L"\x200e\x05d0\x202c",
+ L"\x202a"L"c:" + kSeparator + L"\x05d0\x202c",
},
// Test path with 2 level RTL directory names.
{ L"c:" + kSeparator + L"\x05d0" + kSeparator + L"\x0622",
- L"\x202a"L"c:" + kSeparator + L"\x200e\x05d0" + kSeparator +
- L"\x200e\x0622\x202c",
+ L"\x202a"L"c:" + kSeparator + L"\x05d0" + kSeparator +
+ L"\x0622\x202c",
},
// Test path with mixed RTL/LTR directory names and ending with punctuation.
{ L"c:" + kSeparator + L"\x05d0" + kSeparator + L"\x0622" + kSeparator +
L"(foo)" + kSeparator + L"b.a.r.",
- L"\x202a"L"c:" + kSeparator + L"\x200e\x05d0" + kSeparator +
- L"\x200e\x0622" + kSeparator + L"\x200e"L"(foo)" + kSeparator +
- L"\x200e"L"b.a.r.\x202c",
+ L"\x202a"L"c:" + kSeparator + L"\x05d0" + kSeparator +
+ L"\x0622" + kSeparator + L"(foo)" + kSeparator +
+ L"b.a.r.\x202c",
},
// Test path without driver name, such as "/foo/bar/test/jpg".
{ kSeparator + L"foo" + kSeparator + L"bar" + kSeparator + L"test.jpg",
- L"\x202a" + kSeparator + L"foo" + kSeparator + L"\x200e" + L"bar" +
- kSeparator + L"\x200e" + L"test.jpg" + L"\x202c"
+ L"\x202a" + kSeparator + L"foo" + kSeparator + L"bar" +
+ kSeparator + L"test.jpg" + L"\x202c"
},
// Test path start with current directory, such as "./foo".
{ L"." + kSeparator + L"foo",
- L"\x202a"L"." + kSeparator + L"\x200e" + L"foo" + L"\x202c"
+ L"\x202a"L"." + kSeparator + L"foo" + L"\x202c"
},
// Test path start with parent directory, such as "../foo/bar.jpg".
{ L".." + kSeparator + L"foo" + kSeparator + L"bar.jpg",
- L"\x202a"L".." + kSeparator + L"\x200e" + L"foo" + kSeparator +
- L"\x200e" + L"bar.jpg" + L"\x202c"
+ L"\x202a"L".." + kSeparator + L"foo" + kSeparator +
+ L"bar.jpg" + L"\x202c"
},
// Test absolute path, such as "//foo/bar.jpg".
{ kSeparator + kSeparator + L"foo" + kSeparator + L"bar.jpg",
- L"\x202a" + kSeparator + kSeparator + L"\x200e"L"foo" + kSeparator +
- L"\x200e"L"bar.jpg" + L"\x202c"
+ L"\x202a" + kSeparator + kSeparator + L"foo" + kSeparator +
+ L"bar.jpg" + L"\x202c"
},
+ // Test path with mixed RTL/LTR directory names.
+ { L"c:" + kSeparator + L"foo" + kSeparator + L"\x05d0" + kSeparator +
+ L"\x0622" + kSeparator + L"\x05d1.jpg",
+ L"\x202a"L"c:" + kSeparator + L"foo" + kSeparator + L"\x05d0" +
+ kSeparator + L"\x0622" + kSeparator + L"\x05d1.jpg" + L"\x202c",
+ },
// Test empty path.
{ L"",
L"\x202a\x202c"
« no previous file with comments | « chrome/common/l10n_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698