WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
148326
Improve how UI events are dispatched by WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=148326
Summary
Improve how UI events are dispatched by WebKitTestRunner
Alexey Proskuryakov
Reported
2015-08-21 13:27:47 PDT
WebKitTestRunner uses a strange mix of synchronous and asynchronous events to simulate keyboard and mouse. WebKit2 has entire separate code paths to support that. All this makes writing tests difficult, as WebKitTestRunner is difficult to predict, and this obviously reduces test coverage, as we test a custom code path. Here is what the upcoming patch does: - When testRunner is used to send a sync event (like a keyDown), the connection goes into a state where all the events become synchronous in both directions. So it's in a way like the current KeyEventSyncForTesting, but it guarantees that all other events that UI process sends at the same time get delivered in correct order. This is not ideal, because even though page level code in WK2 is now the same, we make it work in a different way. In an ideal world, we would make all the tests that use keyboard and mouse events asynchronous - but I don't think that it's doable in practice. A good thing is that all these tests just worked in the new mode, which means that it's quite close to real life code path, after all. - When testRunner is used to send a scroll event, it's now fully asynchronous. Scrolling is always asynchronous in WK2, and so were most tests, but we used to have a strange mix of sync and async behaviors. It should all be more straightforward now.
Attachments
proposed patch
(177.66 KB, patch)
2015-08-21 14:10 PDT
,
Alexey Proskuryakov
andersca
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2015-08-21 14:10:03 PDT
Created
attachment 259655
[details]
proposed patch
Anders Carlsson
Comment 2
2015-08-21 14:43:14 PDT
Comment on
attachment 259655
[details]
proposed patch View in context:
https://bugs.webkit.org/attachment.cgi?id=259655&action=review
> Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.h:91 > + void allowFullySynchronousModeForTesting() { m_fullySynchronousModeIsAllowedForTesting = true; }
This should be a getter/setter pair.
> Source/WebKit2/UIProcess/API/C/WKContextConfigurationRef.h:58 > +WK_EXPORT void WKContextConfigurationAllowFullySynchronousModeForTesting(WKContextConfigurationRef configuration);
Please add a getter/setter for this to match all the other WKContextConfiguration functions.
Alexey Proskuryakov
Comment 3
2015-08-21 16:12:52 PDT
Committed <
https://trac.webkit.org/r188793
>.
Alexey Proskuryakov
Comment 4
2015-08-22 12:33:09 PDT
Follow-up scrolling test tweak in
r188827
. It was flaky on some machines, randomly not scrolling where it should have, so I nudged some distances. Let's see if it helps.
Daniel Bates
Comment 5
2015-09-02 08:58:55 PDT
(In reply to
comment #3
)
> Committed <
https://trac.webkit.org/r188793
>.
Following this change, the tests fast/events/wheelevent-{basic, mousewheel-interaction}.html began to timeout in iOS Simulator WebKit Test Runner. See
bug #148709
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug