DescriptionExtract WebFrameClient implementation out of WebTestProxyBase.
Overview
========
This CL extracts WebFrameClient-specific parts of WebTestProxyBase into
a new WebFrameTestClient 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 WebFrameTestClient (slightly tweaking method signatures
as needed to make them fit WebFrameClient interface - note camelCasing
and extra parameters here and there).
Additionally some helper methods (i.e. URLDescription and
WebNavigationPolicyToString) are now needed by both WebTestProxyBase and
by WebFrameTestClient. Consequently, to facilitate code reuse, these
helper methods were moved to test_common.cc.
Finally, in order to decouple WebFrameTestClient from view-specific
WebTestProxyBase the CL does the following:
- It moves counting currently active color choosers from
WebTestProxyBase into TestRunner (and adjusts MockColorChooser
accordingly).
- It moves ownership of MockWebUserMediaClient from
WebTestProxyBase into TestRunner. This is quite natural, as
MockWebUserMediaClient depends only on WebTestDelegate::PostTask and
WebTestDelegate::AddMediaStreamAudioSourceAndTrack (which are not
view-specific).
- Replacing WebFrameTestProxy::set_base_proxy with
WebFrameTestProxy::set_test_client requires refactoring how higher
layers provide the necessary object - in particular after the CL the
WebFrame[Test]Client cannot be extracted from WebTestProxy/RenderView
(because the whole point of this CL is to remove the coupling between
view-specific WebTestProxy and frame-focused WebFrameTestProxy). This
part of the refactoring is accomplished by adding a frame-proxy
creation callback that can be provided to EnableWebTestProxyCreation
(similarily how it already was accepting equivalent view-proxy
creation callback). This refactoring also necessitates extracting a
WebFrameTestProxyBase (to have a concrete/non-templatized type that
content/shell/.../layout_tests layer can take a dependency on).
BUG=595089
Committed: https://crrev.com/11e459b088ab4736f10776a3831d0b9ddf249517
Cr-Commit-Position: refs/heads/master@{#384044}
Patch Set 1 #Patch Set 2 : Rebasing... #Patch Set 3 : Remove unnecessary fwd declaration + comment tweak. #Patch Set 4 : Removing unnecessary TEST_RUNNER_EXPORT. #Patch Set 5 : Rebasing... #
Total comments: 1
Dependent Patchsets: Messages
Total messages: 15 (5 generated)
|