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

Unified Diff: third_party/WebKit/Source/web/tests/WebFrameSerializerTest.cpp

Issue 2848953003: Do not send pings for anchor elements in MHTML pages (Closed)
Patch Set: Add new file Created 3 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
Index: third_party/WebKit/Source/web/tests/WebFrameSerializerTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebFrameSerializerTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameSerializerTest.cpp
index 2fd005a1c80656ce5edea15ac968f6a1b4bc76ec..e8b51eae83580a2af7485ee5d040383e7ec28ba8 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameSerializerTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameSerializerTest.cpp
@@ -260,6 +260,12 @@ TEST_F(WebFrameSerializerSanitizationTest, RemoveInlineScriptInAttributes) {
EXPECT_NE(WTF::kNotFound, mhtml.Find("src="));
}
+TEST_F(WebFrameSerializerSanitizationTest, RemoveOtherAttributes) {
+ String mhtml =
+ GenerateMHTMLParts("http://www.test.com", "remove_attributes.html");
+ EXPECT_EQ(WTF::kNotFound, mhtml.Find("ping="));
+}
+
TEST_F(WebFrameSerializerSanitizationTest, DisableFormElements) {
String mhtml = GenerateMHTMLParts("http://www.test.com", "form.html");
@@ -372,7 +378,6 @@ TEST_F(WebFrameSerializerSanitizationTest, KeepPopupOverlayIfNotRequested) {
TEST_F(WebFrameSerializerSanitizationTest, RemoveElements) {
String mhtml =
GenerateMHTMLParts("http://www.test.com", "remove_elements.html");
- LOG(ERROR) << mhtml;
EXPECT_EQ(WTF::kNotFound, mhtml.Find("<script"));
EXPECT_EQ(WTF::kNotFound, mhtml.Find("<noscript"));

Powered by Google App Engine
This is Rietveld 408576698