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

Issue 1840823002: Extract WebViewClient 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@separate-pixel-dump-code
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Extract 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. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+522 lines, -368 lines) Patch
M components/test_runner/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +3 lines, -0 lines 0 comments Download
M components/test_runner/event_sender.cc View 3 chunks +6 lines, -6 lines 0 comments Download
M components/test_runner/test_runner.h View 1 2 3 4 5 6 7 5 chunks +11 lines, -2 lines 0 comments Download
M components/test_runner/test_runner.cc View 1 2 3 4 5 6 7 11 chunks +33 lines, -13 lines 0 comments Download
M components/test_runner/test_runner.gyp View 1 chunk +3 lines, -0 lines 0 comments Download
M components/test_runner/web_frame_test_client.cc View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -1 line 0 comments Download
M components/test_runner/web_frame_test_proxy.h View 1 chunk +12 lines, -6 lines 0 comments Download
A components/test_runner/web_frame_test_proxy.cc View 1 chunk +12 lines, -0 lines 0 comments Download
M components/test_runner/web_test_delegate.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M components/test_runner/web_test_interfaces.h View 2 chunks +13 lines, -6 lines 0 comments Download
M components/test_runner/web_test_interfaces.cc View 2 chunks +10 lines, -5 lines 0 comments Download
M components/test_runner/web_test_proxy.h View 1 2 3 7 chunks +47 lines, -74 lines 0 comments Download
M components/test_runner/web_test_proxy.cc View 1 2 3 8 chunks +7 lines, -205 lines 0 comments Download
A components/test_runner/web_view_test_client.h View 1 2 3 1 chunk +92 lines, -0 lines 0 comments Download
A components/test_runner/web_view_test_client.cc View 1 2 3 4 5 6 7 8 1 chunk +230 lines, -0 lines 0 comments Download
M content/public/test/layouttest_support.h View 1 chunk +4 lines, -0 lines 0 comments Download
M content/shell/renderer/layout_test/blink_test_runner.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M content/shell/renderer/layout_test/blink_test_runner.cc View 1 2 3 4 5 6 7 5 chunks +9 lines, -44 lines 0 comments Download
M content/shell/renderer/layout_test/layout_test_content_renderer_client.cc View 3 chunks +8 lines, -1 line 0 comments Download
M content/test/layouttest_support.cc View 1 2 3 4 5 6 7 2 chunks +12 lines, -3 lines 0 comments Download

Messages

Total messages: 20 (10 generated)
Łukasz Anforowicz
jochen@, could you please take a look?
4 years, 8 months ago (2016-03-30 22:48:15 UTC) #3
jochen (gone - plz use gerrit)
lgtm
4 years, 8 months ago (2016-03-31 15:14:25 UTC) #4
Łukasz Anforowicz
Just a quick explanation of what changed in the latest patchset (uploaded after an l-g-t-m) ...
4 years, 8 months ago (2016-03-31 20:59:27 UTC) #5
jochen (gone - plz use gerrit)
still lgtm
4 years, 8 months ago (2016-04-01 08:43:22 UTC) #6
commit-bot: I haz the power
This CL has an open dependency (Issue 1844233004 Patch 20001). Please resolve the dependency and ...
4 years, 8 months ago (2016-04-01 16:14:58 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1840823002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1840823002/140001
4 years, 8 months ago (2016-04-05 04:24:47 UTC) #12
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/164525)
4 years, 8 months ago (2016-04-05 04:35:12 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1840823002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1840823002/160001
4 years, 8 months ago (2016-04-05 14:05:31 UTC) #17
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 8 months ago (2016-04-05 14:51:37 UTC) #18
commit-bot: I haz the power
4 years, 8 months ago (2016-04-05 14:52:36 UTC) #20
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/01da260209729cc19fd30b0d234ec3ecaf3e0766
Cr-Commit-Position: refs/heads/master@{#385173}

Powered by Google App Engine
This is Rietveld 408576698