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

Unified Diff: Source/wtf/text/TextCodecReplacementTest.cpp

Issue 261013007: Prevent direct use of "replacement" text encoding. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: MSVC fix Created 6 years, 7 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 | « Source/wtf/text/TextCodecReplacement.cpp ('k') | Source/wtf/text/TextEncoding.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/text/TextCodecReplacementTest.cpp
diff --git a/Source/wtf/text/TextCodecReplacementTest.cpp b/Source/wtf/text/TextCodecReplacementTest.cpp
index b95eec8b75249af91136ecaf821e74a59eb3db60..6d3d1a69c0bdc8b1fa08a4933ff2b34780c381e0 100644
--- a/Source/wtf/text/TextCodecReplacementTest.cpp
+++ b/Source/wtf/text/TextCodecReplacementTest.cpp
@@ -23,10 +23,9 @@ const char* replacementAlias = "iso-2022-kr";
TEST(TextCodecReplacement, Aliases)
{
- // FIXME: The 'replacement' label itself should not be referenceable by
- // resources or script - it's a specification convenience - but much of
- // the wtf/text API asserts that an encoding name is a label for itself.
- // crbug.com/277037
+ // "replacement" is not a valid alias for itself
+ EXPECT_FALSE(TextEncoding("replacement").isValid());
+ EXPECT_FALSE(TextEncoding("rEpLaCeMeNt").isValid());
EXPECT_TRUE(TextEncoding(replacementAlias).isValid());
EXPECT_STREQ("replacement", TextEncoding(replacementAlias).name());
« no previous file with comments | « Source/wtf/text/TextCodecReplacement.cpp ('k') | Source/wtf/text/TextEncoding.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698