<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:simon.fraser&#64;apple.com" title="Simon Fraser (smfr) &lt;simon.fraser&#64;apple.com&gt;"> <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&#64;apple.com" title="Simon Fraser (smfr) &lt;simon.fraser&#64;apple.com&gt;"> <span class="fn">Simon Fraser (smfr)</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=289495&amp;action=diff" name="attach_289495" title="Patch">attachment 289495</a> <a href="attachment.cgi?id=289495&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=289495&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=289495&amp;action=review</a>

<span class="quote">&gt; Tools/ChangeLog:7
&gt; +        Reviewed by NOBODY (OOPS!).
&gt; +</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">&gt; Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:42
&gt; +    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">&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:163
&gt; +    } else if (eventType == HandEventPress) {
&gt; +        eventMask &amp;= ~kIOHIDDigitizerEventTouch;
&gt; +        eventMask |= kIOHIDDigitizerEventAttribute;
&gt;      } else if (eventType == HandEventChordChanged) {
&gt;          eventMask |= kIOHIDDigitizerEventPosition;
&gt;          eventMask |= kIOHIDDigitizerEventAttribute;
&gt; -    } else if (eventType == HandEventTouched  || eventType == HandEventCanceled) {
&gt; -        eventMask |= kIOHIDDigitizerEventIdentity;
&gt; -    } else if (eventType == HandEventLifted)
&gt; +    } 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">&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:509
&gt; +    struct timespec doubleDelay = { 0, multiTapInterval };
&gt; +    struct timespec pressDelay = { 0, fingerLiftDelay };</span >

Would prefer it the old way.

<span class="quote">&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:528
&gt; +- (void)clearTap:(CGPoint)location
&gt; +{
&gt; +    [self touchDown:location touchCount:1];
&gt; +    struct timespec pressDelay = { 0, fingerLiftDelay };
&gt; +    nanosleep(&amp;pressDelay, 0);
&gt; +    [self liftUp:location touchCount:1];
&gt; +}</span >

This is weird. Why is a &quot;clear tap&quot; sending another tap?

<span class="quote">&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:545
&gt; +- (void)longPressTimerCall:(NSTimer *)timer</span >

Weird function name.

<span class="quote">&gt;&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:558
&gt;&gt; +    [self clearTap:CGPointMake(50, 50)];
&gt; 
&gt; 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">&gt; LayoutTests/fast/events/touch/ios/long-press-to-select-text.html:37
&gt; +                                                output += &quot;No Selection&quot;;</span >

It's best if the test result is self-describing. For example:
&quot;FAIL: failed to select a word as a result of a long press&quot;
&quot;PASS: successfully selected the word &quot; + selection

<span class="quote">&gt; LayoutTests/fast/events/touch/ios/long-press-to-select-text.html:59
&gt; +        PressMe&lt;br&gt;</span >

This is kinda gross HTML. Use a &lt;p&gt;?</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>