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

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

Issue 1809533003: DevTools: remove illusionary caching from String.prototype.lineEndings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/inspector/sass/sass-test.js
diff --git a/third_party/WebKit/LayoutTests/inspector/sass/sass-test.js b/third_party/WebKit/LayoutTests/inspector/sass/sass-test.js
index 317118aa3229909f204ca11176e88d94d0a3d9c5..f0c089f8121dcc884a3fe1e58cb0c0a100bfce0a 100644
--- a/third_party/WebKit/LayoutTests/inspector/sass/sass-test.js
+++ b/third_party/WebKit/LayoutTests/inspector/sass/sass-test.js
@@ -168,7 +168,7 @@ InspectorTest.validateASTRanges = function(ast)
function validate(textNode)
{
- if (textNode.range.extract(textNode.document.text) !== textNode.text)
+ if (textNode.document.text.extract(textNode.range) !== textNode.text)
invalidNodes.push(textNode);
}
}
@@ -234,7 +234,7 @@ InspectorTest.runCSSEditTests = function(header, tests)
}
var test = tests.shift();
logTestName(test.name);
- var text = astSourceMap.cssAST().document.text;
+ var text = astSourceMap.cssAST().document.text.value();
var edits = test(text);
logSourceEdits(text, edits);
var ranges = edits.map(edit => edit.oldRange);
@@ -262,7 +262,7 @@ InspectorTest.runCSSEditTests = function(header, tests)
{
customTitle = customTitle || ast.document.url.split("/").pop();
InspectorTest.addResult("===== " + customTitle + " =====");
- var text = ast.document.text.replace(/ /g, ".");
+ var text = ast.document.text.value().replace(/ /g, ".");
var lines = text.split("\n");
if (!avoidIndent)
lines = indent(lines);
@@ -287,7 +287,7 @@ InspectorTest.runCSSEditTests = function(header, tests)
var edit = edits[i];
var range = edit.oldRange;
var line = String.sprintf("{%d, %d, %d, %d}", range.startLine, range.startColumn, range.endLine, range.endColumn);
- line += String.sprintf(" '%s' => '%s'", range.extract(text), edit.newText);
+ line += String.sprintf(" '%s' => '%s'", (new WebInspector.Text(text)).extract(range), edit.newText);
lines.push(line);
}
lines = indent(lines);

Powered by Google App Engine
This is Rietveld 408576698