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

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

Issue 1941283002: DevTools: [SASS] start parsing CSS with SCSS parser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1-scss
Patch Set: rebaseline Created 4 years, 7 months 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/sass/test-ast-css-3-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var initialize_SassTest = function() { 1 var initialize_SassTest = function() {
2 2
3 InspectorTest.preloadModule("sass"); 3 InspectorTest.preloadModule("sass");
4 4
5 var cssParserService = null;
6
7 InspectorTest.cssParserService = function()
8 {
9 if (!cssParserService)
10 cssParserService = new WebInspector.CSSParserService();
11 return cssParserService;
12 }
13
14 var sassSourceMapFactory = null; 5 var sassSourceMapFactory = null;
15 InspectorTest.sassSourceMapFactory = function() 6 InspectorTest.sassSourceMapFactory = function()
16 { 7 {
17 if (!sassSourceMapFactory) 8 if (!sassSourceMapFactory)
18 sassSourceMapFactory = new WebInspector.SASSSourceMapFactory(); 9 sassSourceMapFactory = new WebInspector.SASSSourceMapFactory();
19 return sassSourceMapFactory; 10 return sassSourceMapFactory;
20 } 11 }
21 12
22 InspectorTest.parseCSS = function(url, text)
23 {
24 return WebInspector.SASSSupport.parseCSS(url, text);
25 }
26
27 InspectorTest.parseSCSS = function(url, text) 13 InspectorTest.parseSCSS = function(url, text)
28 { 14 {
29 return WebInspector.SASSSupport.parseSCSS(url, text); 15 return WebInspector.SASSSupport.parseSCSS(url, text);
30 } 16 }
17 InspectorTest.parseCSS = InspectorTest.parseSCSS;
31 18
32 InspectorTest.loadASTMapping = function(header, callback) 19 InspectorTest.loadASTMapping = function(header, callback)
33 { 20 {
34 var completeSourceMapURL = WebInspector.ParsedURL.completeURL(header.sourceU RL, header.sourceMapURL); 21 var completeSourceMapURL = WebInspector.ParsedURL.completeURL(header.sourceU RL, header.sourceMapURL);
35 WebInspector.TextSourceMap.load(completeSourceMapURL, header.sourceURL).then (onSourceMapLoaded); 22 WebInspector.TextSourceMap.load(completeSourceMapURL, header.sourceURL).then (onSourceMapLoaded);
36 23
37 function onSourceMapLoaded(sourceMap) 24 function onSourceMapLoaded(sourceMap)
38 { 25 {
39 InspectorTest.sassSourceMapFactory().editableSourceMap(header.cssModel() .target(), sourceMap) 26 InspectorTest.sassSourceMapFactory().editableSourceMap(header.cssModel() .target(), sourceMap)
40 .then(map => callback(map)); 27 .then(map => callback(map));
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 } 291 }
305 if (!match) 292 if (!match)
306 return null; 293 return null;
307 var sourceRange = new WebInspector.SourceRange(match.index, match[0].length) ; 294 var sourceRange = new WebInspector.SourceRange(match.index, match[0].length) ;
308 var textRange = sourceRange.toTextRange(new WebInspector.Text(source)); 295 var textRange = sourceRange.toTextRange(new WebInspector.Text(source));
309 return new WebInspector.SourceEdit("", textRange, newText); 296 return new WebInspector.SourceEdit("", textRange, newText);
310 } 297 }
311 298
312 } 299 }
313 300
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/sass/test-ast-css-3-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698