<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 - Throw Exception when test doesn't clean up HID Events properly"
   href="https://bugs.webkit.org/show_bug.cgi?id=166271">bug 166271</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 #297555 Flags</td>
           <td>review?, commit-queue?
           </td>
           <td>review+, commit-queue-
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Throw Exception when test doesn't clean up HID Events properly"
   href="https://bugs.webkit.org/show_bug.cgi?id=166271#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Throw Exception when test doesn't clean up HID Events properly"
   href="https://bugs.webkit.org/show_bug.cgi?id=166271">bug 166271</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=297555&amp;action=diff" name="attach_297555" title="Patch">attachment 297555</a> <a href="attachment.cgi?id=297555&amp;action=edit" title="Patch">[details]</a></span>
Patch

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

<span class="quote">&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:772
&gt; +- (bool)checkHIDCallbacksClear</span >

I would call this checkForOutstandingCallbacks Return type should be BOOL

<span class="quote">&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:776
&gt; +    if ([_eventCallbacks count])
&gt; +        return NO;
&gt; +    return YES;</span >

Or just return [_eventCallbacks count] &gt; 0

<span class="quote">&gt; Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm:57
&gt; +void UIScriptController::checkForClean()</span >

Call this checkForOutstandingCallbacks() too.

<span class="quote">&gt; Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm:60
&gt; +        [NSException raise:&#64;&quot;WebKitTestRunnerTestProblem&quot; format:&#64;&quot;Unhandled HID Event exists after NotifyDone, please make sure you are not adding additional HID calls after calling NotifyDone&quot;];</span >

What happens in a test run the this exception fires? Would anyone notice it? Would it be better to RELEASE_ASSERT?

The message is also hard to understand for test writers. What's HID? It should say something more like: &quot;The test completed before all synthesized events had been handled. Perhaps you're calling notifyDone() too early?&quot;.</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>