Test reviews (was: Re: Canvas tests)

Kris Krueger wrote:
> [...]
> Maybe you can review some of the cases I have submitted recently as well?
> 
> -Thx

I assume these are the ones inside 
http://dev.w3.org/cvsweb/html5/tests/submission/Microsoft/ ?

Looking at windowobject/security_location_0.htm:

The test itself seems to be correct and matches the spec.

Using "http://www.w3.org/" as the iframe src looks dangerous, because 
these test cases might get hosted on that domain, in which case it will 
no longer be testing cross-origin as intended. Perhaps 
"http://example.com/" and "http://example.org/" would be suitable 
vendor-neutral pages to use instead. Ideally there would be a 
W3C-managed domain (that is not www.w3.org or dev.w3.org) for 
cross-origin tests - does any such thing exist yet?

It's slightly confusing that the page says "FAIL" (with no explanation 
why) while it's still busy loading. Perhaps the description should say 
"Test passes if the word PASS appears below once the page has finished 
loading". It may also be better for testresult to say "FAIL (script did 
not start)", and change it to "FAIL (script did not complete)" at the 
beginning of RunTest, and change it to "FAIL" or "PASS" at the end of 
RunTest, so that it's easier to tell what stage it has reached.

I think it'd be useful for <link rel="help"> to link to the closest 
fragment id in the spec (rather than just the page), which in this case 
is #security-2 (but that looks like an unstable autogenerated id - 
http://www.w3.org/Bugs/Public/show_bug.cgi?id=9173).


Looking briefly at htmldom/ and comparing with the appropriate spec 
section, they all appear to match the spec:

anchor01: OK - http://dev.w3.org/html5/spec/#dom-accesskey

anchor02: OK though obsolete - http://dev.w3.org/html5/spec/#dom-a-charset

anchor03: OK though obsolete - http://dev.w3.org/html5/spec/#dom-a-coords

anchor04: OK - http://dev.w3.org/html5/spec/#dom-a-href and 
http://dev.w3.org/html5/spec/#attr-hyperlink-href

anchor05: OK - http://dev.w3.org/html5/spec/#dom-a-type

anchor06: OK though obsolete - http://dev.w3.org/html5/spec/#dom-a-shape

area01: OK - http://dev.w3.org/html5/spec/#dom-area-coords

area02: OK though obsolete - http://dev.w3.org/html5/spec/#dom-area-nohref

area03: OK - http://dev.w3.org/html5/spec/#dom-tabindex

area04: OK - http://dev.w3.org/html5/spec/#dom-accesskey

HTMLAreaElement01: OK - http://dev.w3.org/html5/spec/#dom-accesskey

HTMLAreaElement02: OK - http://dev.w3.org/html5/spec/#dom-area-alt

HTMLAreaElement03: OK though obsolete - 
http://dev.w3.org/html5/spec/#dom-a-coords

HTMLAreaElement04: OK - http://dev.w3.org/html5/spec/#dom-a-href and 
http://dev.w3.org/html5/spec/#attr-hyperlink-href

HTMLAreaElement05: OK though obsolete - 
http://dev.w3.org/html5/spec/#dom-area-nohref

HTMLAreaElement06: OK though obsolete and the lowercasing is unnecessary 
- http://dev.w3.org/html5/spec/#dom-a-shape

HTMLAreaElement07: OK - http://dev.w3.org/html5/spec/#dom-tabindex

HTMLAreaElement08: OK - http://dev.w3.org/html5/spec/#dom-area-target

As a general comment, these look far from sufficient for testing 
content-to-IDL attribute reflection - e.g. the noHref tests will pass in 
a browser that doesn't actually implement noHref at all and always 
returns undefined, and the shape tests don't check what's returned for 
<area shape="Circ">, etc. (IE6 says "CIRCLE", IE8 says "circle", 
Firefox/WebKit/Opera say "Circ", HTML5 says "circle" for <area shape> 
and "Circ" for <a shape>, so that'd be a relatively useful thing to 
test). These are better than having no tests at all, but a decent 
comprehensive test suite would probably have to be written from scratch, 
in a methodical way based on the IDL fragments in the spec, to make sure 
it covers all the cases.

-- 
Philip Taylor
pjt47@cam.ac.uk

Received on Monday, 1 March 2010 19:11:18 UTC