[iOS] Make WKWebView become the first responder to support testing key presses to...
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Sep 2018 20:55:23 +0000 (20:55 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Sep 2018 20:55:23 +0000 (20:55 +0000)
commit1f33aaaf2fc1f8769adfdcafc1d0a28dbc2d6f6e
treefbc003d505b34355fd3d99f4087f516d5d0b5046
parentb3950b20e277aaafec3818e52563e1ab3e69bd5f
[iOS] Make WKWebView become the first responder to support testing key presses to non-editable elements
https://bugs.webkit.org/show_bug.cgi?id=189432

Reviewed by Simon Fraser.

Tools:

Make the WKWebView become the first responder immediately without the need to focus an editable
element. This allows us to test that DOM keyboard events are dispatched to non-editable elements.

* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::PlatformWebView::PlatformWebView):

LayoutTests:

Add a test that DOM keyboard events are dispatched to a non-editable <body> when simulating key
presses using a hardware keyboard.

* fast/events/ios/keydown-keyup-in-non-editable-content-expected.txt: Added.
* fast/events/ios/keydown-keyup-in-non-editable-content.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/ios/keydown-keyup-in-non-editable-content-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/ios/keydown-keyup-in-non-editable-content.html [new file with mode: 0644]
Tools/ChangeLog
Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm