Index: third_party/WebKit/LayoutTests/inspector/sources/pretty-print-html-2.html |
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-html-2.html b/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-html-2.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6c0c575528371cdf44199d4c31972541111ab602 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-html-2.html |
@@ -0,0 +1,53 @@ |
+<html> |
+<head> |
+<script src="../../http/tests/inspector/inspector-test.js"></script> |
+<script src="../../http/tests/inspector/debugger-test.js"></script> |
+<script src="../../http/tests/inspector/sources-test.js"></script> |
+ |
+<script> |
+ |
+function test() |
+{ |
+ var testFormatter = InspectorTest.testPrettyPrint.bind(InspectorTest, "text/html"); |
+ |
+ InspectorTest.runTestSuite([ |
+ function testDocType(next) |
+ { |
+ var mappingQueries = ["<body>", "hello", "</body>"]; |
+ testFormatter("<!DOCTYPE HTML><body>hello, world</body>", mappingQueries, next); |
+ }, |
+ |
+ function testComment(next) |
+ { |
+ var mappingQueries = ["<body>", "comment 1", "comment 2", "comment 3", "link"]; |
+ testFormatter("<!-- comment 1 --><html><!-- comment 2--><meta/><body><!-- comment 3--><a>link</a></body></html>", mappingQueries, next); |
+ }, |
+ |
+ function testNonJavascriptScriptTag(next) |
+ { |
+ var mappingQueries = ["type", "R", "</div>", "<\/script>"]; |
+ testFormatter("<div><script type='text/K'>2_&{&/x!/:2_!x}'!R<\/script></div>", mappingQueries, next); |
+ }, |
+ |
+ function testList(next) |
+ { |
+ var mappingQueries = ["foo", "bar", "baz", "hello", "world", "another"]; |
+ testFormatter("<ul><li>foo<li> hello <b>world</b>!<li> hello <b>world</b> <b>i'm here</b><li>bar<li>baz<li>hello <b>world</b><li>another</ul>", mappingQueries, next); |
+ }, |
+ |
+ function testAutomaticClosingTags(next) |
+ { |
+ var mappingQueries = ["aaaa", "bbbb1", "bbbb2", "cccc", "dddd"]; |
+ testFormatter("<a>aaaa<b>bbbb1<c>cccc<d>dddd</c>bbbb2</a>", mappingQueries, next); |
+ }, |
+ ]); |
+} |
+ |
+</script> |
+ |
+</head> |
+ |
+<body onload="runTest()"> |
+<p>Verifies JavaScript pretty-printing functionality.</p> |
+</body> |
+</html> |