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

Unified Diff: third_party/WebKit/Source/wtf/text/TextCodecICUTest.cpp

Issue 2354533005: FormData should not drop ignorable code points. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/wtf/text/TextCodecICU.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/text/TextCodecICUTest.cpp
diff --git a/third_party/WebKit/Source/wtf/text/TextCodecICUTest.cpp b/third_party/WebKit/Source/wtf/text/TextCodecICUTest.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..1740951e465f9bf6463fb92a6bada0d668017f00
--- /dev/null
+++ b/third_party/WebKit/Source/wtf/text/TextCodecICUTest.cpp
@@ -0,0 +1,23 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "wtf/text/TextCodecICU.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+#include "wtf/text/CharacterNames.h"
+
+namespace WTF {
+
+TEST(TextCodecICUTest, IgnorableCodePoint)
+{
+ TextEncoding iso2022jp("iso-2022-jp");
+ std::unique_ptr<TextCodec> codec = TextCodecICU::create(iso2022jp, nullptr);
+ Vector<UChar> source;
+ source.append('a');
+ source.append(zeroWidthJoinerCharacter);
+ CString encoded = codec->encode(source.data(), source.size(), EntitiesForUnencodables);
+ EXPECT_STREQ("a&#8205;", encoded.data());
+}
+
+}
« no previous file with comments | « third_party/WebKit/Source/wtf/text/TextCodecICU.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698