| OLD | NEW |
| 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 loadScript("CodeMirrorTextEditor.js"); | 6 loadScript("CodeMirrorTextEditor.js"); |
| 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 if (clientHeight) |
| 9 textEditor.element.style.height = clientHeight + "px"; | 9 textEditor.element.style.height = clientHeight + "px"; |
| 10 textEditor.element.style.flex = "none"; |
| 10 textEditor.show(WebInspector.inspectorView.element); | 11 textEditor.show(WebInspector.inspectorView.element); |
| 11 return textEditor; | 12 return textEditor; |
| 12 }; | 13 }; |
| 13 | 14 |
| 14 InspectorTest.textWithSelection = function(text, selection) | 15 InspectorTest.textWithSelection = function(text, selection) |
| 15 { | 16 { |
| 16 if (!selection) | 17 if (!selection) |
| 17 return text; | 18 return text; |
| 18 | 19 |
| 19 function lineWithCursor(line, column, cursorChar) | 20 function lineWithCursor(line, column, cursorChar) |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 149 |
| 149 function callbackWrapper() | 150 function callbackWrapper() |
| 150 { | 151 { |
| 151 editor._codeMirror.off("inputRead", callbackWrapper); | 152 editor._codeMirror.off("inputRead", callbackWrapper); |
| 152 callback(); | 153 callback(); |
| 153 } | 154 } |
| 154 editor._codeMirror.on("inputRead", callbackWrapper); | 155 editor._codeMirror.on("inputRead", callbackWrapper); |
| 155 } | 156 } |
| 156 | 157 |
| 157 } | 158 } |
| OLD | NEW |