[widgets] Widget Interface test cases

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.

S

[1] http://dev.w3.org/2006/waf/widgets-api/
[2] http://dev.w3.org/2006/waf/widgets-api/test-suite/
[3] http://www.w3.org/TR/webstorage/

Received on Wednesday, 9 November 2011 16:14:15 UTC