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

Issue 2795683003: [cc]Replace use of SurfaceFactory with CompositorFrameSinkSupport in tests (Closed)

Created:
3 years, 8 months ago by Alex Z.
Modified:
3 years, 8 months ago
Reviewers:
danakj, Fady Samuel, piman
CC:
chromium-reviews, cc-bugs_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Replace use of SurfaceFactory with CompositorFrameSinkSupport in cc tests SurfaceFactory is being deleted since all non-test usages have been replaced by CompositorFrameSinkSupport. This CL replaces usages in all but SurfaceAggregator tests. BUG=707105 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2795683003 Cr-Commit-Position: refs/heads/master@{#464194} Committed: https://chromium.googlesource.com/chromium/src/+/04278218c9ef29904b209f077fd3ee5869898ba2

Patch Set 1 #

Total comments: 12

Patch Set 2 : Address comments #

Total comments: 10

Patch Set 3 : Remove SurfaceFacotry Usages in SurfaceAggregatorTest And Address Comments #

Total comments: 6

Patch Set 4 : Add EmptyCompositorFrameSinkSupportClient Class #

Total comments: 16

Patch Set 5 : Address Nits #

Total comments: 2

Patch Set 6 : Address Nit #

Total comments: 8

Patch Set 7 : Fix Constant Naming #

Patch Set 8 : Remove SurfaceFactory From SurfaceManagerRefTest #

Patch Set 9 : Fix SurfaceManagerRefTest #

Total comments: 16

Patch Set 10 : EXPECT_CALL in MockCompositorFrameSinkSupport() #

Patch Set 11 : Make MockCompositorFrameSinkSupport a friend of CompositorFrameSinkSupport #

Patch Set 12 : Remove #include gmock #

Patch Set 13 : Revert Changes In surface_manager_unittest.cc #

Patch Set 14 : Cleanup #

Patch Set 15 : Rebase To Use CompositorFrameSinkSupport::Create #

Patch Set 16 : Update returned_resources_ in FakeCompositorFrameSinkSupportClient::DidReceiveCompositorFrameAck #

Unified diffs Side-by-side diffs Delta from patch set Stats (+590 lines, -506 lines) Patch
M cc/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M cc/surfaces/compositor_frame_sink_support.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -1 line 0 comments Download
M cc/surfaces/display_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +14 lines, -34 lines 0 comments Download
M cc/surfaces/surface_aggregator_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 84 chunks +321 lines, -301 lines 0 comments Download
M cc/surfaces/surface_hittest_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 20 chunks +70 lines, -59 lines 0 comments Download
M cc/surfaces/surface_manager_ref_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +30 lines, -27 lines 0 comments Download
M cc/surfaces/surface_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +19 lines, -34 lines 0 comments Download
M cc/surfaces/surfaces_pixeltest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 12 chunks +52 lines, -43 lines 0 comments Download
A cc/test/fake_compositor_frame_sink_support_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +46 lines, -0 lines 0 comments Download
A cc/test/fake_compositor_frame_sink_support_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +36 lines, -0 lines 0 comments Download
M cc/test/surface_hittest_test_helpers.h View 2 chunks +0 lines, -7 lines 0 comments Download

Messages

Total messages: 97 (62 generated)
Alex Z.
PTAL.
3 years, 8 months ago (2017-04-03 22:24:28 UTC) #4
Fady Samuel
https://codereview.chromium.org/2795683003/diff/1/cc/surfaces/surface_hittest_unittest.cc File cc/surfaces/surface_hittest_unittest.cc (right): https://codereview.chromium.org/2795683003/diff/1/cc/surfaces/surface_hittest_unittest.cc#newcode63 cc/surfaces/surface_hittest_unittest.cc:63: static constexpr bool needs_sync_points = true; Put these in ...
3 years, 8 months ago (2017-04-03 22:33:26 UTC) #6
Alex Z.
https://codereview.chromium.org/2795683003/diff/1/cc/surfaces/surface_hittest_unittest.cc File cc/surfaces/surface_hittest_unittest.cc (right): https://codereview.chromium.org/2795683003/diff/1/cc/surfaces/surface_hittest_unittest.cc#newcode63 cc/surfaces/surface_hittest_unittest.cc:63: static constexpr bool needs_sync_points = true; On 2017/04/03 22:33:25, ...
3 years, 8 months ago (2017-04-04 14:10:33 UTC) #11
Fady Samuel
lgtm https://codereview.chromium.org/2795683003/diff/20001/cc/surfaces/compositor_frame_sink_support.h File cc/surfaces/compositor_frame_sink_support.h (right): https://codereview.chromium.org/2795683003/diff/20001/cc/surfaces/compositor_frame_sink_support.h#newcode59 cc/surfaces/compositor_frame_sink_support.h:59: BeginFrameSource* begin_frame_source() { return begin_frame_source_; } BeginFrameSourceForTesting() const ...
3 years, 8 months ago (2017-04-04 22:48:17 UTC) #14
Fady Samuel
Sorry not lgtm. Please address comments first.
3 years, 8 months ago (2017-04-04 22:48:32 UTC) #15
Alex Z.
https://codereview.chromium.org/2795683003/diff/20001/cc/surfaces/compositor_frame_sink_support.h File cc/surfaces/compositor_frame_sink_support.h (right): https://codereview.chromium.org/2795683003/diff/20001/cc/surfaces/compositor_frame_sink_support.h#newcode59 cc/surfaces/compositor_frame_sink_support.h:59: BeginFrameSource* begin_frame_source() { return begin_frame_source_; } On 2017/04/04 22:48:16, ...
3 years, 8 months ago (2017-04-05 14:38:55 UTC) #17
Fady Samuel
Please don't add state to CompositorFrameSinkSupport that is only used for testing. This is generally ...
3 years, 8 months ago (2017-04-05 14:42:32 UTC) #19
Alex Z.
https://codereview.chromium.org/2795683003/diff/40001/cc/surfaces/compositor_frame_sink_support.cc File cc/surfaces/compositor_frame_sink_support.cc (right): https://codereview.chromium.org/2795683003/diff/40001/cc/surfaces/compositor_frame_sink_support.cc#newcode191 cc/surfaces/compositor_frame_sink_support.cc:191: CompositorFrameSinkSupport::LastReturnedResourcesForTesting() const { On 2017/04/05 14:42:32, Fady Samuel wrote: ...
3 years, 8 months ago (2017-04-05 20:43:13 UTC) #23
Fady Samuel
Getting closer! A bunch of mostly nits. https://codereview.chromium.org/2795683003/diff/60001/cc/surfaces/surface_manager_unittest.cc File cc/surfaces/surface_manager_unittest.cc (right): https://codereview.chromium.org/2795683003/diff/60001/cc/surfaces/surface_manager_unittest.cc#newcode16 cc/surfaces/surface_manager_unittest.cc:16: constexpr bool ...
3 years, 8 months ago (2017-04-05 21:32:42 UTC) #25
Alex Z.
https://codereview.chromium.org/2795683003/diff/60001/cc/surfaces/surface_manager_unittest.cc File cc/surfaces/surface_manager_unittest.cc (right): https://codereview.chromium.org/2795683003/diff/60001/cc/surfaces/surface_manager_unittest.cc#newcode16 cc/surfaces/surface_manager_unittest.cc:16: constexpr bool is_root_child = false; On 2017/04/05 21:32:42, Fady ...
3 years, 8 months ago (2017-04-06 00:04:04 UTC) #29
Fady Samuel
lgtm + nit. Please pass this along to danakj@ https://codereview.chromium.org/2795683003/diff/80001/cc/surfaces/surface_manager_unittest.cc File cc/surfaces/surface_manager_unittest.cc (right): https://codereview.chromium.org/2795683003/diff/80001/cc/surfaces/surface_manager_unittest.cc#newcode355 cc/surfaces/surface_manager_unittest.cc:355: ...
3 years, 8 months ago (2017-04-06 00:08:36 UTC) #31
Alex Z.
https://codereview.chromium.org/2795683003/diff/80001/cc/surfaces/surface_manager_unittest.cc File cc/surfaces/surface_manager_unittest.cc (right): https://codereview.chromium.org/2795683003/diff/80001/cc/surfaces/surface_manager_unittest.cc#newcode355 cc/surfaces/surface_manager_unittest.cc:355: client_b_->BeginFrameSourceForTesting() == nullptr); On 2017/04/06 00:08:36, Fady Samuel wrote: ...
3 years, 8 months ago (2017-04-06 11:59:00 UTC) #34
Alex Z.
danakj@chromium.org: PTAL.
3 years, 8 months ago (2017-04-06 11:59:49 UTC) #36
Fady Samuel
I just noticed the constant variable names...they should probably be kConstantNaming... https://codereview.chromium.org/2795683003/diff/100001/cc/surfaces/surface_hittest_unittest.cc File cc/surfaces/surface_hittest_unittest.cc (right): ...
3 years, 8 months ago (2017-04-06 12:17:23 UTC) #39
Alex Z.
https://codereview.chromium.org/2795683003/diff/100001/cc/surfaces/surface_hittest_unittest.cc File cc/surfaces/surface_hittest_unittest.cc (right): https://codereview.chromium.org/2795683003/diff/100001/cc/surfaces/surface_hittest_unittest.cc#newcode26 cc/surfaces/surface_hittest_unittest.cc:26: constexpr bool needs_sync_points = true; On 2017/04/06 12:17:22, Fady ...
3 years, 8 months ago (2017-04-06 12:34:32 UTC) #40
danakj
Hey, some feedback on CL descriptions based on https://chris.beams.io/posts/git-commit/#imperative The title "Most CC Unit Tests ...
3 years, 8 months ago (2017-04-07 15:03:53 UTC) #49
Alex Z.
On 2017/04/07 15:03:53, danakj wrote: > Hey, some feedback on CL descriptions based on > ...
3 years, 8 months ago (2017-04-07 15:07:14 UTC) #51
danakj
Few comments, but looks good https://codereview.chromium.org/2795683003/diff/160001/cc/surfaces/surface_aggregator_unittest.cc File cc/surfaces/surface_aggregator_unittest.cc (right): https://codereview.chromium.org/2795683003/diff/160001/cc/surfaces/surface_aggregator_unittest.cc#newcode44 cc/surfaces/surface_aggregator_unittest.cc:44: constexpr bool is_root = ...
3 years, 8 months ago (2017-04-07 15:52:45 UTC) #52
Alex Z.
https://codereview.chromium.org/2795683003/diff/160001/cc/surfaces/surface_aggregator_unittest.cc File cc/surfaces/surface_aggregator_unittest.cc (right): https://codereview.chromium.org/2795683003/diff/160001/cc/surfaces/surface_aggregator_unittest.cc#newcode44 cc/surfaces/surface_aggregator_unittest.cc:44: constexpr bool is_root = true; On 2017/04/07 15:52:44, danakj ...
3 years, 8 months ago (2017-04-07 20:43:59 UTC) #53
danakj
https://codereview.chromium.org/2795683003/diff/160001/cc/surfaces/surface_manager_unittest.cc File cc/surfaces/surface_manager_unittest.cc (right): https://codereview.chromium.org/2795683003/diff/160001/cc/surfaces/surface_manager_unittest.cc#newcode55 cc/surfaces/surface_manager_unittest.cc:55: EXPECT_EQ(nullptr, client.BeginFrameSourceForTesting()); On 2017/04/07 20:43:58, Alex Z. wrote: > ...
3 years, 8 months ago (2017-04-07 21:16:17 UTC) #55
Fady Samuel
On 2017/04/07 21:16:17, danakj wrote: > https://codereview.chromium.org/2795683003/diff/160001/cc/surfaces/surface_manager_unittest.cc > File cc/surfaces/surface_manager_unittest.cc (right): > > https://codereview.chromium.org/2795683003/diff/160001/cc/surfaces/surface_manager_unittest.cc#newcode55 > ...
3 years, 8 months ago (2017-04-07 21:20:14 UTC) #56
danakj
On Fri, Apr 7, 2017 at 5:20 PM, <fsamuel@chromium.org> wrote: > On 2017/04/07 21:16:17, danakj ...
3 years, 8 months ago (2017-04-07 21:22:16 UTC) #57
Alex Z.
https://codereview.chromium.org/2795683003/diff/160001/cc/surfaces/surface_manager_unittest.cc File cc/surfaces/surface_manager_unittest.cc (right): https://codereview.chromium.org/2795683003/diff/160001/cc/surfaces/surface_manager_unittest.cc#newcode55 cc/surfaces/surface_manager_unittest.cc:55: EXPECT_EQ(nullptr, client.BeginFrameSourceForTesting()); On 2017/04/07 21:16:17, danakj wrote: > On ...
3 years, 8 months ago (2017-04-07 21:29:01 UTC) #62
danakj
On 2017/04/07 21:29:01, Alex Z. wrote: > https://codereview.chromium.org/2795683003/diff/160001/cc/surfaces/surface_manager_unittest.cc > File cc/surfaces/surface_manager_unittest.cc (right): > > https://codereview.chromium.org/2795683003/diff/160001/cc/surfaces/surface_manager_unittest.cc#newcode55 ...
3 years, 8 months ago (2017-04-07 21:34:34 UTC) #66
Fady Samuel
On 2017/04/07 21:34:34, danakj wrote: > On 2017/04/07 21:29:01, Alex Z. wrote: > > > ...
3 years, 8 months ago (2017-04-07 21:54:07 UTC) #69
Alex Z.
On 2017/04/07 21:34:34, danakj wrote: > On 2017/04/07 21:29:01, Alex Z. wrote: > > > ...
3 years, 8 months ago (2017-04-10 23:41:37 UTC) #72
Alex Z.
piman@: Please review changes in cc/ while danakj@ is out sick.
3 years, 8 months ago (2017-04-11 14:13:04 UTC) #78
piman
lgtm
3 years, 8 months ago (2017-04-11 21:48:32 UTC) #79
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2795683003/300001
3 years, 8 months ago (2017-04-12 12:36:12 UTC) #82
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/345739) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 8 months ago (2017-04-12 12:46:15 UTC) #84
danakj
LGTM but looks like u need to update the tests to use CFSSupport::Create()
3 years, 8 months ago (2017-04-12 14:10:10 UTC) #85
Alex Z.
On 2017/04/12 14:10:10, danakj (out sick) wrote: > LGTM but looks like u need to ...
3 years, 8 months ago (2017-04-12 19:29:50 UTC) #87
danakj
On Wed, Apr 12, 2017 at 3:29 PM, <staraz@chromium.org> wrote: > On 2017/04/12 14:10:10, danakj ...
3 years, 8 months ago (2017-04-12 21:00:00 UTC) #91
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2795683003/340001
3 years, 8 months ago (2017-04-12 21:15:19 UTC) #94
commit-bot: I haz the power
3 years, 8 months ago (2017-04-12 23:08:21 UTC) #97
Message was sent while issue was closed.
Committed patchset #16 (id:340001) as
https://chromium.googlesource.com/chromium/src/+/04278218c9ef29904b209f077fd3...

Powered by Google App Engine
This is Rietveld 408576698