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

Side by Side Diff: LayoutTests/inspector/editor/highlighter-test.js

Issue 22638008: DevTools: Use CodeMirror modes instead of highlight tokenizers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address comments Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 function initialize_HighlighterTests()
2 {
3
4 InspectorTest.dumpTextModel = function(textModel)
5 {
6 var lines = [];
7 for (var i = 0; i < textModel.linesCount; ++i) {
8 var line = textModel.line(i);
9 var highlight = textModel.getAttribute(i, "highlight");
10 var result = (i + 1) + " : " + line + " :";
11 if (highlight) {
12 for (var j = 0; j < highlight.ranges.length; ++j) {
13 var range = highlight.ranges[j];
14 result += " " + range.token + "[" + range.startColumn + "-" + (r ange.endColumn + 1) + "]";
15 }
16 } else
17 result += " null";
18 lines.push(result);
19 }
20 InspectorTest.addResult(lines.join("\n"));
21 };
22
23 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698