michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: /** michael@0: * Tests that the variable inspection popup is hidden when the editor scrolls. michael@0: */ michael@0: michael@0: const TAB_URL = EXAMPLE_URL + "doc_frame-parameters.html"; michael@0: michael@0: function test() { michael@0: Task.spawn(function() { michael@0: let [tab, debuggee, panel] = yield initDebugger(TAB_URL); michael@0: let win = panel.panelWin; michael@0: let bubble = win.DebuggerView.VariableBubble; michael@0: michael@0: // Allow this generator function to yield first. michael@0: executeSoon(() => debuggee.start()); michael@0: yield waitForSourceAndCaretAndScopes(panel, ".html", 24); michael@0: michael@0: // Inspect variable. michael@0: yield openVarPopup(panel, { line: 15, ch: 12 }); michael@0: yield hideVarPopupByScrollingEditor(panel); michael@0: ok(true, "The variable inspection popup was hidden."); michael@0: michael@0: ok(bubble._tooltip.isEmpty(), michael@0: "The variable inspection popup is now empty."); michael@0: ok(!bubble._markedText, michael@0: "The marked text in the editor was removed."); michael@0: michael@0: yield resumeDebuggerThenCloseAndFinish(panel); michael@0: }); michael@0: }