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.
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 that the variable inspection popup is hidden when the editor scrolls. |
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 | |
michael@0 | 16 | // Allow this generator function to yield first. |
michael@0 | 17 | executeSoon(() => debuggee.start()); |
michael@0 | 18 | yield waitForSourceAndCaretAndScopes(panel, ".html", 24); |
michael@0 | 19 | |
michael@0 | 20 | // Inspect variable. |
michael@0 | 21 | yield openVarPopup(panel, { line: 15, ch: 12 }); |
michael@0 | 22 | yield hideVarPopupByScrollingEditor(panel); |
michael@0 | 23 | ok(true, "The variable inspection popup was hidden."); |
michael@0 | 24 | |
michael@0 | 25 | ok(bubble._tooltip.isEmpty(), |
michael@0 | 26 | "The variable inspection popup is now empty."); |
michael@0 | 27 | ok(!bubble._markedText, |
michael@0 | 28 | "The marked text in the editor was removed."); |
michael@0 | 29 | |
michael@0 | 30 | yield resumeDebuggerThenCloseAndFinish(panel); |
michael@0 | 31 | }); |
michael@0 | 32 | } |