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

Instructions on how to override browser flags #12397

Closed
marcoscaceres opened this issue Aug 10, 2018 · 10 comments
Closed

Instructions on how to override browser flags #12397

marcoscaceres opened this issue Aug 10, 2018 · 10 comments
Labels

Comments

@marcoscaceres
Copy link
Contributor

As new web features are usually behind flags (e.g., dom.payments.request.enabled), it would be nice to give instructions on how to "pref on" features when running tests.

The problem I'm having is that, for instance, I do the following:

./wpt install firefox browser
./wpt run firefox payment-request/payment-request-show-method.https.html

But the test fails because the dom.payments.request.enabled is not on by default. When I try to set it manually in the the Firefox instance that pops up, Firefox doesn't seem to remember that I set it.

Any suggestions?

@gsnedders
Copy link
Member

#10452 is related to this

@foolip
Copy link
Member

foolip commented Aug 10, 2018

For Chrome it is documented:
https://web-platform-tests.org/running-tests/chrome.html

@foolip
Copy link
Member

foolip commented Aug 10, 2018

@jgraham, is there an equivalent for Firefox, or is a prefs file needed?

@foolip foolip removed the infra label Aug 13, 2018
@jugglinmike
Copy link
Contributor

Sounds like a job for the --setpref flag:

$ ./wpt run --help

[omitted]

Gecko-specific:

[omitted]

  --setpref PREF=VALUE  Defines an extra user preference (overrides those in
                        prefs_root)

Leaving the support request open as we may want to resolve with an enhancement to the documentation.

@marcoscaceres
Copy link
Contributor Author

I’ve been working around it by modifying Firefox’s User.js file, but with Nighty... well... it gets trashed Nightly 😂

Is the setpref already supported? Totally missed that.

@jugglinmike
Copy link
Contributor

I stripped out some of the surrounding documentation, but if you check the output of ./wpt run --help, you'll find that there's also a --prefs-root argument. That might be more appropriate if you have a lot of preferences to set (though I don't think I've ever used it myself).

@marcoscaceres
Copy link
Contributor Author

Yeah, I actually have quite a few. Right now, I keep them in text file that I copy/paste from so it would actually be really nice to just be able to point to them.

@jugglinmike
Copy link
Contributor

Since setting preferences is just one browser-specific use case among many, it's hard to justify promoting the description above the other command-line arguments.

However, there have been a couple improvements to the documentation site which may be sufficient to address this issue:

First, the command-line arguments are now included: https://web-platform-tests.org/running-tests/command-line-arguments.html For many folks, this listing is probably easier to take in on a web page than in a terminal.

Building off that, the website offers a search functionality. That new CLI arguments page is the first result when you search for pref, preference, and preferences, and the relevant text is highlighted if you get there from those results.

@marcoscaceres Do you think that's enough to call this issue "resolved"?

@marcoscaceres
Copy link
Contributor Author

That's great! thanks @jugglinmike

@jugglinmike
Copy link
Contributor

Glad to get this one resolved :)

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

No branches or pull requests

4 participants