karma-runner/karma-firefox-launcher — pull request #16 by axemclion (2013-11-13 05:13:41+00:00)
Title: feat: Added ability to set custom preferences in firefox

Added the ability for firefox to take in custom preferences.

I am working on https://github.com/axemclion/karma-telemetry and I needed to pass in `dom.send_after_paint_to_content` for measuring first paint time and `dom.disable_open_during_load` to enable the tests to open in a new window. For now, I had to copy the code to create a new launcher, but it would be awesome if I could simply pass these preferences in to firefox.

Tried to model this after the karma-chrome-launcher _getOptions function.

Tested this on Windows with the following cases
# Default Firefox browsers works (no custom launcher)
# Custom launcher with no preferences works
# Custom launcher with {base: 'firefox', 'prefs': {} } works
# Custom launcher with {base: 'firefox', 'prefs': {'dom.send_after_paint_to_content' : true} } works