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

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:66bce002f999
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
3
4 /**
5 * Tests that the variable inspection popup is hidden when the editor scrolls.
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
16 // Allow this generator function to yield first.
17 executeSoon(() => debuggee.start());
18 yield waitForSourceAndCaretAndScopes(panel, ".html", 24);
19
20 // Inspect variable.
21 yield openVarPopup(panel, { line: 15, ch: 12 });
22 yield hideVarPopupByScrollingEditor(panel);
23 ok(true, "The variable inspection popup was hidden.");
24
25 ok(bubble._tooltip.isEmpty(),
26 "The variable inspection popup is now empty.");
27 ok(!bubble._markedText,
28 "The marked text in the editor was removed.");
29
30 yield resumeDebuggerThenCloseAndFinish(panel);
31 });
32 }

mercurial