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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sass/sass-test.js

Issue 1515733002: DevTools: [SASS] implement CSS AST-builder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sass-module
Patch Set: rebaseline test 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 unified diff | Download patch
OLDNEW
1 var initialize_SassTest = function() { 1 var initialize_SassTest = function() {
2 2
3 InspectorTest.preloadModule("sass"); 3 InspectorTest.preloadModule("sass");
4 4
5 InspectorTest.dumpAST = function(ast) 5 InspectorTest.dumpAST = function(ast)
6 { 6 {
7 var lines = [String.sprintf("=== AST === %s", ast.document.url)]; 7 var lines = [String.sprintf("=== AST === %s", ast.document.url)];
8 for (var i = 0; i < ast.rules.length; ++i) { 8 for (var i = 0; i < ast.rules.length; ++i) {
9 var rule = ast.rules[i]; 9 var rule = ast.rules[i];
10 lines.push(String.sprintf("rule %d: \"%s\"", i, rule.selector)); 10 lines.push(String.sprintf("rule %d: \"%s\"", i, rule.selector));
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 { 79 {
80 return self.runtime.instancePromise(WebInspector.TokenizerFactory) 80 return self.runtime.instancePromise(WebInspector.TokenizerFactory)
81 .then(onTokenizer); 81 .then(onTokenizer);
82 82
83 function onTokenizer(tokenizer) 83 function onTokenizer(tokenizer)
84 { 84 {
85 return WebInspector.SASSSupport.parseSCSS(url, text, tokenizer); 85 return WebInspector.SASSSupport.parseSCSS(url, text, tokenizer);
86 } 86 }
87 } 87 }
88 88
89 var cssParser = null;
90
91 InspectorTest.parseCSS = function(url, text)
92 {
93 if (!cssParser)
94 cssParser = new WebInspector.CSSParser();
95 return WebInspector.SASSSupport.parseCSS(cssParser, url, text);
96 }
97
89 } 98 }
90 99
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698