@@ -41,24 +41,22 @@ define(function (require, exports, module) {
4141 testEditor ;
4242
4343 /**
44- * Returns an Editor suitable for use in isolation: i.e., a Document that
45- * will never be set as the currentDocument or added to the working set.
44+ * Returns an Editor suitable for use in isolation, given a Document. (Unlike
45+ * SpecRunnerUtils.createMockEditor(), which is given text and creates the Document
46+ * for you).
4647 *
4748 * @param {Document } doc - the document to be contained by the new Editor
48- * @param {string } mode - the CodeMirror mode of the new Editor
4949 * @return {Editor } - the mock editor object
5050 */
51- function createMockEditor ( doc , mode ) {
52- mode = mode || "" ;
53-
51+ function createMockEditor ( doc ) {
5452 // Initialize EditorManager
5553 var $editorHolder = $ ( "<div id='mock-editor-holder'/>" ) ;
5654 EditorManager . setEditorHolder ( $editorHolder ) ;
5755 EditorManager . _init ( ) ;
5856 $ ( "body" ) . append ( $editorHolder ) ;
5957
6058 // create Editor instance
61- var editor = new Editor ( doc , true , mode , $editorHolder . get ( 0 ) ) ;
59+ var editor = new Editor ( doc , true , $editorHolder . get ( 0 ) ) ;
6260
6361 return editor ;
6462 }
@@ -263,7 +261,7 @@ define(function (require, exports, module) {
263261
264262 // create Editor instance (containing a CodeMirror instance)
265263 runs ( function ( ) {
266- testEditor = createMockEditor ( testDoc , "javascript" ) ;
264+ testEditor = createMockEditor ( testDoc ) ;
267265 JSCodeHints . initializeSession ( testEditor ) ;
268266 } ) ;
269267 } ) ;
0 commit comments