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

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

Issue 1894343002: DevTools: pretty-print HTML (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments 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-1.html
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-html-1.html b/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-html-1.html
new file mode 100644
index 0000000000000000000000000000000000000000..b8bc68b7f215ffdaa34e1899999291dec4eb787f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-html-1.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 simpleHTML(next)
+ {
+ var mappingQueries = ["</head>", "test", "</title>"];
+ testFormatter("<html><head><title>test</title></head></html>", mappingQueries, next);
+ },
+
+ function selfClosingTags(next)
+ {
+ var mappingQueries = ["meta", "hr", "<html>", "</html>"];
+ testFormatter("<html><head><meta></head><img><hr/></html>", mappingQueries, next);
+ },
+
+ function erroneousSelfClosingTags(next)
+ {
+ var mappingQueries = ["<br/>", "<title>", "test", "</head>"];
+ testFormatter("<head><meta><meta></meta><br/></br><link></link><title>test</title></head>", mappingQueries, next);
+ },
+
+ function testAttributes(next)
+ {
+ var mappingQueries = ["<body>", "width", "height", "</body>"];
+ testFormatter("<body><canvas width=100 height=100 data-bad-attr='</canvas>'></canvas></body>", mappingQueries, next);
+ },
+
+ function testCustomElements(next)
+ {
+ var mappingQueries = ["<body>", "custom-time", "year", "month", "</body>"];
+ testFormatter("<body><custom-time year=2016 day=1 month=1><div>minutes/seconds</div></custom-time></body>", 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