blob: d165f50378fffdb984278bc06297501a8e605f0a [file] [log] [blame]
<html>
<head>
<script src="../../http/tests/inspector/inspector-test.js"></script>
<script src="../../http/tests/inspector/elements-test.js"></script>
<script src="./sass-test.js"></script>
<style>
pre {
font-family: monospace;
}
</style>
<script>
function test()
{
InspectorTest.evaluateInPage("getSASS()", onSASS);
function onSASS(result)
{
InspectorTest.parseSCSS("", result.value)
.then(InspectorTest.dumpAST)
.then(InspectorTest.validateASTRanges)
.catch(console.error.bind(console))
.then(InspectorTest.completeTest);
}
}
function getSASS()
{
return document.querySelector(".snippet").textContent;
}
</script>
</head>
<body onload="runTest()">
<p>
Verifies AST of SCSS with mixins.
</p>
<pre class="snippet">
@mixin awesome {
width: 100%;
height: 100%;
}
@mixin border-radius($radius) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
-ms-border-radius: $radius;
border-radius: $radius;
}
div {
@include border-radius(15px);
@include awesome;
}
</pre>
</body>
</html>