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 * Test that closing a tab with the debugger in a paused state exits cleanly.
6 */
8 let gTab, gDebuggee, gPanel, gDebugger;
10 const TAB_URL = EXAMPLE_URL + "doc_inline-debugger-statement.html";
12 function test() {
13 initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
14 gTab = aTab;
15 gDebuggee = aDebuggee;
16 gPanel = aPanel;
17 gDebugger = gPanel.panelWin;
19 testCleanExit();
20 });
21 }
23 function testCleanExit() {
24 waitForSourceAndCaretAndScopes(gPanel, ".html", 16).then(() => {
25 is(gDebugger.gThreadClient.paused, true,
26 "Should be paused after the debugger statement.");
28 closeDebuggerAndFinish(gPanel, { whilePaused: true });
29 });
31 gDebuggee.runDebuggerStatement();
32 }
34 registerCleanupFunction(function() {
35 gTab = null;
36 gDebuggee = null;
37 gPanel = null;
38 gDebugger = null;
39 });