| OLD | NEW |
| (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 <link rel="stylesheet" href="resources/style-formatter-obfuscated.css"> |
| 7 |
| 8 <script> |
| 9 |
| 10 function test() |
| 11 { |
| 12 var testCSSFormatter = InspectorTest.testPrettyPrint.bind(InspectorTest, "te
xt/css"); |
| 13 |
| 14 InspectorTest.runTestSuite([ |
| 15 function testMediaRule(next) |
| 16 { |
| 17 var css = "@media screen,print{body{line-height:1.2}}span{line-heigh
t:10px}"; |
| 18 var mappingQueries = ["@media", "screen", "print", "body", "line-hei
ght", "1.2"]; |
| 19 testCSSFormatter(css, mappingQueries, next); |
| 20 }, |
| 21 |
| 22 function testNamespaceRule(next) |
| 23 { |
| 24 var css = "@namespace svg url(http://www.w3.org/2000/svg);g{color:re
d}"; |
| 25 var mappingQueries = ["namespace", "url", "color", "red"]; |
| 26 testCSSFormatter(css, mappingQueries, next); |
| 27 }, |
| 28 |
| 29 function testPageRule(next) |
| 30 { |
| 31 var css = "@page :first{margin:2in 3in;}span{color:blue}"; |
| 32 var mappingQueries = ["page", "first", "margin", "3in"]; |
| 33 testCSSFormatter(css, mappingQueries, next); |
| 34 }, |
| 35 |
| 36 function testSupportsRule(next) |
| 37 { |
| 38 var css = "@supports(--foo:green){body{color:green;}}#content{font-s
ize:14px}"; |
| 39 var mappingQueries = ["supports", "foo", "body", "color"]; |
| 40 testCSSFormatter(css, mappingQueries, next); |
| 41 }, |
| 42 |
| 43 function testViewportRule(next) |
| 44 { |
| 45 var css = "@viewport{zoom:0.75;min-zoom:0.5;max-zoom:0.9;}footer{pos
ition:fixed;bottom:0;}"; |
| 46 var mappingQueries = ["viewport", "zoom", "0.5", "0.9"]; |
| 47 testCSSFormatter(css, mappingQueries, next); |
| 48 }, |
| 49 ]); |
| 50 } |
| 51 |
| 52 </script> |
| 53 |
| 54 </head> |
| 55 |
| 56 <body onload="runTest()"> |
| 57 <p>Verifies CSS pretty-printing functionality.</p> |
| 58 </body> |
| 59 </html> |
| OLD | NEW |