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

Side by Side Diff: LayoutTests/inspector/editor/highlighter-chunk-limit.html

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 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="highlighter-test.js"></script>
5 <script>
6
7 function test()
8 {
9
10 var singleLine = "this.field = this.field = \"foo\"; /* comment here */ this .otherField = 12; // end of line\n";
11 src = "";
12 for (var i = 0; i < 10; ++i)
13 src += singleLine;
14
15 var textModel = new WebInspector.TextEditorModel();
16 textModel.setText(src);
17
18 function damageCallback(startLine, endLine)
19 {
20 if (endLine === textModel.linesCount) {
21 InspectorTest.addResult("Highlighter results");
22 InspectorTest.dumpTextModel(textModel);
23 InspectorTest.completeTest();
24 }
25 }
26
27 var highlighter = new WebInspector.TextEditorHighlighter(textModel, damageCa llback);
28 highlighter.mimeType = "text/javascript";
29 highlighter.highlightChunkLimit = 3;
30 highlighter.highlight(textModel.linesCount);
31 }
32
33 </script>
34 </head>
35
36 <body onload="runTest()">
37 <p>
38 This test checks highlighting with specific highlightChunkLimit.
39 </p>
40
41 </body>
42 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698