DescriptionExtract WebViewClient implementation out of WebTestProxyBase.
Overview
========
This CL extracts WebViewClient-specific parts of WebTestProxyBase into
a new WebViewTestClient class.
This CL is part of a sequence of CLs that make progress toward:
1) Splitting WebTestProxyBase into separate WebFrameClient /
WebWidgetClient / WebViewClient focused classes
2) Removing WebTestProxyBase from public API of components/test_runner
(and having WebTestProxy and WebFrameTestProxy consume instead
abstract WebFrameClient / WebWidgetClient / WebViewClient interfaces).
Details
=======
Most of the change is mechanical move of code from WebTestProxyBase
into the new WebViewTestClient (slightly tweaking method signatures
as needed to make them fit WebViewClient interface - note camelCasing
in particular).
The new WebViewTestClient needs access to
1) WebWidget (for various widget-y things like animations)
2) WebView (this is just a way to help get RenderView pointer in
BlinkTestRunner::SetFocus method, while avoiding
component/test_runner -> content dependency).
This CL refactors slightly how WebViewTestClient gets both the WebWidget
and WebView pointers:
1) moving initialization to happen right after creation of these objects
by RenderViewImpl::Initialize - when
ContentRenderClient::RenderViewCreated is called
2) to initialize without depending on passing WebTestProxyBase via
BlinkTestRunner::proxy_ field.
3) to pass WebWidget and WebView separately (rather than depend [inside
the removed WebTestProxyBase::GetWebView] on the fact that a
particular upcast from WebWidget to WebView is safe).
WebViewTestClient needs a pointer back to WebTestProxyBase (to be able
to get WebView and WebWidget the client corresponds to). This means
that a separate WebViewTestClient is needed per WebTestProxyBase (this
is different from WebFrameTestClient which depended only on global
TestInterfaces, TestRunner and mocks). To accomodate this,
WebTestInterface no longer owns WebViewTestClient and/or
WebFrameTestClient, but instead passes ownership to WebTestProxyBase
and/or WebFrameTestProxyBase.
This CL also moves tracking of some test state (i.e.
animation_scheduled_, speech_recognizer_ mock, etc.) from
WebTestProxyBase into TestRunner (which tracks most of the other test
state). This means that WebTestProxyBase::Reset method is no longer
needed.
BUG=595089
Committed: https://crrev.com/01da260209729cc19fd30b0d234ec3ecaf3e0766
Cr-Commit-Position: refs/heads/master@{#385173}
Patch Set 1 #Patch Set 2 : Self-review... #Patch Set 3 : Self-review. #Patch Set 4 : Rebasing... #Patch Set 5 : Self-review... #Patch Set 6 : Rebasing... #Patch Set 7 : Fixing tracking of scheduled animations. #Patch Set 8 : Rebasing... #Patch Set 9 : Expanding a comment + an IWYU fix. #Messages
Total messages: 20 (10 generated)
|