[WTR] Reset EventSender before running each test.
authorrakuco@webkit.org <rakuco@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Nov 2012 23:04:50 +0000 (23:04 +0000)
committerrakuco@webkit.org <rakuco@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Nov 2012 23:04:50 +0000 (23:04 +0000)
commit8af1656990bc686a116189ccfe496ca032d1092a
tree09ab182bfe60e34f7e1e7d06ad5fa9c1c844b365
parent83dfdeec20e982e6484b12e48d971564cc28208d
[WTR] Reset EventSender before running each test.
https://bugs.webkit.org/show_bug.cgi?id=101353

Reviewed by Simon Fraser.

Contrary to what was done to at least some ports in DumpRenderTree,
EventSender did not currently reset its values in WTR. This caused
flakiness if a test such as editing/selection/fake-doubleclick.html was
run twice in a row, since the click count was not reset across each
run.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::TestController): Do not create m_eventSenderProxy
in the constructor anymore, it is created in
resetStateToConsistentValues now.
(WTR::TestController::resetStateToConsistentValues): Recreate
m_eventSenderProxy every time this method is run.
* WebKitTestRunner/TestController.h: Make m_eventSenderProxy an OwnPtr
and guard it with a platform #ifdef.
* WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
(WTR::EventSenderProxy::~EventSenderProxy): Add an empty
implementation.
* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::EventSenderProxy::~EventSenderProxy): Ditto.
* WebKitTestRunner/qt/EventSenderProxyQt.cpp:
(WTR::EventSenderProxy::~EventSenderProxy): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@133676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/WebKitTestRunner/TestController.cpp
Tools/WebKitTestRunner/TestController.h
Tools/WebKitTestRunner/gtk/EventSenderProxyGtk.cpp
Tools/WebKitTestRunner/mac/EventSenderProxy.mm
Tools/WebKitTestRunner/qt/EventSenderProxyQt.cpp