Introduce AssistantServiceManager::State::STARTING state.
Until now the |AssistantServiceManager::State| enum did not distinguish between the state in which libassistant was started (but not ready yet) and in which it is ready. That distinction is needed to be able to add tests using libassistant, as they have to wait until it is ready. So now there are 4 states: - STOPPED: It has not started/it has been stopped (this is the same as the old STOPPED state). - STARTING: |AssistantServiceManager::Start| has been called and the libassistant |AssistantManager::Start| call has not finished yet (this is the same as the old STARTED state). - STARTED: the libassistant |AssistantManager::Start| call has finished, but libassistant has not signalled it is ready yet (this is the same as the old RUNNING state). - RUNNING: libassistant signalled it is ready (this state is new). As this CL also introduces the first unittests for |AssistantServiceManagerImpl|, it also contains a bunch of fake/dummy classes used for the unittests. This CL increases test coverage in //chromeos/services/assistant from 28% to 41%. Change-Id: If38a6b70e22e6392537b6658e5f39eebf6dd9099 BUG: b/141264108 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1810019 Commit-Queue: Jeroen Dhollander <jeroendh@google.com> Reviewed-by:Xiaohui Chen <xiaohuic@chromium.org> Cr-Commit-Position: refs/heads/master@{#700410}
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment