| 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>
|
|
|