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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/debugger-test.js"></script>
5 <script src="../../http/tests/inspector/sources-test.js"></script>
6
7 <script>
8
9 function test()
10 {
11 var testFormatter = InspectorTest.testPrettyPrint.bind(InspectorTest, "text/ html");
12
13 InspectorTest.runTestSuite([
14 function simpleHTML(next)
15 {
16 var mappingQueries = ["</head>", "test", "</title>"];
17 testFormatter("<html><head><title>test</title></head></html>", mappi ngQueries, next);
18 },
19
20 function selfClosingTags(next)
21 {
22 var mappingQueries = ["meta", "hr", "<html>", "</html>"];
23 testFormatter("<html><head><meta></head><img><hr/></html>", mappingQ ueries, next);
24 },
25
26 function erroneousSelfClosingTags(next)
27 {
28 var mappingQueries = ["<br/>", "<title>", "test", "</head>"];
29 testFormatter("<head><meta><meta></meta><br/></br><link></link><titl e>test</title></head>", mappingQueries, next);
30 },
31
32 function testAttributes(next)
33 {
34 var mappingQueries = ["<body>", "width", "height", "</body>"];
35 testFormatter("<body><canvas width=100 height=100 data-bad-attr='</c anvas>'></canvas></body>", mappingQueries, next);
36 },
37
38 function testCustomElements(next)
39 {
40 var mappingQueries = ["<body>", "custom-time", "year", "month", "</b ody>"];
41 testFormatter("<body><custom-time year=2016 day=1 month=1><div>minut es/seconds</div></custom-time></body>", mappingQueries, next);
42 }
43 ]);
44 }
45
46 </script>
47
48 </head>
49
50 <body onload="runTest()">
51 <p>Verifies JavaScript pretty-printing functionality.</p>
52 </body>
53 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698