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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/sources-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: String.prototype.lineEndings -> String.prototype.computeLineEndings 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/http/tests/inspector/sources-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/sources-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector/sources-test.js
index 707fb81d01ec298e4081e830df8d9d859dfb9f63..a7950c9336578657bc29421650d5ae118251a5c4 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/sources-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/sources-test.js
@@ -6,9 +6,9 @@ function testSourceMapping(text1, text2, mapping, testToken)
{
var originalPosition = text1.indexOf(testToken);
InspectorTest.assertTrue(originalPosition !== -1);
- var originalLocation = WebInspector.Formatter.positionToLocation(text1.lineEndings(), originalPosition);
+ var originalLocation = WebInspector.Formatter.positionToLocation(text1.computeLineEndings(), originalPosition);
var formattedLocation = mapping.originalToFormatted(originalLocation[0], originalLocation[1]);
- var formattedPosition = WebInspector.Formatter.locationToPosition(text2.lineEndings(), formattedLocation[0], formattedLocation[1]);
+ var formattedPosition = WebInspector.Formatter.locationToPosition(text2.computeLineEndings(), formattedLocation[0], formattedLocation[1]);
var expectedFormattedPosition = text2.indexOf(testToken);
if (expectedFormattedPosition === formattedPosition)
InspectorTest.addResult(String.sprintf("Correct mapping for <%s>", testToken));

Powered by Google App Engine
This is Rietveld 408576698