Re: sessionStorage test committed

Le jeudi 07 janvier 2010 à 18:52 +0000, Kai Hendry a écrit :
> http://dev.w3.org/cvsweb/2008/mobile-test/v2/script.js.diff?r1=1.14&r2=1.15&f=h
> I changed the localStorage test to be similar to the newly committed
> sessionStorage test. The previous localStorage tested what was stored
> (the date) was read correctly back out. Now it really only tests if a
> 'set' did not throw.
> 
> I might have gotten a little too clever here, so I happy to hear some criticism.
> 
> I use the same 'test' key to try ensure there is no conflict, as I
> believe they should be independent.
> 
> I also echo the counter. This could conceived as "fun" to be able to
> see how many times one has executed the test on a particular browser.
> Or rather dull and confusing. ;)

I think the current test is wrong, since it doesn't pass if c >= lc;
given that both c and lc get set to 1 the first time, it will fail the
first time the test is run.

Also, I would avoid the counter thingy — it's more likely to be
confusing, I think.

Dom 

Received on Tuesday, 12 January 2010 14:55:53 UTC