michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: /** michael@0: * This tests if the debugger leaks on initialization and sudden destruction. michael@0: * You can also use this initialization format as a template for other tests. michael@0: * If leaks happen here, there's something very, very fishy going on. michael@0: */ michael@0: michael@0: const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html"; michael@0: michael@0: function test() { michael@0: // Wait longer for this very simple test that comes first, to make sure that michael@0: // GC from previous tests does not interfere with the debugger suite. michael@0: requestLongerTimeout(2); michael@0: michael@0: initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => { michael@0: ok(aTab, "Should have a tab available."); michael@0: ok(aDebuggee, "Should have a debuggee available."); michael@0: ok(aPanel, "Should have a debugger pane available."); michael@0: michael@0: waitForSourceAndCaretAndScopes(aPanel, "-02.js", 1).then(() => { michael@0: resumeDebuggerThenCloseAndFinish(aPanel); michael@0: }); michael@0: michael@0: aDebuggee.firstCall(); michael@0: }); michael@0: }