Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
4 /**
5 * Tests opening inspecting variables works across scopes.
6 */
8 const TAB_URL = EXAMPLE_URL + "doc_scope-variable-3.html";
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;
17 // Allow this generator function to yield first.
18 executeSoon(() => debuggee.test());
19 yield waitForSourceAndCaretAndScopes(panel, ".html", 15);
21 yield openVarPopup(panel, { line: 12, ch: 10 });
22 ok(true, "The variable inspection popup was shown for the real variable.");
24 once(tooltip, "popupshown").then(() => {
25 ok(false, "The variable inspection popup shouldn't have been opened.");
26 });
28 reopenVarPopup(panel, { line: 18, ch: 10 });
29 yield waitForTime(1000);
31 yield resumeDebuggerThenCloseAndFinish(panel);
32 });
33 }