Wrap MojoFrameSinkManager in a FrameSinkManagerConnection object to allow for mocking |
||||||||||
Issue descriptionWindow server code should not talk to the display compositor mojo interface directly. Instead, it should talk to a wrapper object that can be mocked out in unit tests.
,
Mar 6 2017
,
Apr 18 2017
We might want a FakeFrameSinkManagerConnection for some of the mus unit tests.
,
Apr 18 2017
I agree with sadrul, if there is a mock implementation it should be an implementation of mojom::FrameSinkManager, no need for another interface.
,
Apr 18 2017
I agree with sadrul and kylechar if the wrapper/mock is only for test purposes.
,
Apr 19 2017
,
May 3 2017
,
May 12 2017
,
May 12 2017
After discussion, I'm adding a FakeFrameSinkManager. FakeFrameSinkManager implements mojom::FrameSinkManager and is a test implementation for mus unit tests.
,
May 23 2017
,
Jun 5 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f4731b44296ceb64fa017aeea52a6978ddb2c073 commit f4731b44296ceb64fa017aeea52a6978ddb2c073 Author: Alex Zhang <staraz@chromium.org> Date: Mon Jun 05 17:52:30 2017 Add FrameSinkMnagerClientBinding Class FrameSinkManagerClientBinding holds the mojo connection between FrameSinkManager and FrameSinkManagerClient. It is owned by WindowServer. Service::OnStart creates a FrameSinkManagerClientBinding object before passing it to the WindowServer. FrameSinkManagerClientBinding hides the mojo interface pointer from WindowServer and allows us to unit test WindowServer. Unit tests will be implemented in a separate CL. Bug: 698026 Change-Id: I2dfa634709186ca3b5e64be9ecf6040fa9e9826d Reviewed-on: https://chromium-review.googlesource.com/521823 Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Fady Samuel <fsamuel@chromium.org> Commit-Queue: Xingyu Zhang <staraz@chromium.org> Cr-Commit-Position: refs/heads/master@{#477018} [modify] https://crrev.com/f4731b44296ceb64fa017aeea52a6978ddb2c073/services/ui/service.cc [modify] https://crrev.com/f4731b44296ceb64fa017aeea52a6978ddb2c073/services/ui/ws/BUILD.gn [add] https://crrev.com/f4731b44296ceb64fa017aeea52a6978ddb2c073/services/ui/ws/frame_sink_manager_client_binding.cc [add] https://crrev.com/f4731b44296ceb64fa017aeea52a6978ddb2c073/services/ui/ws/frame_sink_manager_client_binding.h [modify] https://crrev.com/f4731b44296ceb64fa017aeea52a6978ddb2c073/services/ui/ws/test_utils.cc [modify] https://crrev.com/f4731b44296ceb64fa017aeea52a6978ddb2c073/services/ui/ws/window_server.cc [modify] https://crrev.com/f4731b44296ceb64fa017aeea52a6978ddb2c073/services/ui/ws/window_server.h
,
Jun 9 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b667ff6993deee24252083a1424c4cb9b6fb6fce commit b667ff6993deee24252083a1424c4cb9b6fb6fce Author: Alex Zhang <staraz@chromium.org> Date: Fri Jun 09 19:51:15 2017 Wrap GpuHost in an Interface This CL extracts the public methods from GpuHost to form a GpuHost interface. The existing GpuHost is renamed to DefaultGpuHost and implements the GpuHost interface. The DefaultGpuHost sets up connection from clients to the real service implementation in the GPU process. With the GpuHost interface, WS tests can inject a test implementation of GpuHost to WindowServer and we can have unit tests without any mojo connections. Test implementations will be added in a separate CL. Bug: 698026 Change-Id: I5e283b6230dd0508386fc4ae74fdfaeca3361b4d Reviewed-on: https://chromium-review.googlesource.com/526077 Commit-Queue: Xingyu Zhang <staraz@chromium.org> Reviewed-by: Fady Samuel <fsamuel@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#478381} [modify] https://crrev.com/b667ff6993deee24252083a1424c4cb9b6fb6fce/services/ui/service.cc [modify] https://crrev.com/b667ff6993deee24252083a1424c4cb9b6fb6fce/services/ui/ws/gpu_host.cc [modify] https://crrev.com/b667ff6993deee24252083a1424c4cb9b6fb6fce/services/ui/ws/gpu_host.h [modify] https://crrev.com/b667ff6993deee24252083a1424c4cb9b6fb6fce/services/ui/ws/gpu_host_unittest.cc [modify] https://crrev.com/b667ff6993deee24252083a1424c4cb9b6fb6fce/services/ui/ws/test_utils.cc [modify] https://crrev.com/b667ff6993deee24252083a1424c4cb9b6fb6fce/services/ui/ws/window_server.cc [modify] https://crrev.com/b667ff6993deee24252083a1424c4cb9b6fb6fce/services/ui/ws/window_server.h
,
Jun 13 2017
,
Jun 13 2017
,
Aug 2 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0f4550184c8fdc699fd966abeacc4931de4195e7 commit 0f4550184c8fdc699fd966abeacc4931de4195e7 Author: Alex Zhang <staraz@chromium.org> Date: Wed Aug 02 02:01:33 2017 Add TestFrameSinkManagerImpl and TestGpuHost classes TestFrameSinkManagerImpl is an empty implementation of mojom::FrameSinkManager. It takes the place of FrameSinkManagerClientBinding in WindowServer in unit tests. TestGpuHost is an empty implementation of GpuHost. It takes the places of DefaultGpuHost in WindowServer in unit tests. TestWindowServerDelegate now creates a WindowServer with the test implementations so that there is no mojo connections in ws unit tests. Bug: 698026 Change-Id: Ie8682e15a624bcfca2856f07508051cfb4f19308 Reviewed-on: https://chromium-review.googlesource.com/594849 Commit-Queue: Xingyu Zhang <staraz@chromium.org> Reviewed-by: Fady Samuel <fsamuel@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#491213} [modify] https://crrev.com/0f4550184c8fdc699fd966abeacc4931de4195e7/services/ui/ws/BUILD.gn [add] https://crrev.com/0f4550184c8fdc699fd966abeacc4931de4195e7/services/ui/ws/test_frame_sink_manager.h [add] https://crrev.com/0f4550184c8fdc699fd966abeacc4931de4195e7/services/ui/ws/test_gpu_host.h [modify] https://crrev.com/0f4550184c8fdc699fd966abeacc4931de4195e7/services/ui/ws/test_utils.cc [modify] https://crrev.com/0f4550184c8fdc699fd966abeacc4931de4195e7/services/ui/ws/test_utils.h
,
Aug 2 2017
|
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by sadrul@chromium.org
, Mar 3 2017