1 # karma-firefox-launcher
3 > Launcher for Mozilla Firefox.
7 The easiest way is to keep `karma-firefox-launcher` as a devDependency in your `package.json`.
12 "karma-firefox-launcher": "~0.1"
17 You can simple do it by:
19 npm install karma-firefox-launcher --save-dev
25 module.exports = function(config) {
27 browsers: ['Firefox', 'FirefoxDeveloper', 'FirefoxAurora', 'FirefoxNightly'],
32 You can pass list of browsers as a CLI argument too:
34 karma start --browsers Firefox,Chrome
37 ### Custom Preferences
38 To configure preferences for the Firefox instance that is loaded, you can specify a custom launcher in your Karma
39 config with the preferences under the `prefs` key:
42 browsers: ['FirefoxAutoAllowGUM'],
45 FirefoxAutoAllowGUM: {
48 'media.navigator.permission.disabled': true
54 ### Loading Firefox Extensions
55 If you have extensions that you want loaded into the browser on startup, you can specify the full path to each
56 extension in the `extensions` key:
59 browsers: ['FirefoxWithMyExtension'],
62 FirefoxWithMyExtension: {
65 path.resolve(__dirname, 'helpers/extensions/myCustomExt@suchandsuch.xpi'),
66 path.resolve(__dirname, 'helpers/extensions/myOtherExt@soandso.xpi')
72 **Please note**: the extension name must exactly match the 'id' of the extension. You can discover the 'id' of your
73 extension by extracting the .xpi (i.e. `unzip XXX.xpi`) and opening the install.RDF file with a text editor, then look
74 for the `em:id` tag under the `Description` tag. If your extension manifest looks something like this:
77 <?xml version="1.0" encoding="utf-8"?>
78 <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
79 <Description about="urn:mozilla:install-manifest">
80 <em:id>myCustomExt@suchandsuch</em:id>
81 <em:version>1.0</em:version>
83 <em:bootstrap>true</em:bootstrap>
84 <em:unpack>false</em:unpack>
91 Then you should name your extension `myCustomExt@suchandsuch.xpi`.
95 For more information on Karma see the [homepage].
98 [homepage]: http://karma-runner.github.com