Bug 866306 - Add a library to make devtools protocol interaction a bit easier - fix xpcshell tests, r=orange

This commit is contained in:
Dave Camp 2013-06-15 12:10:23 -07:00
parent 1f10f88d87
commit 584463cee7
2 changed files with 8 additions and 4 deletions

View File

@ -87,7 +87,7 @@ function run_test()
DebuggerServer.init(() => true);
let trace = connectPipeTracing();
let client = new DebuggerClient(trace);
let rootClient = RootFront(client);
let rootClient;
let strfront = null;
@ -96,10 +96,13 @@ function run_test()
do_check_eq(rootClient.__poolMap.size, size + 1);
}
// Root actor has no children yet.
expectRootChildren(0);
client.connect((applicationType, traits) => {
rootClient = RootFront(client);
// Root actor has no children yet.
expectRootChildren(0);
trace.expectReceive({"from":"<actorid>","applicationType":"xpcshell-tests","traits":[]});
do_check_eq(applicationType, "xpcshell-tests");
rootClient.shortString().then(ret => {

View File

@ -169,12 +169,13 @@ function run_test()
check_except(() => protocol.types.getType("unknown:number"));
let trace = connectPipeTracing();
let client = new DebuggerClient(trace);
let rootClient = RootFront(client);
let rootClient;
client.connect((applicationType, traits) => {
trace.expectReceive({"from":"<actorid>","applicationType":"xpcshell-tests","traits":[]});
do_check_eq(applicationType, "xpcshell-tests");
rootClient = RootFront(client);
rootClient.simpleReturn().then(ret => {
trace.expectSend({"type":"simpleReturn","to":"<actorid>"});