Fix crashing and flaky UIScriptController-based tests in fast/events/ios
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Nov 2015 23:34:47 +0000 (23:34 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Nov 2015 23:34:47 +0000 (23:34 +0000)
commitcdafacd00f4e2134d3d81a59974612fb61d0d237
tree76dac6ae4b46953bf8b5a374ed4b323043b46871
parentb01eedc10086743b2aeda0e875df3e021b0b1559
Fix crashing and flaky UIScriptController-based tests in fast/events/ios
https://bugs.webkit.org/show_bug.cgi?id=150901
<rdar://problem/23261499>

Reviewed by Simon Fraser.

Tools:

Clear out zooming and keyboard-related callbacks after uiScriptComplete has been invoked. This prevents
later tests from calling into code which previous tests attached to these callbacks and causing
WebKitTestRunner to crash due to accessing a deallocated UIScriptController.

* WebKitTestRunner/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::platformClearAllCallbacks):
(WTR::UIScriptController::uiScriptComplete):
* WebKitTestRunner/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::platformClearAllCallbacks):

LayoutTests:

Several changes to tests in fast/events/ios that address flaky behavior when running these tests.
Removes an unnecessary (and flaky) check for the initial innerHeight in
keyboard-should-not-trigger-resize.html, refactors unscalable-viewport-clicks-on-doubletap.html to
send successive taps like the other fast-clicking tests, and adjusts input-value-after-oninput.html
to no longer break if typing in an input autocapitalizes the first letter.

* fast/events/ios/input-value-after-oninput.html:
* fast/events/ios/keyboard-should-not-trigger-resize-expected.txt:
* fast/events/ios/keyboard-should-not-trigger-resize.html:
* fast/events/ios/unscalable-viewport-clicks-on-doubletap-expected.txt:
* fast/events/ios/unscalable-viewport-clicks-on-doubletap.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/ios/input-value-after-oninput.html
LayoutTests/fast/events/ios/keyboard-should-not-trigger-resize-expected.txt
LayoutTests/fast/events/ios/keyboard-should-not-trigger-resize.html
LayoutTests/fast/events/ios/unscalable-viewport-clicks-on-doubletap-expected.txt
LayoutTests/fast/events/ios/unscalable-viewport-clicks-on-doubletap.html
Tools/ChangeLog
Tools/WebKitTestRunner/UIScriptContext/UIScriptController.cpp
Tools/WebKitTestRunner/UIScriptContext/UIScriptController.h
Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm