Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Unified Diff: third_party/WebKit/LayoutTests/inspector/sass/test-ast-scss-3.html

Issue 1511073002: DevTools: [SASS] introduce sass module, implement SCSS AST-builder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: introduce ASTDocument Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/inspector/sass/test-ast-scss-3.html
diff --git a/third_party/WebKit/LayoutTests/inspector/sass/test-ast-scss-3.html b/third_party/WebKit/LayoutTests/inspector/sass/test-ast-scss-3.html
new file mode 100644
index 0000000000000000000000000000000000000000..d165f50378fffdb984278bc06297501a8e605f0a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sass/test-ast-scss-3.html
@@ -0,0 +1,59 @@
+<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>

Powered by Google App Engine
This is Rietveld 408576698