diff options
Diffstat (limited to 'browser/devtools/debugger/test/browser_dbg_aaa_run_first_leaktest.js')
-rw-r--r-- | browser/devtools/debugger/test/browser_dbg_aaa_run_first_leaktest.js | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/browser/devtools/debugger/test/browser_dbg_aaa_run_first_leaktest.js b/browser/devtools/debugger/test/browser_dbg_aaa_run_first_leaktest.js deleted file mode 100644 index a179a2d0a..000000000 --- a/browser/devtools/debugger/test/browser_dbg_aaa_run_first_leaktest.js +++ /dev/null @@ -1,73 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ */ - -/** - * This tests if the debugger leaks. - * If leaks happen here, there's something very, very fishy going on. - */ - -const TAB_URL = EXAMPLE_URL + "browser_dbg_script-switching.html"; - -let gPane = null; -let gTab = null; -let gDebuggee = null; -let gDebugger = null; - -function test() -{ - let scriptShown = false; - let framesAdded = false; - let resumed = false; - let testStarted = false; - - // Wait longer for this very simple test that comes first, to make sure that - // GC from previous tests does not interfere with the debugger suite. - requestLongerTimeout(2); - - debug_tab_pane(TAB_URL, function(aTab, aDebuggee, aPane) { - gTab = aTab; - gDebuggee = aDebuggee; - gPane = aPane; - gDebugger = gPane.panelWin; - resumed = true; - - gDebugger.addEventListener("Debugger:SourceShown", onScriptShown); - - gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() { - framesAdded = true; - executeSoon(startTest); - }); - - executeSoon(function() { - gDebuggee.firstCall(); - }); - }); - - function onScriptShown(aEvent) - { - scriptShown = aEvent.detail.url.indexOf("-02.js") != -1; - executeSoon(startTest); - } - - function startTest() - { - if (scriptShown && framesAdded && resumed && !testStarted) { - gDebugger.removeEventListener("Debugger:SourceShown", onScriptShown); - testStarted = true; - Services.tm.currentThread.dispatch({ run: performTest }, 0); - } - } - - function performTest() - { - closeDebuggerAndFinish(); - } - - registerCleanupFunction(function() { - removeTab(gTab); - gPane = null; - gTab = null; - gDebuggee = null; - gDebugger = null; - }); -} |