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 inspected indentifier is highlighted. 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: michael@0: ok(bubble.contentsShown(), michael@0: "The variable should register as being shown."); michael@0: ok(!bubble._tooltip.isEmpty(), michael@0: "The variable inspection popup isn't empty."); michael@0: ok(bubble._markedText, michael@0: "There's some marked text in the editor."); michael@0: ok(bubble._markedText.clear, michael@0: "The marked text in the editor can be cleared."); michael@0: michael@0: yield hideVarPopup(panel); michael@0: michael@0: ok(!bubble.contentsShown(), michael@0: "The variable should register as being hidden."); 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: }