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

Issue 907893002: Retry to add MockPresentationClient to use in layout tests. (Closed)

Created:
5 years, 10 months ago by whywhat
Modified:
5 years, 10 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, jochen+watch_chromium.org, mkwst+moarreviews-shell_chromium.org, mlamouri+watch-content_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Retry to add MockPresentationClient to use in layout tests. Now there's a MockPresentationService that's owned by WebTestProxy and accepts private method calls from the tests. MockPresentationClient was moved to WebFrameTestProxy instance since we want one per each frame. Reset logic is added too to make tests more independent. BUG=412331 Committed: https://crrev.com/57b3af2412a81a4c0abf54e0146c0f7bf5530249 Cr-Commit-Position: refs/heads/master@{#316199}

Patch Set 1 #

Total comments: 10

Patch Set 2 : Split Presentation API mock into per-frame and per-view objects #

Total comments: 2

Patch Set 3 : Replaced a failing DCHECK with a Reset(). #

Total comments: 10

Patch Set 4 : Addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+267 lines, -0 lines) Patch
M content/content_shell.gypi View 1 1 chunk +4 lines, -0 lines 0 comments Download
M content/shell/BUILD.gn View 1 1 chunk +4 lines, -0 lines 0 comments Download
M content/shell/renderer/layout_test/webkit_test_runner.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M content/shell/renderer/layout_test/webkit_test_runner.cc View 1 2 3 2 chunks +9 lines, -0 lines 0 comments Download
A content/shell/renderer/test_runner/mock_presentation_client.h View 1 2 3 1 chunk +51 lines, -0 lines 0 comments Download
A content/shell/renderer/test_runner/mock_presentation_client.cc View 1 1 chunk +61 lines, -0 lines 0 comments Download
A content/shell/renderer/test_runner/mock_presentation_service.h View 1 2 3 1 chunk +45 lines, -0 lines 0 comments Download
A content/shell/renderer/test_runner/mock_presentation_service.cc View 1 2 1 chunk +48 lines, -0 lines 0 comments Download
M content/shell/renderer/test_runner/test_runner.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M content/shell/renderer/test_runner/test_runner.cc View 1 2 5 chunks +13 lines, -0 lines 0 comments Download
M content/shell/renderer/test_runner/web_frame_test_proxy.h View 1 3 chunks +11 lines, -0 lines 0 comments Download
M content/shell/renderer/test_runner/web_test_delegate.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M content/shell/renderer/test_runner/web_test_proxy.h View 1 2 3 chunks +3 lines, -0 lines 0 comments Download
M content/shell/renderer/test_runner/web_test_proxy.cc View 1 2 2 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (2 generated)
whywhat
Please, take another look. I removed the ASSERT causing the failures in the original change. ...
5 years, 10 months ago (2015-02-09 15:03:48 UTC) #2
Mike West
1. Can you update the CL description to be a little less confusing? :) 2. ...
5 years, 10 months ago (2015-02-09 16:46:46 UTC) #3
Peter Beverloo
On 2015/02/09 16:46:46, Mike West wrote: > 1. Can you update the CL description to ...
5 years, 10 months ago (2015-02-09 17:40:33 UTC) #4
Peter Beverloo
https://codereview.chromium.org/907893002/diff/1/content/shell/renderer/test_runner/web_frame_test_proxy.h File content/shell/renderer/test_runner/web_frame_test_proxy.h (right): https://codereview.chromium.org/907893002/diff/1/content/shell/renderer/test_runner/web_frame_test_proxy.h#newcode45 content/shell/renderer/test_runner/web_frame_test_proxy.h:45: return base_proxy_->GetPresentationClientMock(); So, in regards to hierarchy, WebFrameTestProxy is ...
5 years, 10 months ago (2015-02-11 13:44:16 UTC) #5
whywhat
PTAL. https://codereview.chromium.org/907893002/diff/1/content/shell/renderer/test_runner/web_frame_test_proxy.h File content/shell/renderer/test_runner/web_frame_test_proxy.h (right): https://codereview.chromium.org/907893002/diff/1/content/shell/renderer/test_runner/web_frame_test_proxy.h#newcode45 content/shell/renderer/test_runner/web_frame_test_proxy.h:45: return base_proxy_->GetPresentationClientMock(); On 2015/02/11 13:44:16, Peter Beverloo wrote: ...
5 years, 10 months ago (2015-02-12 16:27:58 UTC) #6
whywhat
https://codereview.chromium.org/907893002/diff/1/content/shell/renderer/test_runner/mock_presentation_client.cc File content/shell/renderer/test_runner/mock_presentation_client.cc (right): https://codereview.chromium.org/907893002/diff/1/content/shell/renderer/test_runner/mock_presentation_client.cc#newcode34 content/shell/renderer/test_runner/mock_presentation_client.cc:34: controller_ = controller; On 2015/02/09 17:40:32, Peter Beverloo wrote: ...
5 years, 10 months ago (2015-02-12 16:30:48 UTC) #7
Peter Beverloo
mostly lg, thank you!! A few questions https://codereview.chromium.org/907893002/diff/20001/content/shell/renderer/test_runner/mock_presentation_service.cc File content/shell/renderer/test_runner/mock_presentation_service.cc (right): https://codereview.chromium.org/907893002/diff/20001/content/shell/renderer/test_runner/mock_presentation_service.cc#newcode16 content/shell/renderer/test_runner/mock_presentation_service.cc:16: DCHECK(!screen_availability_ && ...
5 years, 10 months ago (2015-02-12 17:39:20 UTC) #8
whywhat
https://codereview.chromium.org/907893002/diff/20001/content/shell/renderer/test_runner/mock_presentation_service.cc File content/shell/renderer/test_runner/mock_presentation_service.cc (right): https://codereview.chromium.org/907893002/diff/20001/content/shell/renderer/test_runner/mock_presentation_service.cc#newcode16 content/shell/renderer/test_runner/mock_presentation_service.cc:16: DCHECK(!screen_availability_ && !presentation_clients_.might_have_observers()) On 2015/02/12 17:39:20, Peter Beverloo wrote: ...
5 years, 10 months ago (2015-02-12 18:40:14 UTC) #9
Peter Beverloo
Ok, thanks for checking. lgtm
5 years, 10 months ago (2015-02-12 18:55:18 UTC) #10
Mike West
content/shell LGTM.
5 years, 10 months ago (2015-02-13 04:58:31 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/907893002/60001
5 years, 10 months ago (2015-02-13 09:11:06 UTC) #13
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 10 months ago (2015-02-13 10:08:36 UTC) #14
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/57b3af2412a81a4c0abf54e0146c0f7bf5530249 Cr-Commit-Position: refs/heads/master@{#316199}
5 years, 10 months ago (2015-02-13 10:09:30 UTC) #15
whywhat
5 years, 10 months ago (2015-02-26 14:18:05 UTC) #16
Message was sent while issue was closed.
A revert of this CL (patchset #4 id:60001) has been created in
https://codereview.chromium.org/963493002/ by avayvod@chromium.org.

The reason for reverting is: While the LayoutTests only test the logic in the
mocks and the plumbing, maintaining the mocks while working on the
platform/public interface is a pain and requires landing patches simultaneously
in Blink and Chromium repositories. There's no layout test using this anyway
yet.
I'll add layout tests later when the Blink-Chromium interface is stable and
maybe Blink is merged into Chromium..

Powered by Google App Engine
This is Rietveld 408576698