Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default Preferences update #89

Open
bengfarrell opened this issue Jan 8, 2019 · 4 comments
Open

Default Preferences update #89

bengfarrell opened this issue Jan 8, 2019 · 4 comments

Comments

@bengfarrell
Copy link

I had some unrelated problems when launching tests using FF 64, but thought that 2 extra tabs when Firefox loaded were my issue - I was theorizing a loss of focus.

While this ultimately wasn't my issue, I'd like to propose a cleaner start to the launcher.

One tab is a privacy notice:
'toolkit.telemetry.reportingpolicy.firstRun': false

The other is a forced load of the Acrobat add-on, which oddly happens if the build ID and app version aren't specified:
'extensions.lastAppBuildId':'20181206201918',
'extensions.lastAppVersion': '64.0',

Both of these are easily added to the karma.conf.js, but took a long time to track down, so would be nice if they were default prefs.

@Westbrook
Copy link

This isn't that much prettier, but not having to push version numbers should make this a little more usable for people:

browsers: ['FirefoxHeadlessCustom'],
customLaunchers: {
      FirefoxHeadlessCustom: {
            base: 'Firefox',
            flags: [ '-headless' ],
            prefs: {
                    'toolkit.telemetry.reportingpolicy.firstRun': false,
                    'extensions.enabledScopes': 0
            }
      },
},

Ben's 'toolkit.telemetry.reportingpolicy.firstRun': false, kicks things off to skip the privacy report, but it's the 'extensions.enabledScopes': 0 that kills the Acrobat tab...

It's even harder to know this is happening when working with -headless, so I think it'd be a useful add to the library for future users (with maybe some docs around the extensions.enabledScopes entry. If that make sense to add to the tooling here, I'd be happy to submit a PR. Looks like I'd just add these to https://github.com/karma-runner/karma-firefox-launcher/blob/master/index.js#L9-L19, right?

@birtles
Copy link
Collaborator

birtles commented Dec 18, 2019

I wonder if that is too restrictive for folks who want to test their add-ons with karma-firefox-launcher. Could we make extensions.enabledScopes be, say, 5 instead?
(Reference: https://mike.kaply.com/2012/02/21/understanding-add-on-scopes/)

@Westbrook
Copy link

That makes sense to me! I was pretty haggard after debugging this with a bunch of different preferences and was going full nuclear with the 0... 💥

If I read this link your shared correctly, 4 is the same as 5. Or am I misunderstanding? If they're the same, should we use the value that people could later find there so it's clear what is being defaulted to?

@birtles
Copy link
Collaborator

birtles commented Dec 18, 2019

If I read this link your shared correctly, 4 is the same as 5. Or am I misunderstanding?

I believe it's a bitfield so SCOPE_PROFILE | SCOPE_APPLICATION = 1 | 4 = 5.

4 alone (SCOPE_APPLICATION) would not recognize add-ons added to the profile directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants