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

Issue 2755573002: Add FrameGenerator Unit Tests (Closed)

Created:
3 years, 9 months ago by Alex Z.
Modified:
3 years, 9 months ago
CC:
chromium-reviews, rjkroege, cc-bugs_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add FrameGenerator Unit Tests Added FrameGeneratorTest and several mock classes to facilitate unit tests for FrameGenerator. Also added some explanatory comments to DisplayClientCompositorFrameSink. BUG=683732 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2755573002 Cr-Commit-Position: refs/heads/master@{#457954} Committed: https://chromium.googlesource.com/chromium/src/+/8e89706698b46b5391e000fbd7175fd63cdf1a64

Patch Set 1 #

Total comments: 6

Patch Set 2 : Clean up #

Total comments: 4

Patch Set 3 : Changed OnCreation test to OnSurfaceCreated #

Total comments: 6

Patch Set 4 : Added SetDeviceScaleFactor test. #

Patch Set 5 : FrameGenerator ignores MISSED BeginFrameArgs #

Total comments: 5

Patch Set 6 : update observing_begin_frames_ first #

Patch Set 7 : ReferencedSurfaces() #

Total comments: 12

Patch Set 8 : Addressed comments #

Total comments: 12

Patch Set 9 : Addressed comments #

Total comments: 22

Patch Set 10 : Addressed comments #

Total comments: 9

Patch Set 11 : Removed dependency on gmock.h #

Patch Set 12 : Addressed comments #

Patch Set 13 : Added file specified DEPS rule since bots were complaining #

Patch Set 14 : Added cc:test_support to pulic_deps #

Total comments: 2

Patch Set 15 : Removed TestCompositorFrameSink due to name conflict #

Unified diffs Side-by-side diffs Delta from patch set Stats (+270 lines, -8 lines) Patch
M services/ui/ws/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -0 lines 0 comments Download
M services/ui/ws/display_client_compositor_frame_sink.h View 1 chunk +3 lines, -0 lines 0 comments Download
M services/ui/ws/frame_generator.cc View 1 2 3 4 5 6 7 2 chunks +7 lines, -8 lines 0 comments Download
A services/ui/ws/frame_generator_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +258 lines, -0 lines 0 comments Download

Messages

Total messages: 57 (21 generated)
Alex Z.
This is still WIP and I intent to finish all the TODOs I added before ...
3 years, 9 months ago (2017-03-14 23:53:52 UTC) #3
Fady Samuel
This seems like it's moving in the right direction. I've added some suggestions for simplifying ...
3 years, 9 months ago (2017-03-15 00:06:07 UTC) #4
Alex Z.
I'm working on the rest of the tests now. https://codereview.chromium.org/2755573002/diff/1/services/ui/ws/frame_generator_unittest.cc File services/ui/ws/frame_generator_unittest.cc (right): https://codereview.chromium.org/2755573002/diff/1/services/ui/ws/frame_generator_unittest.cc#newcode100 services/ui/ws/frame_generator_unittest.cc:100: ...
3 years, 9 months ago (2017-03-15 17:40:01 UTC) #6
Fady Samuel
Looking good so far! https://codereview.chromium.org/2755573002/diff/40001/services/ui/ws/frame_generator.cc File services/ui/ws/frame_generator.cc (right): https://codereview.chromium.org/2755573002/diff/40001/services/ui/ws/frame_generator.cc#newcode42 services/ui/ws/frame_generator.cc:42: if (window_manager_surface_info_.is_valid()) { nit: this ...
3 years, 9 months ago (2017-03-15 17:47:01 UTC) #7
Alex Z.
https://codereview.chromium.org/2755573002/diff/40001/services/ui/ws/frame_generator.cc File services/ui/ws/frame_generator.cc (right): https://codereview.chromium.org/2755573002/diff/40001/services/ui/ws/frame_generator.cc#newcode42 services/ui/ws/frame_generator.cc:42: if (window_manager_surface_info_.is_valid()) { On 2017/03/15 17:47:00, Fady Samuel wrote: ...
3 years, 9 months ago (2017-03-15 20:37:12 UTC) #8
Fady Samuel
https://codereview.chromium.org/2755573002/diff/60001/services/ui/ws/frame_generator_unittest.cc File services/ui/ws/frame_generator_unittest.cc (right): https://codereview.chromium.org/2755573002/diff/60001/services/ui/ws/frame_generator_unittest.cc#newcode138 services/ui/ws/frame_generator_unittest.cc:138: const cc::SurfaceId& id_last_frame() { Make this a bit more ...
3 years, 9 months ago (2017-03-15 20:44:58 UTC) #9
Fady Samuel
Is this ready to be reviewed again?
3 years, 9 months ago (2017-03-16 20:34:20 UTC) #10
Alex Z.
On 2017/03/16 20:34:20, Fady Samuel wrote: > Is this ready to be reviewed again? No. ...
3 years, 9 months ago (2017-03-16 20:36:32 UTC) #11
brianderson
https://codereview.chromium.org/2755573002/diff/100001/services/ui/ws/frame_generator_unittest.cc File services/ui/ws/frame_generator_unittest.cc (right): https://codereview.chromium.org/2755573002/diff/100001/services/ui/ws/frame_generator_unittest.cc#newcode204 services/ui/ws/frame_generator_unittest.cc:204: EXPECT_EQ(0, NumberOfFramesReceived()); @staraz mentioned this is 1 when MISSED ...
3 years, 9 months ago (2017-03-16 20:46:07 UTC) #13
Alex Z.
https://codereview.chromium.org/2755573002/diff/100001/services/ui/ws/frame_generator_unittest.cc File services/ui/ws/frame_generator_unittest.cc (right): https://codereview.chromium.org/2755573002/diff/100001/services/ui/ws/frame_generator_unittest.cc#newcode207 services/ui/ws/frame_generator_unittest.cc:207: EXPECT_EQ(1, NumberOfFramesReceived()); On 2017/03/16 20:46:07, brianderson wrote: > @staraz ...
3 years, 9 months ago (2017-03-16 20:52:16 UTC) #14
Fady Samuel
https://codereview.chromium.org/2755573002/diff/100001/services/ui/ws/frame_generator_unittest.cc File services/ui/ws/frame_generator_unittest.cc (right): https://codereview.chromium.org/2755573002/diff/100001/services/ui/ws/frame_generator_unittest.cc#newcode207 services/ui/ws/frame_generator_unittest.cc:207: EXPECT_EQ(1, NumberOfFramesReceived()); On 2017/03/16 20:52:16, Alex Z. wrote: > ...
3 years, 9 months ago (2017-03-16 21:06:35 UTC) #15
Alex Z.
https://codereview.chromium.org/2755573002/diff/60001/services/ui/ws/frame_generator_unittest.cc File services/ui/ws/frame_generator_unittest.cc (right): https://codereview.chromium.org/2755573002/diff/60001/services/ui/ws/frame_generator_unittest.cc#newcode138 services/ui/ws/frame_generator_unittest.cc:138: const cc::SurfaceId& id_last_frame() { On 2017/03/15 20:44:58, Fady Samuel ...
3 years, 9 months ago (2017-03-17 13:50:43 UTC) #16
Fady Samuel
https://codereview.chromium.org/2755573002/diff/140001/services/ui/ws/frame_generator.cc File services/ui/ws/frame_generator.cc (right): https://codereview.chromium.org/2755573002/diff/140001/services/ui/ws/frame_generator.cc#newcode192 services/ui/ws/frame_generator.cc:192: observing_begin_frames_ = true; So I was looking at compositor_frame_sink_support.cc ...
3 years, 9 months ago (2017-03-17 14:06:41 UTC) #17
Alex Z.
https://codereview.chromium.org/2755573002/diff/140001/services/ui/ws/frame_generator.cc File services/ui/ws/frame_generator.cc (right): https://codereview.chromium.org/2755573002/diff/140001/services/ui/ws/frame_generator.cc#newcode192 services/ui/ws/frame_generator.cc:192: observing_begin_frames_ = true; On 2017/03/17 14:06:40, Fady Samuel wrote: ...
3 years, 9 months ago (2017-03-17 14:43:01 UTC) #18
Fady Samuel
https://codereview.chromium.org/2755573002/diff/160001/services/ui/ws/frame_generator_unittest.cc File services/ui/ws/frame_generator_unittest.cc (right): https://codereview.chromium.org/2755573002/diff/160001/services/ui/ws/frame_generator_unittest.cc#newcode205 services/ui/ws/frame_generator_unittest.cc:205: DCHECK_EQ(0, NumberOfFramesReceived()); EXPECT_EQ https://codereview.chromium.org/2755573002/diff/160001/services/ui/ws/frame_generator_unittest.cc#newcode206 services/ui/ws/frame_generator_unittest.cc:206: DCHECK_EQ(nullptr, ReferencedSurfaces()); EXPECT_EQ https://codereview.chromium.org/2755573002/diff/160001/services/ui/ws/frame_generator_unittest.cc#newcode236 ...
3 years, 9 months ago (2017-03-17 15:04:20 UTC) #19
Alex Z.
https://codereview.chromium.org/2755573002/diff/160001/services/ui/ws/frame_generator_unittest.cc File services/ui/ws/frame_generator_unittest.cc (right): https://codereview.chromium.org/2755573002/diff/160001/services/ui/ws/frame_generator_unittest.cc#newcode205 services/ui/ws/frame_generator_unittest.cc:205: DCHECK_EQ(0, NumberOfFramesReceived()); On 2017/03/17 15:04:19, Fady Samuel wrote: > ...
3 years, 9 months ago (2017-03-17 15:11:51 UTC) #20
Fady Samuel
lgtm
3 years, 9 months ago (2017-03-17 15:13:54 UTC) #21
Alex Z.
msw@chromium.org: Please review my changes. This CL adds unit tests to FrameGenerator. It also fixed ...
3 years, 9 months ago (2017-03-17 15:19:05 UTC) #23
msw
Again, I understand very little of frame sinks/generators, etc.; I'm relying on Fady's review competence ...
3 years, 9 months ago (2017-03-17 16:35:39 UTC) #24
Fady Samuel
https://codereview.chromium.org/2755573002/diff/180001/services/ui/ws/frame_generator_unittest.cc File services/ui/ws/frame_generator_unittest.cc (right): https://codereview.chromium.org/2755573002/diff/180001/services/ui/ws/frame_generator_unittest.cc#newcode15 services/ui/ws/frame_generator_unittest.cc:15: #include "testing/gmock/include/gmock/gmock.h" On 2017/03/17 16:35:38, msw wrote: > Is ...
3 years, 9 months ago (2017-03-17 16:55:31 UTC) #25
Alex Z.
https://codereview.chromium.org/2755573002/diff/180001/services/ui/ws/frame_generator_unittest.cc File services/ui/ws/frame_generator_unittest.cc (right): https://codereview.chromium.org/2755573002/diff/180001/services/ui/ws/frame_generator_unittest.cc#newcode15 services/ui/ws/frame_generator_unittest.cc:15: #include "testing/gmock/include/gmock/gmock.h" On 2017/03/17 16:55:31, Fady Samuel wrote: > ...
3 years, 9 months ago (2017-03-17 19:15:07 UTC) #26
Fady Samuel
https://codereview.chromium.org/2755573002/diff/200001/services/ui/ws/frame_generator_unittest.cc File services/ui/ws/frame_generator_unittest.cc (right): https://codereview.chromium.org/2755573002/diff/200001/services/ui/ws/frame_generator_unittest.cc#newcode83 services/ui/ws/frame_generator_unittest.cc:83: last_metadata_ = &last_frame_.metadata; No need for these two lines: ...
3 years, 9 months ago (2017-03-17 19:22:39 UTC) #27
Alex Z.
https://codereview.chromium.org/2755573002/diff/200001/services/ui/ws/frame_generator_unittest.cc File services/ui/ws/frame_generator_unittest.cc (right): https://codereview.chromium.org/2755573002/diff/200001/services/ui/ws/frame_generator_unittest.cc#newcode83 services/ui/ws/frame_generator_unittest.cc:83: last_metadata_ = &last_frame_.metadata; On 2017/03/17 19:22:39, Fady Samuel wrote: ...
3 years, 9 months ago (2017-03-17 19:33:54 UTC) #28
Fady Samuel
I don't see the addressed changes?
3 years, 9 months ago (2017-03-17 19:36:47 UTC) #29
Fady Samuel
Still LGTM. This is ready for landing, now, I think.
3 years, 9 months ago (2017-03-17 19:43:45 UTC) #30
Fady Samuel
Thanks!
3 years, 9 months ago (2017-03-17 19:43:52 UTC) #31
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/2755573002/240001
3 years, 9 months ago (2017-03-17 19:45:33 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: linux_trusty_blink_rel on master.tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/linux_trusty_blink_rel/builds/6689) cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, ...
3 years, 9 months ago (2017-03-17 19:49:53 UTC) #36
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/2755573002/280001
3 years, 9 months ago (2017-03-17 20:09:28 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/252790)
3 years, 9 months ago (2017-03-17 20:58:51 UTC) #45
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/2755573002/280001
3 years, 9 months ago (2017-03-17 21:41:13 UTC) #47
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/386150) win_clang on master.tryserver.chromium.win (JOB_FAILED, ...
3 years, 9 months ago (2017-03-17 21:47:16 UTC) #49
Fady Samuel
https://codereview.chromium.org/2755573002/diff/280001/services/ui/ws/frame_generator_unittest.cc File services/ui/ws/frame_generator_unittest.cc (right): https://codereview.chromium.org/2755573002/diff/280001/services/ui/ws/frame_generator_unittest.cc#newcode23 services/ui/ws/frame_generator_unittest.cc:23: class TestFrameGeneratorDelegate : public FrameGeneratorDelegate { Looks like you ...
3 years, 9 months ago (2017-03-18 02:44:07 UTC) #50
Alex Z.
https://codereview.chromium.org/2755573002/diff/280001/services/ui/ws/frame_generator_unittest.cc File services/ui/ws/frame_generator_unittest.cc (right): https://codereview.chromium.org/2755573002/diff/280001/services/ui/ws/frame_generator_unittest.cc#newcode23 services/ui/ws/frame_generator_unittest.cc:23: class TestFrameGeneratorDelegate : public FrameGeneratorDelegate { On 2017/03/18 02:44:06, ...
3 years, 9 months ago (2017-03-18 03:03:25 UTC) #51
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/2755573002/300001
3 years, 9 months ago (2017-03-18 03:03:59 UTC) #54
commit-bot: I haz the power
3 years, 9 months ago (2017-03-18 04:13:25 UTC) #57
Message was sent while issue was closed.
Committed patchset #15 (id:300001) as
https://chromium.googlesource.com/chromium/src/+/8e89706698b46b5391e000fbd717...

Powered by Google App Engine
This is Rietveld 408576698