Skip to content
This repository has been archived by the owner on Nov 27, 2019. It is now read-only.

Commit

Permalink
Bug 1129206 creating a multiprocess permission to match multiprocessC…
Browse files Browse the repository at this point in the history
…ompatible a=me
  • Loading branch information
erikvold committed Mar 31, 2015
1 parent f272adc commit 316d282
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/rdf.js
Expand Up @@ -79,6 +79,10 @@ function createRDF (manifest) {
jetpackMeta["em:optionsType"] = 2;
}

if (manifest.permissions && manifest.permissions.multiprocess === true) {
jetpackMeta["em:multiprocessCompatible"] = true;
}

header[0].children.push(description);

// clean jetpackMeta
Expand Down
14 changes: 14 additions & 0 deletions test/unit/test.rdf.js
Expand Up @@ -169,6 +169,20 @@ describe("lib/rdf", function () {
expect(xml.indexOf("updateKey")).to.be.equal(-1);
});

it("multiprocess permission", function() {
var xml = parseRDF(createRDF({ id: "1" }));
expect(nodeExists(xml, "em:multiprocessCompatible")).to.be.equal(false);
expect(getData(xml, "em:multiprocessCompatible")).to.be.equal(undefined);

var xml = parseRDF(createRDF({ id: "1", permissions: { multiprocess: true } }));
expect(nodeExists(xml, "em:multiprocessCompatible")).to.be.equal(true);
expect(getData(xml, "em:multiprocessCompatible")).to.be.equal("true");

var xml = parseRDF(createRDF({ id: "1", permissions: { multiprocess: false } }));
expect(nodeExists(xml, "em:multiprocessCompatible")).to.be.equal(false);
expect(getData(xml, "em:multiprocessCompatible")).to.be.equal(undefined);
});

it("adds `translator` fields for each translator", function () {
var xml = setupRDF({ translators: [
"Bebop", "Rocksteady"
Expand Down

0 comments on commit 316d282

Please sign in to comment.