- From: Ms2ger <ms2ger@gmail.com>
- Date: Sun, 27 Feb 2011 17:03:14 +0100
- To: Sam Weinig <weinig@apple.com>
- CC: "public-html-testsuite@w3.org" <public-html-testsuite@w3.org>
Hi Sam
I noticed you submitted some tests a while ago. Thanks for that! I have 
some comments:
http://dvcs.w3.org/hg/html/file/0be07106838c/tests/submission/Apple/dataset/dataset-delete.html
Generally looks good. However, the last test,
       test(function() { assert_throws("SYNTAX_ERR", function() { 
testDelete('dummy', '-foo') }); },
         "Deleting element.dataset['-foo'] should throw a SYNTAX_ERR.'");
doesn't seem to be backed by the (current) specification.
Also, it would probably be good to test that d.hasAttribute(attr) is 
false as well.
http://dvcs.w3.org/hg/html/file/0be07106838c/tests/submission/Apple/dataset/dataset-enumeration.html
This test is correct. I would, however, prefer if in
       test(function() { assert_equals(testEnumeration(['data-foo', 
'data-bar', 'dataFoo']), 2); },
         "Only attributes who qualify as dataset properties should be 
enumeratable in the dataset.");
tested ['data-foo', 'data-bar', 'dataBaz'], because an implementation 
that also looked at dataSomething would presumably still pass this test.
Also, as setAttribute lowercases its name argument, this test could 
benefit from using setAttributeNS.
http://dvcs.w3.org/hg/html/file/0be07106838c/tests/submission/Apple/dataset/dataset-get.html
As setAttributes lowercases,
       test(function() { assert_true(testGet('data-Foo', 'foo')); },
         "Getting element.dataset['foo'] should return the value of 
element.getAttribute('data-Foo')'");
is redundant. There should also be tests for data-fooBar (set with 
setAttributeNS).
http://dvcs.w3.org/hg/html/file/0be07106838c/tests/submission/Apple/dataset/dataset-instanceof.html
Approved.
http://dvcs.w3.org/hg/html/file/0be07106838c/tests/submission/Apple/dataset/dataset-set.html
Approved.
Tests for |dataset.foo| (rather than |dataset["foo"]|) and
|"foo" in dataset| would be nice too.
Thanks again
Ms2ger
Received on Sunday, 27 February 2011 16:03:58 UTC