1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/devtools/debugger/test/testactors.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,31 @@ 1.4 +/* Any copyright is dedicated to the Public Domain. 1.5 + http://creativecommons.org/publicdomain/zero/1.0/ */ 1.6 + 1.7 +function TestActor1(aConnection, aTab) 1.8 +{ 1.9 + this.conn = aConnection; 1.10 + this.tab = aTab; 1.11 +} 1.12 + 1.13 +TestActor1.prototype = { 1.14 + actorPrefix: "test_one", 1.15 + 1.16 + grip: function TA1_grip() { 1.17 + return { actor: this.actorID, 1.18 + test: "TestActor1" }; 1.19 + }, 1.20 + 1.21 + onPing: function TA1_onPing() { 1.22 + return { pong: "pong" }; 1.23 + } 1.24 +}; 1.25 + 1.26 +TestActor1.prototype.requestTypes = { 1.27 + "ping": TestActor1.prototype.onPing 1.28 +}; 1.29 + 1.30 +DebuggerServer.removeTabActor(TestActor1); 1.31 +DebuggerServer.removeGlobalActor(TestActor1); 1.32 + 1.33 +DebuggerServer.addTabActor(TestActor1, "testTabActor1"); 1.34 +DebuggerServer.addGlobalActor(TestActor1, "testGlobalActor1");