Bug 255962
Summary: | run-minibrowser: improve how extra parameters are passed to the minibrowser | ||
---|---|---|---|
Product: | WebKit | Reporter: | Carlos Alberto Lopez Perez <clopez> |
Component: | Tools / Tests | Assignee: | Carlos Alberto Lopez Perez <clopez> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | CC: | bugs-noreply, karlcow, philn |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=256043 https://bugs.webkit.org/show_bug.cgi?id=264325 |
||
Bug Depends on: | |||
Bug Blocks: | 249031 |
Carlos Alberto Lopez Perez
Currently the script run-minibrowser passed to the minibrowser any extra parameter not recognized by the script, which in theory is fine but in some cases it causes issues.
For example, on WPE, is not possible to properly execute Cog with another platform plugins and a custom URL.
Example 1)
$ Tools/Scripts/run-minibrowser --wpe -P drm https://spyber.com
This ends executing "cog -P https://spyber.com drm" because the script picks the first parameter without a dash as the URL (so it thinks "drm" is the URL)
$ Tools/Scripts/run-minibrowser --wpe --platform=drm https://spyber.com
This gives error because --platform is a parameter that the script wants to parse itself instead of passing it to cog (it checks for platform in [wpe, gtk, mac, etc]))
The only possible way of doing it is inverting the order
$ Tools/Scripts/run-minibrowser --wpe https://spyber.com -P drm
Which is far from evident unless you know the issue.
We can improve this by allowing to specify something like this:
Tools/Scripts/run-minibrowser --wpe --minibrowser-args="-P drm" https://spyber.com
That way there is no confusion and we can even pass to cog parameters like --minibrowser-args='--help' so we can get Cog to print its own help instead of getting the help from the script run-minibrowser
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Carlos Alberto Lopez Perez
Pull request: https://github.com/WebKit/WebKit/pull/13181
Philippe Normand
I don't think this patch is needed?
You can use --:
run-minibrowser --wpe https://spyber.com -- -P wl
Carlos Alberto Lopez Perez
I didn't knew about this. Thanks for the pointer! :)
I have submitted a PR to document this feature to bug 256086
And ended going with a different approach for configuring cog via environment variables at bug 256043
(which I think is better in the end as it also works with cog directly instead of relying on the run-minibrowser script)
Closing this as wontfix
Karl Dubost
the -- argument is not working as far as I know and it's pretty destructive on the list of arguments.
Philippe Normand
(In reply to Karl Dubost from comment #4)
> the -- argument is not working as far as I know and it's pretty destructive
> on the list of arguments.
Can you provide any detail about this? What is the error?
Karl Dubost
Philippe,
see Bug 264325 Comment #2