Make components/arc/arc_session.cc unit-testable |
||||
Issue descriptioncomponents/arc/arc_session.cc is getting larger. We need automated tests for that file to keep the code under control.
,
Jul 6 2017
Had a quick meeting with hidehiko@. I'm going to implement this in the following steps: 1. Move socket creation code to session_manager ( issue 737148 ) to simplify arc_session.cc. 2. Add a small state transition library with full unit tests to components/arc/ to remove all the manual state transitions and switch-cases from arc_session.cc. 3. Refactor arc_session.cc with the library. 4. Mock out dbus and mojo calls in arc_session.cc to make it unit-testable. 5. Write a test. What we want to test here is if arc_session.cc generates a proper 'event' depending on the dbus/mojo IPC result. 6. Do the same as #2 for arc_session_runner.cc.
,
Jul 10 2017
Do you have more details for 2.? Is there a way in which we can add compile-time guarantees a-la clang Thread-safety annotations?
,
Nov 15 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ffb2cc03eae5251fe02f7b9a226166c8f0a0748a commit ffb2cc03eae5251fe02f7b9a226166c8f0a0748a Author: Hidehiko Abe <hidehiko@chromium.org> Date: Wed Nov 15 08:34:34 2017 Remove DoNothingInstanceStopped. Simply replace it by EmptyVoidDBusMethodCallback. BUG= 739118 TEST=Ran build. Change-Id: I2960a87e520b8a9e334414e12a4ba2df65af0a13 Reviewed-on: https://chromium-review.googlesource.com/770911 Reviewed-by: Yusuke Sato <yusukes@chromium.org> Commit-Queue: Hidehiko Abe <hidehiko@chromium.org> Cr-Commit-Position: refs/heads/master@{#516638} [modify] https://crrev.com/ffb2cc03eae5251fe02f7b9a226166c8f0a0748a/components/arc/arc_session.cc
,
Nov 15 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/53c36fda37d3c5bca4bb9e245c76e3a36e7a8309 commit 53c36fda37d3c5bca4bb9e245c76e3a36e7a8309 Author: Hidehiko Abe <hidehiko@chromium.org> Date: Wed Nov 15 13:35:22 2017 Prepare extracting ArcSessionImpl to a dedicated file. This contains two changes. - Introduce ArcSessionImpl::CreateDelegate(). This splits the direct dependency from ArcSession to ArcSessionDelegateImpl. ArcSessionImpl has responsibility to proxy the call. - Get rid of alias for StartArcInstanceResult from the interface of ArcSessionImpl. BUG= 739118 TEST=Ran build. Change-Id: I7bc3f611279a2c942959cb0bf3effd47c131c31b Reviewed-on: https://chromium-review.googlesource.com/771131 Commit-Queue: Hidehiko Abe <hidehiko@chromium.org> Reviewed-by: Yusuke Sato <yusukes@chromium.org> Cr-Commit-Position: refs/heads/master@{#516681} [modify] https://crrev.com/53c36fda37d3c5bca4bb9e245c76e3a36e7a8309/components/arc/arc_session.cc
,
Nov 15 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/989186de37557beaec8b44afd45041afe629b648 commit 989186de37557beaec8b44afd45041afe629b648 Author: Hidehiko Abe <hidehiko@chromium.org> Date: Wed Nov 15 18:44:16 2017 Extract ArcSessionImpl to a dedicated file. BUG= 739118 TEST=Ran build. Change-Id: Id772120672f733e3686471373165688bc6333713 Reviewed-on: https://chromium-review.googlesource.com/771386 Reviewed-by: Yusuke Sato <yusukes@chromium.org> Commit-Queue: Hidehiko Abe <hidehiko@chromium.org> Cr-Commit-Position: refs/heads/master@{#516762} [modify] https://crrev.com/989186de37557beaec8b44afd45041afe629b648/components/arc/BUILD.gn [modify] https://crrev.com/989186de37557beaec8b44afd45041afe629b648/components/arc/arc_session.cc [add] https://crrev.com/989186de37557beaec8b44afd45041afe629b648/components/arc/arc_session_impl.cc [add] https://crrev.com/989186de37557beaec8b44afd45041afe629b648/components/arc/arc_session_impl.h
,
Nov 15 2017
,
Nov 15 2017
,
Nov 21 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/76f718c77398175a9ff9a47212ae7fc5b3b77ba7 commit 76f718c77398175a9ff9a47212ae7fc5b3b77ba7 Author: Hidehiko Abe <hidehiko@chromium.org> Date: Tue Nov 21 17:51:14 2017 Add unittests for ArcSessionImpl. BUG= 739118 TEST=Ran bots. Change-Id: Ic4c81c914974b8d860cc65bcbc6e5cc67695f3fe Reviewed-on: https://chromium-review.googlesource.com/768618 Reviewed-by: Luis Hector Chavez <lhchavez@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> Reviewed-by: Yusuke Sato <yusukes@chromium.org> Commit-Queue: Hidehiko Abe <hidehiko@chromium.org> Cr-Commit-Position: refs/heads/master@{#518299} [modify] https://crrev.com/76f718c77398175a9ff9a47212ae7fc5b3b77ba7/chromeos/dbus/fake_session_manager_client.cc [modify] https://crrev.com/76f718c77398175a9ff9a47212ae7fc5b3b77ba7/chromeos/dbus/fake_session_manager_client.h [modify] https://crrev.com/76f718c77398175a9ff9a47212ae7fc5b3b77ba7/components/arc/BUILD.gn [modify] https://crrev.com/76f718c77398175a9ff9a47212ae7fc5b3b77ba7/components/arc/arc_session_impl.cc [modify] https://crrev.com/76f718c77398175a9ff9a47212ae7fc5b3b77ba7/components/arc/arc_session_impl.h [add] https://crrev.com/76f718c77398175a9ff9a47212ae7fc5b3b77ba7/components/arc/arc_session_impl_unittest.cc [add] https://crrev.com/76f718c77398175a9ff9a47212ae7fc5b3b77ba7/components/arc/test/fake_arc_bridge_host.cc [add] https://crrev.com/76f718c77398175a9ff9a47212ae7fc5b3b77ba7/components/arc/test/fake_arc_bridge_host.h
,
Nov 22 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by yusukes@chromium.org
, Jul 4 2017