browser/devtools/debugger/test/browser_dbg_aaa_run_first_leaktest.js

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* Any copyright is dedicated to the Public Domain.
     2    http://creativecommons.org/publicdomain/zero/1.0/ */
     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  */
    10 const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
    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);
    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.");
    22     waitForSourceAndCaretAndScopes(aPanel, "-02.js", 1).then(() => {
    23       resumeDebuggerThenCloseAndFinish(aPanel);
    24     });
    26     aDebuggee.firstCall();
    27   });
    28 }

mercurial