function createMockEditorForDocument(doc, visibleRange) {
        // Initialize EditorManager/WorkspaceManager and position the editor-holder offscreen
        // (".content" may not exist, but that's ok for headless tests where editor height doesn't matter)
        var $editorHolder = createMockElement().css("width", "1000px").attr("id", "hidden-editors");
        WorkspaceManager._setMockDOM($(".content"), $editorHolder);

        // create Editor instance
        return createEditorInstance(doc, $editorHolder, visibleRange);
    }
Returns an Editor tied to the given Document, but suitable for use in isolation
(without being placed inside the surrounding Brackets UI). The Editor *will* be
reported as the "active editor" by EditorManager.

Must be cleaned up by calling destroyMockEditor(document) later.

@param {!Document} doc
@param {{startLine: number, endLine: number}=} visibleRange
@return {!Editor}