Index: third_party/WebKit/Source/web/tests/PageSerializerTest.cpp |
diff --git a/third_party/WebKit/Source/web/tests/PageSerializerTest.cpp b/third_party/WebKit/Source/web/tests/PageSerializerTest.cpp |
index 34cc912f2fae61ccedf80fff383e4d064ad81266..877da4bb7f6e9eb12ac83936e44cc8b24a467a34 100644 |
--- a/third_party/WebKit/Source/web/tests/PageSerializerTest.cpp |
+++ b/third_party/WebKit/Source/web/tests/PageSerializerTest.cpp |
@@ -496,4 +496,15 @@ TEST_F(PageSerializerTest, NamespaceElementsDontCrash) |
EXPECT_GT(getSerializedData("namespace_element.html", "text/html").length(), 0U); |
} |
+TEST_F(PageSerializerTest, markOfTheWebDeclaration) |
+{ |
+ EXPECT_EQ("saved from url=(0015)http://foo.com/", PageSerializer::markOfTheWebDeclaration(KURL(ParsedURLString, "http://foo.com"))); |
+ EXPECT_EQ("saved from url=(0015)http://f-o.com/", PageSerializer::markOfTheWebDeclaration(KURL(ParsedURLString, "http://f-o.com"))); |
+ EXPECT_EQ("saved from url=(0019)http://foo.com-%2D/", PageSerializer::markOfTheWebDeclaration(KURL(ParsedURLString, "http://foo.com--"))); |
+ EXPECT_EQ("saved from url=(0024)http://f-%2D.com-%2D%3E/", PageSerializer::markOfTheWebDeclaration(KURL(ParsedURLString, "http://f--.com-->"))); |
+ EXPECT_EQ("saved from url=(0020)http://foo.com/?-%2D", PageSerializer::markOfTheWebDeclaration(KURL(ParsedURLString, "http://foo.com?--"))); |
+ EXPECT_EQ("saved from url=(0020)http://foo.com/#-%2D", PageSerializer::markOfTheWebDeclaration(KURL(ParsedURLString, "http://foo.com#--"))); |
+ EXPECT_EQ("saved from url=(0026)http://foo.com/#bar-%2Dbaz", PageSerializer::markOfTheWebDeclaration(KURL(ParsedURLString, "http://foo.com#bar--baz"))); |
+} |
+ |
} // namespace blink |