[Webkit-unassigned] [Bug 166271] Throw Exception when test doesn't clean up HID Events properly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 20 16:07:05 PST 2016


https://bugs.webkit.org/show_bug.cgi?id=166271

Simon Fraser (smfr) <simon.fraser at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #297555|review?, commit-queue?      |review+, commit-queue-
              Flags|                            |

--- Comment #2 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 297555
  --> https://bugs.webkit.org/attachment.cgi?id=297555
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=297555&action=review

> Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:772
> +- (bool)checkHIDCallbacksClear

I would call this checkForOutstandingCallbacks Return type should be BOOL

> Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:776
> +    if ([_eventCallbacks count])
> +        return NO;
> +    return YES;

Or just return [_eventCallbacks count] > 0

> Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm:57
> +void UIScriptController::checkForClean()

Call this checkForOutstandingCallbacks() too.

> 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"];

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?".

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161221/aa92f6d6/attachment.html>


More information about the webkit-unassigned mailing list