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