Re: Directory structure of test suites?

Using webfonts is OK, the only real issue is that you're creating a dependency on the client being tested to _also_ support webfonts in order to pass the test. This may not be desirable, but I don't have strong feelings.


The proper way to do this (or include any resource other than a reference file) is to have the webfont file in the same directory as the test, or in a subdirectory and use a relative URL. Rather than create a new "fonts" directory, you should simply put the font file into a "support" subdirectory, just like any other resource.

You should never use absolute URLs to anything inside the test repository, and you should never use relative URLs that start with "../" for anything except reference links.

It's fine to copy the font file into multiple support directories, both Shepherd and the build system will recognize them as the same file so long as they have the same contents (i.e. don't use the same file name for different font files).

Peter

On Apr 26, 2015, at 11:50 PM, Koji Ishii <kojiishi@gmail.com> wrote:

> I'm trying to load a web font in my test from /fonts[1] in my tests, but either "../fonts/..." or "/fonts/..." failed in 404 in test harness.
> 
> What are the proper way to refer files in the root directory of the test repository? Or is it a bad idea to do so? Should I have copies of fonts in support sub directory of each test suite?
> 
> [1] http://hg.csswg.org/test/file/tip/fonts/adobe-fonts
> 
> /koji
> 

Received on Tuesday, 28 April 2015 18:12:29 UTC