[widgets] new TWI test for preferences.clear(), was Re: [widgets] TWI clarification

On 5/30/11 2:10 PM, Marcos Caceres wrote:
> Hi,
> During the testing of TWI's preferences attribute in Opera, I noticed
> that preferences had stop firing events at the window object. I asked
> around a bit and it was pointed out to me that Web Storage had changed
> to no longer fire events at the window object that contains the
> storage area. Now it only fires events at other windows. This makes
> absolute sense. In response, I've clarified the text in the  TWI spec:
>
> Upon invocation of the setItem(), removeItem() and clear() methods, if
> the invocation did something, a user agent must dispatch a storage
> event akin to what is specified in "the storage event" section of
> [WebStorage] (i.e., the preferences attribute behaves the same as
> sessionStorage and localStorage with regards to dispatching events).
>
> I will add one more test to the test suite for widget.preferences.clear();

Added test:

# clear-fires-event
Test that, upon invocation of the clear() method, a user agent queues a 
task to fire a StorageEvent event at the window object of an iframe 
contained by the start file. To pass, a storage event must be fired when 
a key is removed via the clear() method and the associated test values 
need to be correct.

http://dev.w3.org/2006/waf/widgets-api/test-suite/test-cases/ta-storage-event/clear-fires-event/removeItem-fires-event.wgt

Received on Monday, 30 May 2011 15:29:42 UTC