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

On Thu, Dec 10, 2009 at 12:20 AM, Marcos Caceres <marcosc@opera.com> wrote:
> On Fri, Dec 4, 2009 at 5:23 PM, Scott Wilson
> <scott.bradley.wilson@gmail.com> wrote:
>>
>> 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
>>
>
> Ah, right you are. Sorry, for some silly reason I thought the test was
> using custom icons. I'll update the test description tomorrow as I
> don't have CVS set up on this machine. Apologies also for not replying
> sooner, I've been on vacation last few days.
>

Ok, the two offending tests (bl and bm) now read:
The icons list can be in any order, so long as it contains "icon.png"
and "locales/en/icon.jpg".
-- 
Marcos Caceres
http://datadriven.com.au

Received on Thursday, 10 December 2009 21:27:38 UTC