<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 - 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@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=297555&action=diff" name="attach_297555" title="Patch">attachment 297555</a> <a href="attachment.cgi?id=297555&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=297555&action=review">https://bugs.webkit.org/attachment.cgi?id=297555&action=review</a>
<span class="quote">> Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:772
> +- (bool)checkHIDCallbacksClear</span >
I would call this checkForOutstandingCallbacks Return type should be BOOL
<span class="quote">> Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:776
> + if ([_eventCallbacks count])
> + return NO;
> + return YES;</span >
Or just return [_eventCallbacks count] > 0
<span class="quote">> Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm:57
> +void UIScriptController::checkForClean()</span >
Call this checkForOutstandingCallbacks() too.
<span class="quote">> Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm:60
> + [NSException raise:@"WebKitTestRunnerTestProblem" format:@"Unhandled HID Event exists after NotifyDone, please make sure you are not adding additional HID calls after calling NotifyDone"];</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: "The test completed before all synthesized events had been handled. Perhaps you're calling notifyDone() too early?".</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>