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

Unified Diff: googleurl/src/url_canon_unittest.cc

Issue 160589: All host names with nonascii characters (cyrillic) + escapable characters (,)... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « googleurl/src/url_canon_internal.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: googleurl/src/url_canon_unittest.cc
===================================================================
--- googleurl/src/url_canon_unittest.cc (revision 110)
+++ googleurl/src/url_canon_unittest.cc (working copy)
@@ -99,7 +99,7 @@
// Wrapper around a UConverter object that managers creation and destruction.
class UConvScoper {
public:
- UConvScoper(const char* charset_name) {
+ explicit UConvScoper(const char* charset_name) {
UErrorCode err = U_ZERO_ERROR;
converter_ = ucnv_open(charset_name, &err);
}
@@ -238,7 +238,7 @@
for (size_t i = 0; i < ARRAYSIZE(icu_cases); i++) {
UConvScoper conv(icu_cases[i].encoding);
- ASSERT_TRUE(conv.converter());
+ ASSERT_TRUE(conv.converter() != NULL);
url_canon::ICUCharsetConverter converter(conv.converter());
std::string str;
@@ -398,6 +398,9 @@
// Broken IP addresses get marked as such.
{"192.168.0.257", L"192.168.0.257", "192.168.0.257", url_parse::Component(0, 13), CanonHostInfo::BROKEN, -1},
{"[google.com]", L"[google.com]", "[google.com]", url_parse::Component(0, 12), CanonHostInfo::BROKEN, -1},
+ // Cyrillic letter followed buy ( should return punicode for ( escaped before punicode string was created. I.e.
+ // if ( is escaped after punicode is created we would get xn--%28-8tb (incorrect).
+ {"\xd1\x82(", L"\x0442(", "xn--%28-7ed", url_parse::Component(0, 11), CanonHostInfo::NEUTRAL, -1},
};
// CanonicalizeHost() non-verbose.
« no previous file with comments | « googleurl/src/url_canon_internal.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698