From b5009853fdcaddf895c9911d46dafbead3ca829f Mon Sep 17 00:00:00 2001 From: Eddy Bruel Date: Thu, 15 May 2014 16:40:12 +0200 Subject: [PATCH] Bug 1003095 - Parameterize helper functions in head_dbg.js;r=past --- .../devtools/server/tests/unit/head_dbg.js | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/toolkit/devtools/server/tests/unit/head_dbg.js b/toolkit/devtools/server/tests/unit/head_dbg.js index 97eee444bb6e..1e55104e6a26 100644 --- a/toolkit/devtools/server/tests/unit/head_dbg.js +++ b/toolkit/devtools/server/tests/unit/head_dbg.js @@ -122,10 +122,10 @@ function testGlobal(aName) { return sandbox; } -function addTestGlobal(aName) +function addTestGlobal(aName, aServer = DebuggerServer) { let global = testGlobal(aName); - DebuggerServer.addTestGlobal(global); + aServer.addTestGlobal(global); return global; } @@ -179,21 +179,21 @@ function attachTestTabAndResume(aClient, aTitle, aCallback) { /** * Initialize the testing debugger server. */ -function initTestDebuggerServer() +function initTestDebuggerServer(aServer = DebuggerServer) { - DebuggerServer.registerModule("devtools/server/actors/script"); - DebuggerServer.registerModule("xpcshell-test/testactors"); + aServer.registerModule("devtools/server/actors/script"); + aServer.registerModule("xpcshell-test/testactors"); // 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"); - DebuggerServer.registerModule("xpcshell-test/testactors"); - DebuggerServer.registerModule("devtools/server/actors/tracer"); + aServer.registerModule("devtools/server/actors/script"); + aServer.registerModule("xpcshell-test/testactors"); + aServer.registerModule("devtools/server/actors/tracer"); // Allow incoming connections. - DebuggerServer.init(function () { return true; }); + aServer.init(function () { return true; }); } function finishClient(aClient)