DescriptionTrack focused view in TestRunner instead of in BlinkTestRunner.
Problem description
===================
Layout tests attempt to "globally" track currently focused view - this
is done in order to "defocus" previously focused view at the right time.
Before this CL, the tracking was done in an instance field of a
BlinkTestRunner - this is wrong, as BlinkTestRunner is not "global"
(there can be multiple BlinkTestRunner objects associated with a single
TestInterfaces / TestRunner pair, because BlinkTestRunner objects are
created for each view).
The wrongness described above was leading to test failures in
https://crrev.com/1885993002 which starts to use correct BlinkTestRunner
from WebViewTestClient and WebTestProxyBase. The test failures were in:
- scrollbars/custom-scrollbar-inactive-pseudo.html
- http/tests/notifications/click-window-focus-document.html
Fix description
===============
This CL moves tracking of the previously focused view from
BlinkTestRunner::focused_view_ into TestRunner::previously_focused_view_.
BlinkTestRunner::OnSetTestConfiguration has to go through
WebTestRunner/TestRunner to correctly track view focused when starting a
test.
Alternative fix would be to make BlinkTestRunner::focused_view_ field static.
This works (as seen in patchset 1 at https://crrev.com/1885993002/#ps1), but
the fix in the current CL more correctly assigns responsibilities:
- TestRunner tracks global test state
- BlinkTestRunner tracks test state associated with a specific view / window
(i.e. whether it is a |is_main_window_|). OTOH, I recognize that
unfortunately BlinkTestRunner is currently still responsible for other
globally-applicable functionality (i.e. PrintMessage).
BUG=595089
Committed: https://crrev.com/95416be1445ef1c72a8f907b36c48d8c209c8442
Cr-Commit-Position: refs/heads/master@{#387316}
Patch Set 1 #
Dependent Patchsets: Messages
Total messages: 12 (5 generated)
|