OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../http/tests/inspector/elements-test.js"></script> |
| 5 <script src="./sass-test.js"></script> |
| 6 <style> |
| 7 pre { |
| 8 font-family: monospace; |
| 9 } |
| 10 </style> |
| 11 <script> |
| 12 |
| 13 function test() |
| 14 { |
| 15 InspectorTest.evaluateInPage("getCSS()", onCSS); |
| 16 |
| 17 function onCSS(result) |
| 18 { |
| 19 InspectorTest.parseCSS("", result.value) |
| 20 .then(InspectorTest.dumpAST) |
| 21 .then(InspectorTest.validateASTRanges) |
| 22 .catch(console.error.bind(console)) |
| 23 .then(InspectorTest.completeTest); |
| 24 } |
| 25 } |
| 26 |
| 27 function getCSS() |
| 28 { |
| 29 return document.querySelector(".snippet").textContent; |
| 30 } |
| 31 |
| 32 </script> |
| 33 </head> |
| 34 |
| 35 <body onload="runTest()"> |
| 36 <p> |
| 37 Verifies CSS AST for simple input. |
| 38 </p> |
| 39 <pre class="snippet"> |
| 40 div { |
| 41 /* display: flex; */ |
| 42 color: red; |
| 43 background-color: blue; |
| 44 /* position: absolute; */ |
| 45 } |
| 46 |
| 47 div .className { |
| 48 padding: 10px 0 0 10px; |
| 49 /* font-family: "Times New Roman"; */ |
| 50 background-image: url(assets/no-image-set.png); |
| 51 } |
| 52 |
| 53 div .className #test::before { |
| 54 margin: 10px 10px; |
| 55 content: "test me"; |
| 56 /* border: 1px solid black; */ |
| 57 } |
| 58 </pre> |
| 59 </body> |
| 60 </html> |
OLD | NEW |