| 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 testFontFace(next) |
| 16 { |
| 17 var css = "@font-face{font-family:MyHelvetica;src:local('Helvetica N
eue Bold'),local('HelveticaNeue-Bold'),url(MgOpenModernaBold.ttf);font-weight:bo
ld;}div{color:red}"; |
| 18 var mappingQueries = ["font-face", "red"]; |
| 19 testCSSFormatter(css, mappingQueries, next); |
| 20 }, |
| 21 |
| 22 function testCharsetRule(next) |
| 23 { |
| 24 var css = "@charset 'iso-8859-15';p{margin:0}"; |
| 25 var mappingQueries = ["charset", "iso", "margin"]; |
| 26 testCSSFormatter(css, mappingQueries, next); |
| 27 }, |
| 28 |
| 29 function testImportRule(next) |
| 30 { |
| 31 var css = "@import url('bluish.css') projection,tv;span{border:1px s
olid black}"; |
| 32 var mappingQueries = ["import", "bluish", "projection", "span", "bor
der", "black"]; |
| 33 testCSSFormatter(css, mappingQueries, next); |
| 34 }, |
| 35 |
| 36 function testImportWithMediaQueryRule(next) |
| 37 { |
| 38 var css = "@import url('landscape.css') screen and (orientation:land
scape);article{background:yellow}"; |
| 39 var mappingQueries = ["import", "url", "orientation", "article", "ba
ckground", "yellow"]; |
| 40 testCSSFormatter(css, mappingQueries, next); |
| 41 }, |
| 42 |
| 43 function testKeyframesRule(next) |
| 44 { |
| 45 var css = "p{animation-duration:3s;}@keyframes slidein{from{margin-l
eft:100%;width:300%;}to{margin-left:0%;width:100%;}}p{animation-name:slidein}"; |
| 46 var mappingQueries = ["animation-duration", "3s", "keyframes", "from
", "300%", "animation-name"]; |
| 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 |