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">
12 var testCSSFormatter
= InspectorTest
.testPrettyPrint
.bind(InspectorTest
, "text/css");
14 InspectorTest
.runTestSuite([
15 function testSimpleCSS(next
)
17 var content
= "a { /* pre-comment */ color /* after name */ : /* before value */ red /* post-comment */ }";
18 testCSSFormatter(content
, [], next
);
21 function testComplexCSS(next
)
23 InspectorTest
.showScriptSource("style-formatter-obfuscated.css", didShowScriptSource
);
25 function didShowScriptSource(sourceFrame
)
27 var mappingQueries
= [
39 testCSSFormatter(sourceFrame
._textEditor
.text(), mappingQueries
, next
);
43 function testFormatInlinedStyles(next
)
45 var content
= "<html><body><style>@-webkit-keyframes{from{left: 0} to{left:100px;}}</style><style>badbraces { }} @media screen{a{color:red;text-decoration: none}}</style></body></html>";
46 InspectorTest
.testPrettyPrint("text/html", content
, [], next
);
55 <body onload=
"runTest()">
56 <p>Verifies CSS pretty-printing functionality.
</p>