Throw Exception when test doesn't clean up HID Events properly
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Dec 2016 01:10:28 +0000 (01:10 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Dec 2016 01:10:28 +0000 (01:10 +0000)
commit08c13a03f0a3048ad35cd1b5a7bfac0d3cc9e822
treed4e3966eb0a029a52070c8a82e17b1316bc10b56
parent21bcaf1f8d7994fcdf024e442196d59a93ca3a6b
Throw Exception when test doesn't clean up HID Events properly
https://bugs.webkit.org/show_bug.cgi?id=166271

Patch by Megan Gardner <megan_gardner@apple.com> on 2016-12-20
Reviewed by Simon Fraser.

Add in a check when UIScriptController is deleted to make sure that the HID event
callback dictionary is empty. If it is not, and a HID event is hit, this will cause
the program to crash without any good information. Crashes are race-y, and will still
happen with malformed test, but the information will be much more helpful.

* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::checkForClean):
* TestRunnerShared/UIScriptContext/UIScriptContext.cpp:
(UIScriptContext::~UIScriptContext):
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::checkForClean):
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/ios/HIDEventGenerator.h:
* WebKitTestRunner/ios/HIDEventGenerator.mm:
(-[HIDEventGenerator checkHIDCallbacksClear]):
* WebKitTestRunner/ios/TestControllerIOS.mm:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::checkForClean):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm
Tools/TestRunnerShared/UIScriptContext/UIScriptContext.cpp
Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp
Tools/TestRunnerShared/UIScriptContext/UIScriptController.h
Tools/WebKitTestRunner/ios/HIDEventGenerator.h
Tools/WebKitTestRunner/ios/HIDEventGenerator.mm
Tools/WebKitTestRunner/ios/TestControllerIOS.mm
Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm