browser/devtools/debugger/test/browser_dbg_variables-view-popup-15.js

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:301e3afd9c75
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
3
4 /**
5 * Tests opening the variable inspection popup directly on literals.
6 */
7
8 const TAB_URL = EXAMPLE_URL + "doc_frame-parameters.html";
9
10 function test() {
11 Task.spawn(function() {
12 let [tab, debuggee, panel] = yield initDebugger(TAB_URL);
13 let win = panel.panelWin;
14 let bubble = win.DebuggerView.VariableBubble;
15 let tooltip = bubble._tooltip.panel;
16
17 // Allow this generator function to yield first.
18 executeSoon(() => debuggee.start());
19 yield waitForSourceAndCaretAndScopes(panel, ".html", 24);
20
21 yield openVarPopup(panel, { line: 15, ch: 12 });
22 ok(true, "The variable inspection popup was shown for the real variable.");
23
24 once(tooltip, "popupshown").then(() => {
25 ok(false, "The variable inspection popup shouldn't have been opened.");
26 });
27
28 reopenVarPopup(panel, { line: 17, ch: 27 });
29 yield waitForTime(1000);
30
31 yield resumeDebuggerThenCloseAndFinish(panel);
32 });
33 }

mercurial