mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 859372 - Refactor testactors.js;r=past
This commit is contained in:
parent
e46321bf42
commit
bec8fcca79
@ -185,7 +185,7 @@ function attachTestTabAndResume(aClient, aTitle, aCallback) {
|
|||||||
function initTestDebuggerServer()
|
function initTestDebuggerServer()
|
||||||
{
|
{
|
||||||
DebuggerServer.registerModule("devtools/server/actors/script");
|
DebuggerServer.registerModule("devtools/server/actors/script");
|
||||||
DebuggerServer.addActors("resource://test/testactors.js");
|
DebuggerServer.registerModule("xpcshell-test/testactors");
|
||||||
// Allow incoming connections.
|
// Allow incoming connections.
|
||||||
DebuggerServer.init(function () { return true; });
|
DebuggerServer.init(function () { return true; });
|
||||||
}
|
}
|
||||||
@ -193,7 +193,7 @@ function initTestDebuggerServer()
|
|||||||
function initTestTracerServer()
|
function initTestTracerServer()
|
||||||
{
|
{
|
||||||
DebuggerServer.registerModule("devtools/server/actors/script");
|
DebuggerServer.registerModule("devtools/server/actors/script");
|
||||||
DebuggerServer.addActors("resource://test/testactors.js");
|
DebuggerServer.registerModule("xpcshell-test/testactors");
|
||||||
DebuggerServer.registerModule("devtools/server/actors/tracer");
|
DebuggerServer.registerModule("devtools/server/actors/tracer");
|
||||||
// Allow incoming connections.
|
// Allow incoming connections.
|
||||||
DebuggerServer.init(function () { return true; });
|
DebuggerServer.init(function () { return true; });
|
||||||
|
@ -25,7 +25,7 @@ function run_test()
|
|||||||
check_except(DebuggerServer.closeListener);
|
check_except(DebuggerServer.closeListener);
|
||||||
check_except(DebuggerServer.connectPipe);
|
check_except(DebuggerServer.connectPipe);
|
||||||
|
|
||||||
DebuggerServer.addActors("resource://test/testactors.js");
|
DebuggerServer.registerModule("xpcshell-test/testactors");
|
||||||
|
|
||||||
// Now they should work.
|
// Now they should work.
|
||||||
DebuggerServer.openListener(-1);
|
DebuggerServer.openListener(-1);
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
/* Any copyright is dedicated to the Public Domain.
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
const Cu = Components.utils;
|
|
||||||
const devtools = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}).devtools;
|
|
||||||
const { ActorPool, appendExtraActors, createExtraActors } = require("devtools/server/actors/common");
|
const { ActorPool, appendExtraActors, createExtraActors } = require("devtools/server/actors/common");
|
||||||
const { RootActor } = devtools.require("devtools/server/actors/root");
|
const { RootActor } = require("devtools/server/actors/root");
|
||||||
const { ThreadActor } = devtools.require("devtools/server/actors/script");
|
const { ThreadActor } = require("devtools/server/actors/script");
|
||||||
|
const { DebuggerServer } = require("devtools/server/main");
|
||||||
|
|
||||||
var gTestGlobals = [];
|
var gTestGlobals = [];
|
||||||
DebuggerServer.addTestGlobal = function(aGlobal) {
|
DebuggerServer.addTestGlobal = function(aGlobal) {
|
||||||
@ -121,3 +120,11 @@ TestTabActor.prototype.requestTypes = {
|
|||||||
"attach": TestTabActor.prototype.onAttach,
|
"attach": TestTabActor.prototype.onAttach,
|
||||||
"detach": TestTabActor.prototype.onDetach
|
"detach": TestTabActor.prototype.onDetach
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.register = function(handle) {
|
||||||
|
handle.setRootActor(createRootActor);
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.unregister = function(handle) {
|
||||||
|
handle.setRootActor(null);
|
||||||
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user