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

Scott Wilson a écrit :
> 
> 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 
>> <mailto: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 
> <http://dev.w3.org/2006/waf/widgets/#default-icons-table> (from top to 
> bottom) that has a media type 
> <http://dev.w3.org/2006/waf/widgets/#media-type0> that is supported 
> <http://dev.w3.org/2006/waf/widgets/#supported> by the user agent:
> 
>    1.
> 
>       Let potential-icon be the result of applying the rule for finding
>       a file within a widget package
>       <http://dev.w3.org/2006/waf/widgets/#rule-for-finding-a-file-within-a-widget-0> to file
>       name.
> 
>    2.
> 
>       If the following conditions are all |true|, then append the value
>       of potential-icon to the icons
>       <http://dev.w3.org/2006/waf/widgets/#icons0> list of the table of
>       configuration defaults
>       <http://dev.w3.org/2006/waf/widgets/#table-of-configuration-defaults>:
> 
>          1.
> 
>             The value of potential-icon is a file
>             <http://dev.w3.org/2006/waf/widgets/#file>.
> 
>          2.
> 
>             The potential-icon is a processable file
>             <http://dev.w3.org/2006/waf/widgets/#processable-file>,
>             determined by the media type
>             <http://dev.w3.org/2006/waf/widgets/#media-type0> given in
>             the media type column of the default icons table
>             <http://dev.w3.org/2006/waf/widgets/#default-icons-table>.
> 
>          3.
> 
>             The potential-icon does not already exist in the icons
>             <http://dev.w3.org/2006/waf/widgets/#icons0> list of
>             the table of configuration defaults
>             <http://dev.w3.org/2006/waf/widgets/#table-of-configuration-defaults>.
> 
>    3.
> 
>       Move onto the next file name in the default icons table
>       <http://dev.w3.org/2006/waf/widgets/#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
I agree. The whole point here is that Step 9 applies on top of Step 5. Step 5 handles the priority of a localized resource over non localized resource sith the same name. This is not the case here. 

Cyril

-- 
Cyril Concolato
Maître de Conférences/Associate Professor
Groupe Mutimedia/Multimedia Group
Département Traitement du Signal et Images
/Dept. Signal and Image Processing
Ecole Nationale Supérieure des Télécommunications
46 rue Barrault
75 013 Paris, France
http://tsi.enst.fr/~concolat 

Received on Wednesday, 9 December 2009 13:02:21 UTC