RESOLVED FIXED 166271
Throw Exception when test doesn't clean up HID Events properly
https://bugs.webkit.org/show_bug.cgi?id=166271
Summary Throw Exception when test doesn't clean up HID Events properly
Megan Gardner
Reported 2016-12-20 14:33:42 PST
Throw Exception when test doesn't clean up HID Events properly
Attachments
Patch (5.94 KB, patch)
2016-12-20 14:36 PST, Megan Gardner
no flags
Patch (6.00 KB, patch)
2016-12-20 16:24 PST, Megan Gardner
no flags
Megan Gardner
Comment 1 2016-12-20 14:36:13 PST
Simon Fraser (smfr)
Comment 2 2016-12-20 16:07:05 PST
Comment on attachment 297555 [details] 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?".
Megan Gardner
Comment 3 2016-12-20 16:24:21 PST
WebKit Commit Bot
Comment 4 2016-12-20 17:11:10 PST
Comment on attachment 297567 [details] Patch Clearing flags on attachment: 297567 Committed r210048: <http://trac.webkit.org/changeset/210048>
WebKit Commit Bot
Comment 5 2016-12-20 17:11:14 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.