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

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

Issue 1943763002: DevTools: [SASS] fix CSSWorkspaceBinding.propertyUILocation to account for comments (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@super-sass
Patch Set: fix tests 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
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; 5 var cssParserService = null;
6 6
7 InspectorTest.cssParserService = function() 7 InspectorTest.cssParserService = function()
8 { 8 {
9 if (!cssParserService) 9 if (!cssParserService)
10 cssParserService = new WebInspector.CSSParserService(); 10 cssParserService = new WebInspector.CSSParserService();
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 { 298 {
299 matchNumber = matchNumber || 0; 299 matchNumber = matchNumber || 0;
300 var re = new RegExp(pattern.escapeForRegExp(), "g"); 300 var re = new RegExp(pattern.escapeForRegExp(), "g");
301 var match; 301 var match;
302 while ((match = re.exec(source)) !== null && matchNumber) { 302 while ((match = re.exec(source)) !== null && matchNumber) {
303 --matchNumber; 303 --matchNumber;
304 } 304 }
305 if (!match) 305 if (!match)
306 return null; 306 return null;
307 var sourceRange = new WebInspector.SourceRange(match.index, match[0].length) ; 307 var sourceRange = new WebInspector.SourceRange(match.index, match[0].length) ;
308 var textRange = sourceRange.toTextRange(new WebInspector.Text(source)); 308 var textRange = new WebInspector.Text(source).toTextRange(sourceRange);
309 return new WebInspector.SourceEdit("", textRange, newText); 309 return new WebInspector.SourceEdit("", textRange, newText);
310 } 310 }
311 311
312 } 312 }
313 313
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698