Index: javatests/org/chromium/distiller/DomUtilTest.java |
diff --git a/javatests/org/chromium/distiller/DomUtilTest.java b/javatests/org/chromium/distiller/DomUtilTest.java |
index 2336b36e53689841d37b0fb6b6d956a2be6f20e8..989a5106e6e10edf2de16d3dc7c69d8227161752 100644 |
--- a/javatests/org/chromium/distiller/DomUtilTest.java |
+++ b/javatests/org/chromium/distiller/DomUtilTest.java |
@@ -401,4 +401,11 @@ public class DomUtilTest extends DomDistillerJsTestCase { |
element = element.getFirstChildElement(); |
assertEquals(400*100, DomUtil.getArea(element)); |
} |
+ |
+ public void testEscapeHTML() { |
+ String html = "<a onmouseover=\"alert('1');\" href=\"http://site.com/a&b=1\">link</a>"; |
+ String expected = "<a onmouseover="alert('1');" " + |
+ "href="http://site.com/a&b=1">link</a>"; |
+ assertEquals(expected, DomUtil.escapeHTML(html)); |
+ } |
} |