Bug 162757

Summary: [iOS] Update Touch constructor test to cover clientX / clientY attributes
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Tools / TestsAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: lforschler, rbyers, rniwa
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 147740    
Attachments:
Description Flags
Patch sam: review+

Chris Dumez
Reported 2016-09-29 14:56:25 PDT
Update Touch constructor test to cover clientX / clientY attributes.
Attachments
Patch (2.71 KB, patch)
2016-09-29 14:58 PDT, Chris Dumez
sam: review+
Chris Dumez
Comment 1 2016-09-29 14:58:15 PDT
Chris Dumez
Comment 2 2016-09-29 15:19:28 PDT
Rick Byers
Comment 3 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.
Rick Byers
Comment 4 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.
Chris Dumez
Comment 5 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.
Note You need to log in before you can comment on or make changes to this bug.