mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
23913ae271
--HG-- extra : rebase_source : c9f1f7da216e006ab1983127f9aa61da25f7da92
44 lines
1.5 KiB
JavaScript
44 lines
1.5 KiB
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
"use strict";
|
|
|
|
const Profiler = Cc["@mozilla.org/tools/profiler;1"].getService(Ci.nsIProfiler);
|
|
|
|
function check_actors(expect) {
|
|
do_check_eq(expect, DebuggerServer.tabActorFactories.hasOwnProperty("registeredActor1"));
|
|
do_check_eq(expect, DebuggerServer.tabActorFactories.hasOwnProperty("registeredActor2"));
|
|
|
|
do_check_eq(expect, DebuggerServer.globalActorFactories.hasOwnProperty("registeredActor2"));
|
|
do_check_eq(expect, DebuggerServer.globalActorFactories.hasOwnProperty("registeredActor1"));
|
|
}
|
|
|
|
function run_test()
|
|
{
|
|
DebuggerServer.init(function () { return true; });
|
|
// The xpcshell-test/ path maps to resource://test/
|
|
DebuggerServer.registerModule("xpcshell-test/registertestactors-01");
|
|
DebuggerServer.registerModule("xpcshell-test/registertestactors-02");
|
|
|
|
check_actors(true);
|
|
|
|
check_except(() => {
|
|
DebuggerServer.registerModule("xpcshell-test/registertestactors-01");
|
|
});
|
|
check_except(() => {
|
|
DebuggerServer.registerModule("xpcshell-test/registertestactors-02");
|
|
});
|
|
|
|
DebuggerServer.unregisterModule("xpcshell-test/registertestactors-01");
|
|
DebuggerServer.unregisterModule("xpcshell-test/registertestactors-02");
|
|
check_actors(false);
|
|
|
|
DebuggerServer.registerModule("xpcshell-test/registertestactors-01");
|
|
DebuggerServer.registerModule("xpcshell-test/registertestactors-02");
|
|
check_actors(true);
|
|
|
|
DebuggerServer.destroy();
|
|
check_actors(false);
|
|
}
|
|
|