<?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>203789</bug_id>
          
          <creation_ts>2019-11-02 12:32:17 -0700</creation_ts>
          <short_desc>Copying reference files in import-w3c-tests breaks when ref files contain references to support files</short_desc>
          <delta_ts>2023-07-03 07:14:07 -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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>ASSIGNED</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=203784</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>203784</dependson>
          <blocked>207734</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Sam Sneddon [:gsnedders]">gsnedders</assigned_to>
          <cc>clopez</cc>
    
    <cc>gsnedders</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1586767</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2019-11-02 12:32:17 -0700</bug_when>
    <thetext>In css/css-backgrounds, background-image-003.html has a reference of reference/background-image-001-ref.html. We copy reference/background-image-001-ref.html to background-image-003-expected.html, but it has an image resource with a relative URL, and since the copy moved it to a different directory, that relative URL is now broken.

We have to fix bug 203784 and stop copying to -expected.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1611502</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2020-01-27 11:59:37 -0800</bug_when>
    <thetext>The WPT test importer detects this and does a rewrite of the relative URL when importing the ref-test.

The tag &apos;&lt;img class=&quot;green&quot; src=&quot;../support/green.png&quot;&gt;&apos; should get updated to &apos;&lt;img class=&quot;green&quot; src=&quot;support/green.png&quot;&gt;&apos; on the generated -expected.html.

Maybe it didn&apos;t work for you because the script doesn&apos;t do this rewrite if you import from a local source directory.

Example, if you do:

Tools/Scripts/import-w3c-tests -v -s /home/user/local-wpt-checkout css/css-backgrounds -d /home/user/WebKit/LayoutTests/imported/w3c/web-platform-tests

Then it don&apos;t do any rewrite

But if you do if you run it like:

Tools/Scripts/import-w3c-tests -t web-platform-tests/css/css-background

Then it will do the rewrites.

TIP: pass also the flag &quot;-v&quot; so you can see if it does the rewrites and if there is any WARNING doing that.

The logic it uses for that seems to be here:

https://trac.webkit.org/browser/webkit/trunk/Tools/Scripts/webkitpy/w3c/test_importer.py?rev=255074#L467


It does a rewrite of the URLs pointed by url(), href= or src= inside &lt;style&gt; tags as well as inside this list of tags: https://trac.webkit.org/browser/webkit/trunk/Tools/Scripts/webkitpy/w3c/test_converter.py?rev=255074#L222


In any case I also think we should fix bug 203784 and stop doing rewrites.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1690558</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-09-21 15:39:09 -0700</bug_when>
    <thetext>&lt;rdar://problem/69332145&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>