Broken link to image while running test

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Broken link to image while running test

Manuel Rego Casasnovas
Hi,

in the CSS Grid Layout spec I've created this test:
https://github.com/w3c/csswg-test/blob/master/css-grid-1/grid-items/grid-minimun-size-grid-items-006.xht

Note that the test is under "css-grid-1/grid-items/" folder. We've
different folders for each section of the spec.

The test use an image that is under "css-grid-1/support/" referencing it
with:
        <img src="../support/100x100-green.png" />

The test works fine in Shepherd:
http://test.csswg.org/shepherd/testcase/grid-minimun-size-grid-items-005/spec/css-grid-1/

However when I try to run it the link to the image is broken:
http://test.csswg.org/harness/test/css-grid-1_dev/alpha/grid-minimun-size-grid-items-005/

I see that the test is run in this URL:
http://test.csswg.org/suites/css-grid-1_dev/nightly-unstable/html/grid-minimun-size-grid-items-005.htm

So "../support/100x100-green.png" is trying to access:
http://test.csswg.org/suites/css-grid-1_dev/nightly-unstable/support/100x100-green.png

Instead of:
http://test.csswg.org/suites/css-grid-1_dev/nightly-unstable/html/support/100x100-green.png

What would be the right way to fix this?

Thanks you very much,
  Rego

Reply | Threaded
Open this post in threaded view
|

Re: Broken link to image while running test

Gérard Talbot-3
Le 2015-11-25 08:57, Manuel Rego Casasnovas a écrit :
> Hi,
>

Hello Manuel,

> in the CSS Grid Layout spec I've created this test:
> https://github.com/w3c/csswg-test/blob/master/css-grid-1/grid-items/grid-minimun-size-grid-items-006.xht
>

[src]
http://test.csswg.org/source/css-grid-1/grid-items/grid-minimun-size-grid-items-005.xht


> Note that the test is under "css-grid-1/grid-items/" folder. We've
> different folders for each section of the spec.
>
> The test use an image that is under "css-grid-1/support/" referencing
> it
> with:
> <img src="../support/100x100-green.png" />
>

In some code situations, it will be necessary to have an alt attribute
so that failures to fetch image will be easily noticeable. I propose you
add

alt="Image download support must be enabled"

to your <img>. I have done this in all my tests and others have done
too.

Also, it's Minimum|minimum and not Minimun|minimun .

Contact Peter Linss on this. Since the image loads in

http://test.csswg.org/source/css-grid-1/grid-items/grid-minimun-size-grid-items-005.xht

then somehow the build process is wrong or needs tuning.

+CC: Peter Linss

Gérard
--
Test Format Guidelines
http://testthewebforward.org/docs/test-format-guidelines.html

Test Style Guidelines
http://testthewebforward.org/docs/test-style-guidelines.html

Test Templates
http://testthewebforward.org/docs/test-templates.html

CSS Naming Guidelines
http://testthewebforward.org/docs/css-naming.html

Test Review Checklist
http://testthewebforward.org/docs/review-checklist.html

CSS Metadata
http://testthewebforward.org/docs/css-metadata.html

Reply | Threaded
Open this post in threaded view
|

Re: Broken link to image while running test

Peter Linss
In reply to this post by Manuel Rego Casasnovas

On Nov 25, 2015, at 5:57 AM, Manuel Rego Casasnovas <[hidden email]> wrote:

> Hi,
>
> in the CSS Grid Layout spec I've created this test:
> https://github.com/w3c/csswg-test/blob/master/css-grid-1/grid-items/grid-minimun-size-grid-items-006.xht
>
> Note that the test is under "css-grid-1/grid-items/" folder. We've
> different folders for each section of the spec.
>
> The test use an image that is under "css-grid-1/support/" referencing it
> with:
> <img src="../support/100x100-green.png" />
>
> The test works fine in Shepherd:
> http://test.csswg.org/shepherd/testcase/grid-minimun-size-grid-items-005/spec/css-grid-1/
>
> However when I try to run it the link to the image is broken:
> http://test.csswg.org/harness/test/css-grid-1_dev/alpha/grid-minimun-size-grid-items-005/
>
> I see that the test is run in this URL:
> http://test.csswg.org/suites/css-grid-1_dev/nightly-unstable/html/grid-minimun-size-grid-items-005.htm
>
> So "../support/100x100-green.png" is trying to access:
> http://test.csswg.org/suites/css-grid-1_dev/nightly-unstable/support/100x100-green.png
>
> Instead of:
> http://test.csswg.org/suites/css-grid-1_dev/nightly-unstable/html/support/100x100-green.png
>
> What would be the right way to fix this?
The problem here is that the directory structures get rearranged during the test suite build, currently only reference links are getting fixed up.

