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 opening inspecting variables works across scopes. michael@0: */ michael@0: michael@0: const TAB_URL = EXAMPLE_URL + "doc_scope-variable-3.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: let tooltip = bubble._tooltip.panel; michael@0: michael@0: // Allow this generator function to yield first. michael@0: executeSoon(() => debuggee.test()); michael@0: yield waitForSourceAndCaretAndScopes(panel, ".html", 15); michael@0: michael@0: yield openVarPopup(panel, { line: 12, ch: 10 }); michael@0: ok(true, "The variable inspection popup was shown for the real variable."); michael@0: michael@0: once(tooltip, "popupshown").then(() => { michael@0: ok(false, "The variable inspection popup shouldn't have been opened."); michael@0: }); michael@0: michael@0: reopenVarPopup(panel, { line: 18, ch: 10 }); michael@0: yield waitForTime(1000); michael@0: michael@0: yield resumeDebuggerThenCloseAndFinish(panel); michael@0: }); michael@0: }