browser/devtools/debugger/test/browser_dbg_global-method-override.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/browser/devtools/debugger/test/browser_dbg_global-method-override.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,20 @@
     1.4 +/* Any copyright is dedicated to the Public Domain.
     1.5 +   http://creativecommons.org/publicdomain/zero/1.0/ */
     1.6 +
     1.7 +/**
     1.8 + * Tests that scripts that override properties of the global object, like
     1.9 + * toString don't break the debugger. The test page used to cause the debugger
    1.10 + * to throw when trying to attach to the thread actor.
    1.11 + */
    1.12 +
    1.13 +const TAB_URL = EXAMPLE_URL + "doc_global-method-override.html";
    1.14 +
    1.15 +function test() {
    1.16 +  initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
    1.17 +    let gDebugger = aPanel.panelWin;
    1.18 +    ok(gDebugger, "Should have a debugger available.");
    1.19 +    is(gDebugger.gThreadClient.state, "attached", "Debugger should be attached.");
    1.20 +
    1.21 +    closeDebuggerAndFinish(aPanel);
    1.22 +  });
    1.23 +}

mercurial