Bug 162757 - [iOS] Update Touch constructor test to cover clientX / clientY attributes
Summary: [iOS] Update Touch constructor test to cover clientX / clientY attributes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks: 147740
  Show dependency treegraph
 
Reported: 2016-09-29 14:56 PDT by Chris Dumez
Modified: 2016-09-30 08:59 PDT (History)
3 users (show)

See Also:


Attachments
Patch (2.71 KB, patch)
2016-09-29 14:58 PDT, Chris Dumez
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2016-09-29 14:56:25 PDT
Update Touch constructor test to cover clientX / clientY attributes.
Comment 1 Chris Dumez 2016-09-29 14:58:15 PDT
Created attachment 290249 [details]
Patch
Comment 2 Chris Dumez 2016-09-29 15:19:28 PDT
Committed r206619: <http://trac.webkit.org/changeset/206619>
Comment 3 Rick Byers 2016-09-30 08:54:56 PDT
Comment on attachment 290249 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=290249&action=review

> LayoutTests/fast/events/touch/touch-constructor.html:48
> +    if (init.hasOwnProperty("clientX"))

Looks like there was just a typo above - screenX is tested 3 times, 2 of those were probably supposed to be changed to be clientX and clientY.

> LayoutTests/fast/events/touch/touch-constructor.html:71
> +shouldNotThrow("touch = new Touch({ identifier: 1, target: document.body, clientX: 1.5, clientY: 2.5, screenX: 3.5, screenY: 4.5, pageX: 5.5, pageY: 6.5, force: 7.5, clientX: 8.5, clientY: 9.5 })");

clientX and clientY were already in the dictionary here and below.
Comment 4 Rick Byers 2016-09-30 08:56:57 PDT
Also, in case there is some confusion here - my comment in https://bugs.webkit.org/show_bug.cgi?id=147740#c11 was about Safari's non-standard (and not well documented) TouchEvent.clientX/TouchEvent.clientY properties.

clientX/clientY on _Touch_ (in contrast) makes perfect sense, already works and is standardized.
Comment 5 Chris Dumez 2016-09-30 08:59:25 PDT
(In reply to comment #3)
> Comment on attachment 290249 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=290249&action=review
> 
> > LayoutTests/fast/events/touch/touch-constructor.html:48
> > +    if (init.hasOwnProperty("clientX"))
> 
> Looks like there was just a typo above - screenX is tested 3 times, 2 of
> those were probably supposed to be changed to be clientX and clientY.
> 
> > LayoutTests/fast/events/touch/touch-constructor.html:71
> > +shouldNotThrow("touch = new Touch({ identifier: 1, target: document.body, clientX: 1.5, clientY: 2.5, screenX: 3.5, screenY: 4.5, pageX: 5.5, pageY: 6.5, force: 7.5, clientX: 8.5, clientY: 9.5 })");
> 
> clientX and clientY were already in the dictionary here and below.

Thanks for pointing this out. I'll fix the test.