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

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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

mercurial