- From: Marcos Caceres <w3c@marcosc.com>
- Date: Thu, 10 Nov 2011 00:12:47 +0100
- To: Scott Wilson <scott.bradley.wilson@gmail.com>
- Cc: public-webapps WG <public-webapps@w3.org>
Hi Scott, On Wednesday, 9 November 2011 at 17:13, Scott Wilson wrote: > I'm not sure if the Widget Interface spec[1] and test cases[2] agree on the semantics of "clear()" storage calls. The Web Storage spec[3] indicates that for clear() all items should be removed from the storage array (i.e. deleted), however some of the test cases assume that the values of the items are instead set to Null: > > http://dev.w3.org/2006/waf/widgets-api/Overview.html#ta-ae test "at": > > window.widget.preferences.clear(); if(window.widget.preferences.getItem("protected") === "abc123" || window.widget.preferences.getItem("deletable") === null){ > (This actually has two errors - it should be && not ||, and the second clause should be true if "deletable" is undefined.) > > > http://dev.w3.org/2006/waf/widgets-api/Overview.html#ta-aa test "au": > prefs.clear(); prefs.setItem("test3", "123abc"); //ask that the test be restarted restart(); }else if(prefs.getItem("test1") === null && prefs.getItem("test2") === 'protected' && prefs.getItem("test3") === '123abc'){ > Again, the test should indicate the preference is undefined, not null. > I agree with your changes (the tests are bad). If you want to go ahead and make those changes, then please do so. Otherwise, I will update them in the next few days. I'll ping the list (and you) once its done. -- Marcos Caceres http://datadriven.com.au
Received on Wednesday, 9 November 2011 23:13:14 UTC