W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

[widgets] Widget Interface test cases

From: Scott Wilson <scott.bradley.wilson@gmail.com>
Date: Wed, 9 Nov 2011 16:13:33 +0000
Message-Id: <91A5A1B1-AB0E-45C5-835B-272669612183@gmail.com>
To: public-webapps WG <public-webapps@w3.org>
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":

 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.setItem("test3", "123abc");
   //ask that the test be restarted
   }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.


[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

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:36 UTC