Address NSWindow sometimes using WebKitTestRunnerEvent too early
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Mar 2019 15:58:36 +0000 (15:58 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Mar 2019 15:58:36 +0000 (15:58 +0000)
commit712edb9f9cf6c0a247338d5030603582087d4b57
tree52bb1f206ee2a367c8788df7724468c17de3a0ab
parent41a451ceb2ebd9248120fc7d41d09adc2a5d51c4
Address NSWindow sometimes using WebKitTestRunnerEvent too early
https://bugs.webkit.org/show_bug.cgi?id=196211
rdar://problem/49110552

Reviewed by Tim Horton.

* WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize):
Make sure that EventSenderProxy always exists when running tests. We used to create
it when resetting before the first test, which is a bit too late.

* WebKitTestRunner/TestController.h:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::platformCreateWebView):
(WTR::TestController::platformCreateOtherPage):
(WTR::TestController::finishCreatingPlatformWebView):
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::PlatformWebView):
Moved some code that made NSWindow use NSEvent during web view creation. We may
need to move more if some other case us found, but this is enough for now.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/WebKitTestRunner/TestController.cpp
Tools/WebKitTestRunner/TestController.h
Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm
Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm