test_ipcshell.js 752 B

1234567891011121314151617181920212223242526272829
  1. function callback(result) {
  2. do_check_eq(result, Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT);
  3. do_test_finished();
  4. }
  5. function run_test() {
  6. do_test_pending();
  7. do_check_eq(runtime.processType, Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT);
  8. sendCommand("load('test_ipcshell_child.js');");
  9. sendCommand("runtime.processType;", callback);
  10. [ [ "C", "D" ], [ "D", "C" ], [ "\u010C", "D" ], [ "D", "\u010C" ] ].forEach(
  11. function (pair) {
  12. do_test_pending();
  13. var cmp = pair[0].localeCompare(pair[1]);
  14. sendCommand(
  15. "'"+ pair[0] +"'.localeCompare('"+ pair[1] +"');",
  16. function (result) {
  17. do_check_eq(cmp, result);
  18. do_test_finished();
  19. });
  20. })
  21. }
  22. load('test_ipcshell_child.js');