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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/wtf/text/TextCodecICU.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "wtf/text/TextCodecICU.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "wtf/text/CharacterNames.h"
9
10 namespace WTF {
11
12 TEST(TextCodecICUTest, IgnorableCodePoint)
13 {
14 TextEncoding iso2022jp("iso-2022-jp");
15 std::unique_ptr<TextCodec> codec = TextCodecICU::create(iso2022jp, nullptr);
16 Vector<UChar> source;
17 source.append('a');
18 source.append(zeroWidthJoinerCharacter);
19 CString encoded = codec->encode(source.data(), source.size(), EntitiesForUne ncodables);
20 EXPECT_STREQ("a&#8205;", encoded.data());
21 }
22
23 }
OLDNEW
« 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