<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>264325</bug_id>
          
          <creation_ts>2023-11-06 23:59:29 -0800</creation_ts>
          <short_desc>run-minibrowser --help seems incorrect about url-loading</short_desc>
          <delta_ts>2024-09-02 12:24:24 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>Safari 17</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=255962</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=256086</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=247378</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=278955</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>GoodFirstBug, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Karl Dubost">karlcow</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>basuke</cc>
    
    <cc>g_squelart</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>philn</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1990467</commentid>
    <comment_count>0</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2023-11-06 23:59:29 -0800</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1990468</commentid>
    <comment_count>1</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2023-11-06 23:59:55 -0800</bug_when>
    <thetext>&lt;rdar://117554821&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1990489</commentid>
    <comment_count>2</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2023-11-07 02:50:52 -0800</bug_when>
    <thetext>% run-minibrowser http://example.com 
options Namespace(platform=&apos;mac&apos;, configuration=None, architecture=None, model=None, url=&apos;http://example.com&apos;)

% run-minibrowser --url http://example.com
options Namespace(platform=&apos;mac&apos;, configuration=None, architecture=None, model=None, url=&apos;http://example.com&apos;)


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&apos;s try:

% run-minibrowser --wpe -- --platform=drm http://example.com
options Namespace(platform=&apos;wpe&apos;, configuration=None, architecture=None, model=None, url=&apos;--platform=drm&apos;)

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=&apos;wpe&apos;, configuration=None, architecture=None, model=None, url=&apos;--platform=drm&apos;)

This is slightly better
% run-minibrowser http://example.com -- --platform=drm
options Namespace(platform=&apos;mac&apos;, configuration=None, architecture=None, model=None, url=&apos;http://example.com&apos;)

% run-minibrowser http://example.com -- --platform=drm
options Namespace(platform=&apos;mac&apos;, configuration=None, architecture=None, model=None, url=&apos;http://example.com&apos;)

% run-minibrowser http://example.com --platform=drm 
options Namespace(platform=&apos;drm&apos;, configuration=None, architecture=None, model=None, url=&apos;http://example.com&apos;)


So there are issues with the current parsing of arguments. 



Note: Replace url.com by example.org in all examples.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1990495</commentid>
    <comment_count>3</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2023-11-07 03:11:07 -0800</bug_when>
    <thetext>See also https://github.com/WebKit/WebKit/pull/6049</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1990652</commentid>
    <comment_count>4</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2023-11-07 14:08:43 -0800</bug_when>
    <thetext>run-minibrowser --wpe http://example.com  -- --platform=drm

?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1990654</commentid>
    <comment_count>5</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2023-11-07 14:10:28 -0800</bug_when>
    <thetext>&gt;   Example:              run-minibrowser --wpe -- --platform=drm http://url.com


That example looks incorrect. The url should be before --</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1990676</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-11-07 15:51:17 -0800</bug_when>
    <thetext>(In reply to Philippe Normand from comment #5) 
&gt; 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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1990701</commentid>
    <comment_count>7</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2023-11-07 17:40:51 -0800</bug_when>
    <thetext>(In reply to Philippe Normand from comment #5)
&gt; &gt;   Example:              run-minibrowser --wpe -- --platform=drm http://url.com
&gt; 
&gt; 
&gt; 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.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>