<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:simon.fraser@apple.com" title="Simon Fraser (smfr) <simon.fraser@apple.com>"> <span class="fn">Simon Fraser (smfr)</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Add long press selection test"
href="https://bugs.webkit.org/show_bug.cgi?id=162367">bug 162367</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #289495 Flags</td>
<td>review?
</td>
<td>review-
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Add long press selection test"
href="https://bugs.webkit.org/show_bug.cgi?id=162367#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Add long press selection test"
href="https://bugs.webkit.org/show_bug.cgi?id=162367">bug 162367</a>
from <span class="vcard"><a class="email" href="mailto:simon.fraser@apple.com" title="Simon Fraser (smfr) <simon.fraser@apple.com>"> <span class="fn">Simon Fraser (smfr)</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=289495&action=diff" name="attach_289495" title="Patch">attachment 289495</a> <a href="attachment.cgi?id=289495&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=289495&action=review">https://bugs.webkit.org/attachment.cgi?id=289495&action=review</a>
<span class="quote">> Tools/ChangeLog:7
> + Reviewed by NOBODY (OOPS!).
> +</span >
There should be a summary of your changes here. Describe what features you are adding to the test harness, and how they work.
<span class="quote">> Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:42
> + void forcePressAtPoint(long x, long y, object callback);</span >
I think this will want some extra parameters to describe the force values. I think it should also be done in a separate patch.
<span class="quote">> Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:163
> + } else if (eventType == HandEventPress) {
> + eventMask &= ~kIOHIDDigitizerEventTouch;
> + eventMask |= kIOHIDDigitizerEventAttribute;
> } else if (eventType == HandEventChordChanged) {
> eventMask |= kIOHIDDigitizerEventPosition;
> eventMask |= kIOHIDDigitizerEventAttribute;
> - } else if (eventType == HandEventTouched || eventType == HandEventCanceled) {
> - eventMask |= kIOHIDDigitizerEventIdentity;
> - } else if (eventType == HandEventLifted)
> + } else if (eventType == HandEventTouched)</span >
I can't tell if these are necessary for force press, or long press, which is a good reason to do those in two separate patches.
<span class="quote">> Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:509
> + struct timespec doubleDelay = { 0, multiTapInterval };
> + struct timespec pressDelay = { 0, fingerLiftDelay };</span >
Would prefer it the old way.
<span class="quote">> Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:528
> +- (void)clearTap:(CGPoint)location
> +{
> + [self touchDown:location touchCount:1];
> + struct timespec pressDelay = { 0, fingerLiftDelay };
> + nanosleep(&pressDelay, 0);
> + [self liftUp:location touchCount:1];
> +}</span >
This is weird. Why is a "clear tap" sending another tap?
<span class="quote">> Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:545
> +- (void)longPressTimerCall:(NSTimer *)timer</span >
Weird function name.
<span class="quote">>> Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:558
>> + [self clearTap:CGPointMake(50, 50)];
>
> Why the random hardcoded 50, 50?</span >
Also I think it should be the job of the test, or the harness to remove the callout bar. This code is too low-level, and is just involved in synthesizing touches.
<span class="quote">> LayoutTests/fast/events/touch/ios/long-press-to-select-text.html:37
> +                                                output += "No Selection";</span >
It's best if the test result is self-describing. For example:
"FAIL: failed to select a word as a result of a long press"
"PASS: successfully selected the word " + selection
<span class="quote">> LayoutTests/fast/events/touch/ios/long-press-to-select-text.html:59
> +        PressMe<br></span >
This is kinda gross HTML. Use a <p>?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>