Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Issue 1847893002: Extract WebFrameClient implementation out of WebTestProxyBase. (Closed)

Created:
4 years, 8 months ago by Łukasz Anforowicz
Modified:
4 years, 8 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, jochen+watch_chromium.org, mkwst+moarreviews-shell_chromium.org, mlamouri+watch-content_chromium.org, mlamouri+watch-test-runner_chromium.org, Peter Beverloo, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Extract 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/fd1246076d86b2b9245bb808e7d9a25867256b96 Cr-Commit-Position: refs/heads/master@{#384609}

Patch Set 1 : Original patch from the reverted https://crrev.com/1821923003 #

Patch Set 2 : Revert some changes to mock_color_chooser.cc + fix counting of TestRunner::chooser_count_. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1149 lines, -1051 lines) Patch
M components/test_runner/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M components/test_runner/mock_color_chooser.h View 1 1 chunk +25 lines, -21 lines 0 comments Download
M components/test_runner/mock_color_chooser.cc View 1 2 chunks +5 lines, -7 lines 0 comments Download
M components/test_runner/test_common.h View 2 chunks +7 lines, -0 lines 0 comments Download
M components/test_runner/test_common.cc View 3 chunks +38 lines, -0 lines 0 comments Download
M components/test_runner/test_runner.h View 4 chunks +11 lines, -1 line 0 comments Download
M components/test_runner/test_runner.cc View 1 5 chunks +18 lines, -1 line 0 comments Download
M components/test_runner/test_runner.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
A components/test_runner/web_frame_test_client.h View 1 chunk +129 lines, -0 lines 0 comments Download
A components/test_runner/web_frame_test_client.cc View 1 chunk +765 lines, -0 lines 0 comments Download
M components/test_runner/web_frame_test_proxy.h View 10 chunks +69 lines, -60 lines 0 comments Download
M components/test_runner/web_test_interfaces.h View 3 chunks +9 lines, -0 lines 0 comments Download
M components/test_runner/web_test_interfaces.cc View 2 chunks +12 lines, -0 lines 0 comments Download
M components/test_runner/web_test_proxy.h View 10 chunks +0 lines, -122 lines 0 comments Download
M components/test_runner/web_test_proxy.cc View 16 chunks +4 lines, -779 lines 0 comments Download
M content/public/test/layouttest_support.h View 2 chunks +11 lines, -5 lines 0 comments Download
M content/shell/renderer/layout_test/layout_test_content_renderer_client.h View 2 chunks +0 lines, -18 lines 0 comments Download
M content/shell/renderer/layout_test/layout_test_content_renderer_client.cc View 3 chunks +28 lines, -18 lines 0 comments Download
M content/test/layouttest_support.cc View 2 chunks +14 lines, -19 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 8 (3 generated)
Łukasz Anforowicz
jochen@, can you take a look please? This is basically https://crrev.com/1821923003, but with UaF fixed. ...
4 years, 8 months ago (2016-03-31 18:56:10 UTC) #2
jochen (gone - plz use gerrit)
lgtm
4 years, 8 months ago (2016-04-01 08:44:04 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1847893002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1847893002/20001
4 years, 8 months ago (2016-04-01 16:15:31 UTC) #5
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 8 months ago (2016-04-01 16:53:39 UTC) #6
commit-bot: I haz the power
4 years, 8 months ago (2016-04-01 16:55:12 UTC) #8
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/fd1246076d86b2b9245bb808e7d9a25867256b96
Cr-Commit-Position: refs/heads/master@{#384609}

Powered by Google App Engine
This is Rietveld 408576698