ipc/testshell/tests/test_ipcshell.js

branch
TOR_BUG_9701
changeset 8
97036ab72558
equal deleted inserted replaced
-1:000000000000 0:f5f76d5ffae6
1 function callback(result) {
2 do_check_eq(result, Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT);
3 do_test_finished();
4 }
5
6 function run_test() {
7 do_test_pending();
8
9 do_check_eq(runtime.processType, Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT);
10
11 sendCommand("load('test_ipcshell_child.js');");
12
13 sendCommand("runtime.processType;", callback);
14
15 [ [ "C", "D" ], [ "D", "C" ], [ "\u010C", "D" ], [ "D", "\u010C" ] ].forEach(
16 function (pair) {
17 do_test_pending();
18 var cmp = pair[0].localeCompare(pair[1]);
19 sendCommand(
20 "'"+ pair[0] +"'.localeCompare('"+ pair[1] +"');",
21 function (result) {
22 do_check_eq(cmp, result);
23 do_test_finished();
24 });
25 })
26 }
27 load('test_ipcshell_child.js');
28

mercurial