Bug 264325
Summary: | run-minibrowser --help seems incorrect about url-loading | ||
---|---|---|---|
Product: | WebKit | Reporter: | Karl Dubost <karlcow> |
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | basuke, g_squelart, mcatanzaro, philn, webkit-bug-importer |
Priority: | P2 | Keywords: | GoodFirstBug, InRadar |
Version: | Safari 17 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=255962 https://bugs.webkit.org/show_bug.cgi?id=256086 https://bugs.webkit.org/show_bug.cgi?id=247378 https://bugs.webkit.org/show_bug.cgi?id=278955 |
Karl Dubost
Currently the help indicates that you can do
run-minibrowser http://example.org/
That is not true.
It requires
run-minibrowser --url http://example.org/
This is an easy fix.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Karl Dubost
<rdar://117554821>
Karl Dubost
% run-minibrowser http://example.com
options Namespace(platform='mac', configuration=None, architecture=None, model=None, url='http://example.com')
% run-minibrowser --url http://example.com
options Namespace(platform='mac', configuration=None, architecture=None, model=None, url='http://example.com')
so far so good. But the example of the help menu says:
MiniBrowser options: Pass them after two dashes.
Example: run-minibrowser --wpe -- --platform=drm http://url.com
Let's try:
% run-minibrowser --wpe -- --platform=drm http://example.com
options Namespace(platform='wpe', configuration=None, architecture=None, model=None, url='--platform=drm')
This is not good. This is not what we are expecting.
same with --url
% run-minibrowser --wpe -- --platform=drm --url http://example.com
options Namespace(platform='wpe', configuration=None, architecture=None, model=None, url='--platform=drm')
This is slightly better
% run-minibrowser http://example.com -- --platform=drm
options Namespace(platform='mac', configuration=None, architecture=None, model=None, url='http://example.com')
% run-minibrowser http://example.com -- --platform=drm
options Namespace(platform='mac', configuration=None, architecture=None, model=None, url='http://example.com')
% run-minibrowser http://example.com --platform=drm
options Namespace(platform='drm', configuration=None, architecture=None, model=None, url='http://example.com')
So there are issues with the current parsing of arguments.
Note: Replace url.com by example.org in all examples.
Karl Dubost
See also https://github.com/WebKit/WebKit/pull/6049
Philippe Normand
run-minibrowser --wpe http://example.com -- --platform=drm
?
Philippe Normand
> Example: run-minibrowser --wpe -- --platform=drm http://url.com
That example looks incorrect. The url should be before --
Michael Catanzaro
(In reply to Philippe Normand from comment #5)
> That example looks incorrect. The url should be before --
I guess the -- is used to indicate the end of the list of arguments to run-minibrowser and start the list of arguments to MiniBrowser itself. And the URL to load is surely an argument for MiniBrowser. So I think Karl is probably right that the example matches the intended behavior?
Karl Dubost
(In reply to Philippe Normand from comment #5)
> > Example: run-minibrowser --wpe -- --platform=drm http://url.com
>
>
> That example looks incorrect. The url should be before --
Yes. Exactly,
https://github.com/WebKit/WebKit/commit/63d0be648fd8f20ec94cadbb884a358bc6eba18b
but that also means the code is not very robust to this kind of mistakes. If I have a bit of bandwidth, I will fix a couple of things there, but if someone else wants to do it.