|
1 /* Any copyright is dedicated to the Public Domain. |
|
2 http://creativecommons.org/publicdomain/zero/1.0/ */ |
|
3 |
|
4 /** |
|
5 * This tests if the debugger leaks on initialization and sudden destruction. |
|
6 * You can also use this initialization format as a template for other tests. |
|
7 * If leaks happen here, there's something very, very fishy going on. |
|
8 */ |
|
9 |
|
10 const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html"; |
|
11 |
|
12 function test() { |
|
13 // Wait longer for this very simple test that comes first, to make sure that |
|
14 // GC from previous tests does not interfere with the debugger suite. |
|
15 requestLongerTimeout(2); |
|
16 |
|
17 initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => { |
|
18 ok(aTab, "Should have a tab available."); |
|
19 ok(aDebuggee, "Should have a debuggee available."); |
|
20 ok(aPanel, "Should have a debugger pane available."); |
|
21 |
|
22 waitForSourceAndCaretAndScopes(aPanel, "-02.js", 1).then(() => { |
|
23 resumeDebuggerThenCloseAndFinish(aPanel); |
|
24 }); |
|
25 |
|
26 aDebuggee.firstCall(); |
|
27 }); |
|
28 } |