testactors.js (569B)
1 /* Any copyright is dedicated to the Public Domain. 2 * http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 const { Actor } = require("resource://devtools/shared/protocol/Actor.js"); 7 8 class TestActor1 extends Actor { 9 constructor(conn, tab) { 10 super(conn, { typeName: "testOne", methods: [] }); 11 this.tab = tab; 12 13 this.requestTypes = { 14 ping: TestActor1.prototype.onPing, 15 }; 16 } 17 18 grip() { 19 return { actor: this.actorID, test: "TestActor1" }; 20 } 21 22 onPing() { 23 return { pong: "pong" }; 24 } 25 } 26 27 exports.TestActor1 = TestActor1;