Bug:Fix file validation issue
[vnfsdk/refrepo.git] / vnfmarket / src / main / webapp / vnfmarket / node_modules / karma-firefox-launcher / README.md
1 # karma-firefox-launcher
2
3 > Launcher for Mozilla Firefox.
4
5 ## Installation
6
7 The easiest way is to keep `karma-firefox-launcher` as a devDependency in your `package.json`.
8 ```json
9 {
10   "devDependencies": {
11     "karma": "~0.10",
12     "karma-firefox-launcher": "~0.1"
13   }
14 }
15 ```
16
17 You can simple do it by:
18 ```bash
19 npm install karma-firefox-launcher --save-dev
20 ```
21
22 ## Configuration
23 ```js
24 // karma.conf.js
25 module.exports = function(config) {
26   config.set({
27     browsers: ['Firefox', 'FirefoxDeveloper', 'FirefoxAurora', 'FirefoxNightly'],
28   });
29 };
30 ```
31
32 You can pass list of browsers as a CLI argument too:
33 ```bash
34 karma start --browsers Firefox,Chrome
35 ```
36
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:
40
41 ```js
42 browsers: ['FirefoxAutoAllowGUM'],
43
44 customLaunchers: {
45     FirefoxAutoAllowGUM: {
46         base: 'Firefox',
47         prefs: {
48             'media.navigator.permission.disabled': true
49         }
50     }
51 }
52 ```
53
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:
57
58 ```js
59 browsers: ['FirefoxWithMyExtension'],
60
61 customLaunchers: {
62     FirefoxWithMyExtension: {
63         base: 'Firefox',
64         extensions: [
65           path.resolve(__dirname, 'helpers/extensions/myCustomExt@suchandsuch.xpi'),
66           path.resolve(__dirname, 'helpers/extensions/myOtherExt@soandso.xpi')
67         ]
68     }
69 }
70 ```
71
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:
75
76 ```xml
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>
82     <em:type>2</em:type>
83     <em:bootstrap>true</em:bootstrap>
84     <em:unpack>false</em:unpack>
85
86     [...]
87   </Description>
88 </RDF>
89 ```
90
91 Then you should name your extension `myCustomExt@suchandsuch.xpi`.
92
93 ----
94
95 For more information on Karma see the [homepage].
96
97
98 [homepage]: http://karma-runner.github.com