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

Unified Diff: third_party/WebKit/LayoutTests/inspector/sources/pretty-print-html-2.html

Issue 1894343002: DevTools: pretty-print HTML (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/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..af46b066ce69cb820a5ef2ac1a82d9a99408e10e
--- /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>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>

Powered by Google App Engine
This is Rietveld 408576698