mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
Bug 1307852 - Pass ID of calling add-on to native messaging app r=aswan
This allows native messaging binaries to identify the add-on that invoked the native messaging app, in case more than one add-on is allowed to launch the native messaging app. MozReview-Commit-ID: GgjwfJDbBkW --HG-- extra : rebase_source : b60d33e9f3936f26b8792ef5cd1f9fea304f29ae
This commit is contained in:
parent
34fee886ae
commit
7802980fa2
@ -198,7 +198,7 @@ this.NativeApp = class extends EventEmitter {
|
||||
|
||||
let subprocessOpts = {
|
||||
command: command,
|
||||
arguments: [hostInfo.path],
|
||||
arguments: [hostInfo.path, context.extension.id],
|
||||
workdir: OS.Path.dirname(command),
|
||||
stderr: "pipe",
|
||||
};
|
||||
|
@ -435,8 +435,9 @@ add_task(async function test_child_process() {
|
||||
await extension.startup();
|
||||
|
||||
let msg = await extension.awaitMessage("result");
|
||||
equal(msg.args.length, 2, "Received one command line argument");
|
||||
equal(msg.args.length, 3, "Received two command line arguments");
|
||||
equal(msg.args[1], getPath("info.json"), "Command line argument is the path to the native host manifest");
|
||||
equal(msg.args[2], ID, "Second command line argument is the ID of the calling extension");
|
||||
equal(msg.cwd.replace(/^\/private\//, "/"), tmpDir.path,
|
||||
"Working directory is the directory containing the native appliation");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user