Re: Request for Review: single-touch tests; deadline Sept 24

On 9/20/12 5:54 PM, Chan Cathy (Nokia-CIC/Boston) wrote:
> First of all, +1 to continuing.
>
> A couple comments on the type-checking code
> 1. I noticed you used
> 	assert_equals(Object.prototype.toString.call(ev[name]), "[object
> TouchList]", name + " attribute of type TouchList");
> instead of the I-assume-is-equivalent
> 	assert_true(ev[name] instanceof TouchList, name + " attribute of
> type TouchList");
> to check whether the said attribute is a TouchList object. While the latter
> one results in the "Can't find variable: TouchList" error in WebKit [1], the
> former works without a hitch. We might be inadvertently masking the WebKit
> bug if we use the former syntax.

Thanks! I'll take a look at that.

> (Note that with the type-checking code in
> place, the line that initially exposed that WebKit bug (line 134 in your
> version) can and should be removed, leaving the above line as the only place
> which would expose the bug.)

And that too.

> 2. The number of test assertions exploded from 10+ to 80+

Yesterday I checked in an update that has many more tests ;-). I believe 
it tests all of the assertions 1.1.* through 1.5.* (although not 
touchcancel). I haven't worked on the 1.6.* assertions but based on a 
very quick scan I think Matt already covered most if not all of them.

Anyhow, today, Matt ran my Sept 19 version on his implementation and got 
240/240 Passes! My N9 passes 221 and the 19 failures are all related to 
identfiedTouch.

Sangwhan - would you please run [1] against an Opera implementation?

Are there any other implementations besides Wk/Moz/O?


> I recognize that this might well just be a matter of style and
> personal preference.

Agreed and I'm somewhat indifferent although I don't have a problem with 
having a relatively strong correlation between asserts and tests (i.e. 
lots of tests don't bother me).

-Art

[1] <https://raw.github.com/AFBarstow/WebEvents/master/single-touch.html>

Received on Thursday, 20 September 2012 22:46:34 UTC