function getQuickOpenTest(quickOpenQuery, gotoLineQuery, file, line, col) {
            return function () {
                var editor,
                    $scroller;

                SpecRunnerUtils.loadProjectInTestWindow(testPath);

                runs(function () {
                    var promise = SpecRunnerUtils.openProjectFiles([]);
                    waitsForDone(promise, "open project files");
                });

                runs(function () {
                    // Test quick open using a partial file name
                    executeCommand(Commands.NAVIGATE_QUICK_OPEN);

                    // need to set the timeout length here to ensure that it has a chance to load the file
                    // list.
                    enterSearchText(quickOpenQuery, 100);
                });

                waitsFor(function () {
                    return getSearchField().val() === quickOpenQuery;
                }, "filename entry timeout", 1000);

                runs(function () {
                    pressEnter();
                });

                waitsFor(function () {
                    editor = EditorManager.getCurrentFullEditor();
                    return editor !== null && getSearchBar().length === 0;
                }, "file opening timeout", 3000);

                runs(function () {
                    $scroller = test$(editor.getScrollerElement());

                    // Make sure we've opened the right file. It should open the longer one, because
                    // of the scoring in the StringMatch algorithm.
                    expect(DocumentManager.getCurrentDocument().file.name).toEqual(file);

                    if (gotoLineQuery) {
                        // Test go to line
                        executeCommand(Commands.NAVIGATE_GOTO_LINE);
                        enterSearchText(gotoLineQuery);
                    }
                });

                runs(function () {
                    if (gotoLineQuery) {
                        var editor = EditorManager.getCurrentFullEditor();
                        SpecRunnerUtils.resizeEditor(editor, 0, 600);

                        waitsFor(function () {
                            return getSearchField().val() === gotoLineQuery;
                        }, "goto line entry timeout", 1000);

                        runs(function () {
                            pressEnter();
                        });

                        // wait for ModalBar to close
                        waitsFor(function () {
                            return getSearchBar().length === 0;
                        }, "ModalBar close", 1000);
                    }
                });

                runs(function () {
                    // The user enters a 1-based number, but the reported position
                    // is 0 based, so we check for line-1, col-1.
                    expect(editor).toHaveCursorPosition(line - 1, col - 1);

                    // We expect the result to be scrolled roughly to the middle of the window.
                    var offset = $scroller.offset().top;
                    var editorHeight = $scroller.height();
                    var cursorPos = editor._codeMirror.cursorCoords(null, "page").bottom;

                    expect(cursorPos).toBeGreaterThan(editorHeight * 0.4 + offset);
                    expect(cursorPos).toBeLessThan(editorHeight * 0.6 + offset);
                });
            };
        }
Creates a parameterized quick open test.
@param {string} quickOpenQuery The search query to execute after the NAVIGATE_QUICK_OPEN command.
@param {?string} gotoLineQuery The search query to execute after the NAVIGATE_GOTO_LINE command.
@param {string} file The name of the file that should be opened.
@param {number} line The line (1-based) where the cursor should be at the end of the operations.
@param {number} col The column (1-based) where the cursor should be at the end of the operations.
@return {function()} The configured test function.