Bug 1003095 - Parameterize helper functions in head_dbg.js;r=past

This commit is contained in:
Eddy Bruel 2014-05-15 16:40:12 +02:00
Родитель 40ef38722e
Коммит b5009853fd
1 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@ -122,10 +122,10 @@ function testGlobal(aName) {
return sandbox; return sandbox;
} }
function addTestGlobal(aName) function addTestGlobal(aName, aServer = DebuggerServer)
{ {
let global = testGlobal(aName); let global = testGlobal(aName);
DebuggerServer.addTestGlobal(global); aServer.addTestGlobal(global);
return global; return global;
} }
@ -179,21 +179,21 @@ function attachTestTabAndResume(aClient, aTitle, aCallback) {
/** /**
* Initialize the testing debugger server. * Initialize the testing debugger server.
*/ */
function initTestDebuggerServer() function initTestDebuggerServer(aServer = DebuggerServer)
{ {
DebuggerServer.registerModule("devtools/server/actors/script"); aServer.registerModule("devtools/server/actors/script");
DebuggerServer.registerModule("xpcshell-test/testactors"); aServer.registerModule("xpcshell-test/testactors");
// Allow incoming connections. // Allow incoming connections.
DebuggerServer.init(function () { return true; }); aServer.init(function () { return true; });
} }
function initTestTracerServer() function initTestTracerServer(aServer = DebuggerServer)
{ {
DebuggerServer.registerModule("devtools/server/actors/script"); aServer.registerModule("devtools/server/actors/script");
DebuggerServer.registerModule("xpcshell-test/testactors"); aServer.registerModule("xpcshell-test/testactors");
DebuggerServer.registerModule("devtools/server/actors/tracer"); aServer.registerModule("devtools/server/actors/tracer");
// Allow incoming connections. // Allow incoming connections.
DebuggerServer.init(function () { return true; }); aServer.init(function () { return true; });
} }
function finishClient(aClient) function finishClient(aClient)