W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2009

Re: [widgets] test-cases for icons: some possible errors

From: Scott Wilson <scott.bradley.wilson@gmail.com>
Date: Fri, 4 Dec 2009 16:23:30 +0000
Cc: public-webapps WG <public-webapps@w3.org>
Message-Id: <C5786E10-B46F-4542-B600-C5DFFB2ED106@gmail.com>
To: marcosc@opera.com

On 3 Dec 2009, at 17:26, Marcos Caceres wrote:

> On Sun, Nov 29, 2009 at 6:03 PM, Scott Wilson
> <scott.bradley.wilson@gmail.com> wrote:
>> Some more potential test case errors and fixes:
>>
>> ======
>> bl.wgt
>>
>> ✔ Tests the UA's ability to locate an icon in a locale folder and  
>> at the
>> root of the widget. To pass, after processing, the icons list must  
>> contain a
>> pointer to "locales/en/icon.jpg", and "icon.png", which is at the  
>> root of
>> the widget. The icons list needs to be in the correct order, where
>> "locales/en/icon.jpg" must be first and "icon.png" must be second.
>>
>> Following Step 9 and using "Rule for Finding a File Within a Widget  
>> Package"
>> I always get these the other way around, as "icon.png" is in front of
>> "icon.jpg" in the default icons list
>
> hhhhmmm..... I'm not sure I understand how that happens? Section
> 9.1.3. "Rule for Finding a File Within a Widget Package", step 5 in
> the algorithm should be forcing you to find the localized icon first.
> Please recheck the spec and I can try to clarify where it is confusing
> in regards to how files are found (i.e., always localized content
> first, then followed by unlocalized content)

Step 9 is as follows:

For each file name in the default icons table (from top to bottom)  
that has a media type that is supported by the user agent:
Let potential-icon be the result of applying the rule for finding a  
file within a widget package to file name.

If the following conditions are all true, then append the value of  
potential-icon to the icons list of the table of configuration defaults:

The value of potential-icon is a file.

The potential-icon is a processable file, determined by the media type  
given in the media type column of the default icons table.

The potential-icon does not already exist in the icons list of the  
table of configuration defaults.

Move onto the next file name in the default icons table.

So, using this algorithm, "pass.png" would always come before "locales/ 
en/pass.jpg"

E.g

For (icon in icon.svg, icon.ico, icon.png, icon.gif, icon.jpg):
	A: Looked for "icon.svg" using the rule in 9.1.3.
	B: Nope
	C: Next!
	A: Looked for "icon.ico" using the rule in 9.1.3.
	B: Nope
	C: Next!
	A: Looked for "icon.png" using the rule in 9.1.3. No localized  
version, so got root "icon.png".
	B: Appended "/icon.png"
	C: Next!
	A: Looked for "icon.gif" using the rule in 9.1.3.
	B: Nope
	C: Next!
	A: Looked for "icon.jpg" using the rule in 9.1.3. Found "locales/en/ 
icon.jpg"
	B: Appended "locales/en/icon.jpg"
	C: Done!

Icons List = icon.png, locales/en/icon.jpg


S




>
> -- 
> Marcos Caceres
> http://datadriven.com.au




Received on Friday, 4 December 2009 16:24:16 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:35 GMT