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

Side by Side 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: 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 testDocType(next)
15 {
16 var mappingQueries = ["<body>", "hello", "</body>"];
17 testFormatter("<!DOCTYPE HTML><body>hello, world</body>", mappingQue ries, next);
18 },
19
20 function testComment(next)
21 {
22 var mappingQueries = ["<body>", "comment 1", "comment 2", "comment 3 ", "link"];
23 testFormatter("<!-- comment 1 --><html><!-- comment 2--><meta/><body ><!-- comment 3--><a>link</a></body></html>", mappingQueries, next);
24 },
25
26 function testNonJavascriptScriptTag(next)
27 {
28 var mappingQueries = ["type", "R", "</div>", "<\/script>"];
29 testFormatter("<div><script type='text/K'>2_&{&/x!/:2_!x}'!R<\/scrip t></div>", mappingQueries, next);
30 },
31
32 function testList(next)
33 {
34 var mappingQueries = ["foo", "bar", "baz", "hello", "world", "anothe r"];
35 testFormatter("<ul><li>foo<li> hello <b>world</b>!<li> hello <b>worl d</b> <b>i'm here</b><li>bar<li>baz<li>hello <b>world</b><li>another</ul>", mapp ingQueries, next);
36 },
37
38 function testAutomaticClosingTags(next)
39 {
40 var mappingQueries = ["aaaa", "bbbb1", "bbbb2", "cccc", "dddd"];
41 testFormatter("<a>aaaa<b>bbbb1<c>cccc<d>dddd</c>bbbb2</a>", mappingQ ueries, 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