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

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

Issue 475393002: DevTools: [CodeMirror] roll codemirror to v4.4.1 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix creation of editor instance for test Created 6 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
« no previous file with comments | « no previous file | Source/devtools/front_end/cm/codemirror.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 function initialize_EditorTests() 1 function initialize_EditorTests()
2 { 2 {
3 3
4 InspectorTest.createTestEditor = function(clientHeight, textEditorDelegate) 4 InspectorTest.createTestEditor = function(clientHeight, textEditorDelegate)
5 { 5 {
6 runtime.loadModule("source_frame"); 6 runtime.loadModule("source_frame");
7 var textEditor = new WebInspector.CodeMirrorTextEditor("", textEditorDelegat e || new WebInspector.TextEditorDelegate()); 7 var textEditor = new WebInspector.CodeMirrorTextEditor("", textEditorDelegat e || new WebInspector.TextEditorDelegate());
8 if (clientHeight) 8 clientHeight = clientHeight || 100;
9 textEditor.element.style.height = clientHeight + "px"; 9 textEditor.element.style.height = clientHeight + "px";
10 textEditor.element.style.flex = "none"; 10 textEditor.element.style.flex = "none";
11 textEditor.show(WebInspector.inspectorView.element); 11 textEditor.show(WebInspector.inspectorView.element);
12 return textEditor; 12 return textEditor;
13 }; 13 };
14 14
15 function textWithSelection(text, selections) 15 function textWithSelection(text, selections)
16 { 16 {
17 if (!selections.length) 17 if (!selections.length)
18 return text; 18 return text;
19 19
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 function callbackWrapper() 168 function callbackWrapper()
169 { 169 {
170 editor._codeMirror.off("inputRead", callbackWrapper); 170 editor._codeMirror.off("inputRead", callbackWrapper);
171 callback(); 171 callback();
172 } 172 }
173 editor._codeMirror.on("inputRead", callbackWrapper); 173 editor._codeMirror.on("inputRead", callbackWrapper);
174 } 174 }
175 175
176 } 176 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/cm/codemirror.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698