Commit 0251c820 authored by Paul Moy's avatar Paul Moy Committed by Commit Bot

scanning: add tests for failure cases of GetNextImage, StartScan

Add new unit tests to cover the cases where the kGetNextImageMethod or
kStartScan D-Bus calls encounter:
* null responses
* responses without valid protos
* responses claiming the scan failed

Bug: b:169573779
Change-Id: I47c19e91229ee7f0e1995b03cdeec28d20cd92ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2518448
Commit-Queue: Paul Moy <pmoy@chromium.org>
Reviewed-by: default avatarJesse Schettler <jschettler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#824509}
parent 4194de03
...@@ -321,7 +321,7 @@ class LorgnetteManagerClientImpl : public LorgnetteManagerClient { ...@@ -321,7 +321,7 @@ class LorgnetteManagerClientImpl : public LorgnetteManagerClient {
GetNextImage(response_proto.scan_uuid()); GetNextImage(response_proto.scan_uuid());
} }
// Callend when a response to a GetNextImage request is received from // Called when a response to a GetNextImage request is received from
// lorgnette. Handles stopping the scan if the request failed. // lorgnette. Handles stopping the scan if the request failed.
void OnGetNextImageResponse(std::string uuid, dbus::Response* response) { void OnGetNextImageResponse(std::string uuid, dbus::Response* response) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment