Step 1. Type "about:config" in address bar and make "signed.applets.codebase-principal-support" true. Step 2. Use this code.
++++++++++++++++++++++++++++++++++++++++++++++
-// test if an argument can be successfully passed to an application
-// that will return -1 if "mozilla" is not the first argument
-function test_arguments()
-{
- var testapp = filePrefix + "TestArguments" + fileSuffix;
-
- var file = Components.classes["@mozilla.org/file/local;1"]
- .createInstance(Components.interfaces.nsILocalFile);
- file.initWithPath(testapp);
-
- var process = Components.classes["@mozilla.org/process/util;1"]
- .createInstance(Components.interfaces.nsIProcess);
- process.init(file);
-
- var args= ["mozilla"];
-
- var pid = process.run(true, args, args.length);
-
- if (!pid) {
- return false;
- }
-
- if (process.exitValue) {
- return false;
- }
- return true;
-}
++++++++++++++++++++++
#include
int main(int argc, char* argv[]) { if (argc != 9) return -1;
if (strcmp("mozilla", argv[1]) != 0) return 1; if (strcmp("firefox", argv[2]) != 0) return 2; if (strcmp("thunderbird", argv[3]) != 0) return 3; if (strcmp("seamonkey", argv[4]) != 0) return 4; if (strcmp("foo", argv[5]) != 0) return 5; if (strcmp("bar", argv[6]) != 0) return 6; if (strcmp("argument with spaces", argv[7]) != 0) return 7; if (strcmp("\"argument with quotes\"", argv[8]) != 0) return 8;