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

Unified Diff: net/base/escape_unittest.cc

Issue 243653004: Test case for UnescapeAndDecodeUTF8URLComponentWithAdjustments crash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/escape_unittest.cc
diff --git a/net/base/escape_unittest.cc b/net/base/escape_unittest.cc
index 77d9fc291f7ac2203e195573d3bb60d54db5c959..c0e1a29c672adfb0953d97c5b63cfdc2e4e2dd38 100644
--- a/net/base/escape_unittest.cc
+++ b/net/base/escape_unittest.cc
@@ -434,6 +434,17 @@ TEST(EscapeTest, AdjustEncodingOffset) {
for (size_t i = 0; i < arraysize(expected_1); ++i)
EXPECT_EQ(expected_1[i], offsets[i]);
+TEST(EscapeTest, DataURLWithAccentedCharacters) {
+ const std::string url =
+ "text/html;charset=utf-8,%3Chtml%3E%3Cbody%3ETonton,%20ton%20th%C3"
+ "%A9%20t'a-t-il%20%C3%B4t%C3%A9%20ta%20toux%20";
+
+
+ base::OffsetAdjuster::Adjustments adjustments;
+ net::UnescapeAndDecodeUTF8URLComponentWithAdjustments(
+ url, (UnescapeRule::Type)2, &adjustments);
+}
+
// 2: %ECabc%EC%ECdef%EC ==> XabcXXdefX
offsets.clear();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698