For support files, you need to have them in a support directory in the same directory as the test, it's OK to have multiple copies of the same support files in the repository.

So:
mkdir css-grid-1/grid-items/support
hg copy css-grid-1/support/* css-grid-1/grid-items/support/

and then update the <img> to <img src="support/100x100-green.png" />

This will likely have to be done for the other directories under css-grid-1 as well.

Peter


signature.asc (506 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Broken link to image while running test

Gérard Talbot-3
In reply to this post by Manuel Rego Casasnovas
Le 2015-11-25 08:57, Manuel Rego Casasnovas a écrit :

> Hi,
>
> in the CSS Grid Layout spec I've created this test:
> https://github.com/w3c/csswg-test/blob/master/css-grid-1/grid-items/grid-minimun-size-grid-items-006.xht
>
> Note that the test is under "css-grid-1/grid-items/" folder. We've
> different folders for each section of the spec.
>
> The test use an image that is under "css-grid-1/support/" referencing
> it
> with:
> <img src="../support/100x100-green.png" />

Manuel,

This chunk

<meta name="flags" content="image">

is missing in your test (and also in your other grid tests) :


CSS Metadata
http://testthewebforward.org/docs/css-metadata.html#requirement-flags

"
image Requires support for bitmap graphics and the graphic to load
"

Gérard

> The test works fine in Shepherd:
> http://test.csswg.org/shepherd/testcase/grid-minimun-size-grid-items-005/spec/css-grid-1/
>
> However when I try to run it the link to the image is broken:
> http://test.csswg.org/harness/test/css-grid-1_dev/alpha/grid-minimun-size-grid-items-005/
>
> I see that the test is run in this URL:
> http://test.csswg.org/suites/css-grid-1_dev/nightly-unstable/html/grid-minimun-size-grid-items-005.htm
>
> So "../support/100x100-green.png" is trying to access:
> http://test.csswg.org/suites/css-grid-1_dev/nightly-unstable/support/100x100-green.png
>
> Instead of:
> http://test.csswg.org/suites/css-grid-1_dev/nightly-unstable/html/support/100x100-green.png
>
> What would be the right way to fix this?
>
> Thanks you very much,
>   Rego

--
Test Format Guidelines
http://testthewebforward.org/docs/test-format-guidelines.html

Test Style Guidelines
http://testthewebforward.org/docs/test-style-guidelines.html

Test Templates
http://testthewebforward.org/docs/test-templates.html

CSS Naming Guidelines
http://testthewebforward.org/docs/css-naming.html

Test Review Checklist
http://testthewebforward.org/docs/review-checklist.html

CSS Metadata
http://testthewebforward.org/docs/css-metadata.html

Reply | Threaded
Open this post in threaded view
|

Re: Broken link to image while running test

Manuel Rego Casasnovas
In reply to this post by Gérard Talbot-3
Hi Gérard,

On 25/11/15 21:26, Gérard Talbot wrote:
> In some code situations, it will be necessary to have an alt attribute
> so that failures to fetch image will be easily noticeable. I propose you
> add
>
> alt="Image download support must be enabled"
>
> to your <img>. I have done this in all my tests and others have done too.

Thanks for the input, I've added it.

> Also, it's Minimum|minimum and not Minimun|minimun .

Yes, fixed.

On 25/11/15 21:52, Gérard Talbot wrote:
> This chunk
>
> <meta name="flags" content="image">
>
> is missing in your test (and also in your other grid tests) :

Add it too.

Thank you very much,
  Rego

Reply | Threaded
Open this post in threaded view
|

Re: Broken link to image while running test

Manuel Rego Casasnovas
In reply to this post by Peter Linss
Hi Peter,

On 25/11/15 21:38, Linss, Peter wrote:

> The problem here is that the directory structures get rearranged during the test suite build, currently only reference links are getting fixed up.
>
> For support files, you need to have them in a support directory in the same directory as the test, it's OK to have multiple copies of the same support files in the repository.
>
> So:
> mkdir css-grid-1/grid-items/support
> hg copy css-grid-1/support/* css-grid-1/grid-items/support/
>
> and then update the <img> to <img src="support/100x100-green.png" />
>
> This will likely have to be done for the other directories under css-grid-1 as well.

Thank you very much this has fixed the issue!

Now I know how to do it right in the future. :-)

Bye,
  Rego