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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sources/pretty-print-html-3.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 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 testInlineJavascript(next)
15 {
16 var mappingQueries = ["console", "test", "</html"];
17 testFormatter("<html><script>for(var i=0;i<10;++i)console.log('test '+i);<\/script></html>", mappingQueries, next);
18 },
19
20 function testInlineCSS(next)
21 {
22 var mappingQueries = ["<html>", "red", "black"];
23 testFormatter("<html><style>div{color:red;border:1px solid black;}</ style></html>", mappingQueries, next);
24 },
25
26 function testMultilineInput(next)
27 {
28 var html = `<html>
29 <head>
30 <meta name=\"ROBOTS\" content=\"NOODP\">
31 <meta name='viewport' content='text/html'>
32 <title>foobar</title>
33 <body>
34 <script>if(1<2){if(2<3){if(3<4){if(4<5){console.log("magic")}}}}<\/script>
35 <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA...">
36 <style>div{display:flex;align-items:center;justify-content:center;}body{width:10 0%}*{border:1px solid black}</style>
37 </body>
38 </html>
39 `;
40 var mappingQueries = ["ROBOTS", "image", "...", "</body>", "</html>" , "</style>"];
41 testFormatter(html, 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