Refactor the UpdateChecker to return the parse results.
This allows for loosing the coupling between the update checker and
the Component, since the update checker is not mutating the state of the component directly anymore.
The Component is still needed as input for the UpdateChecker since building an update check
requires component state.
Bug: 848505
Change-Id: I677d25d0fb645f50dba59e74e2a49a7a33811cf9
Reviewed-on: https://chromium-review.googlesource.com/1079637
Reviewed-by: Joshua Pawlicki <[email protected]>
Commit-Queue: Sorin Jianu <[email protected]>
Cr-Commit-Position: refs/heads/master@{#563644}
diff --git a/components/update_client/request_sender_unittest.cc b/components/update_client/request_sender_unittest.cc
index f480cac..6b3dced7 100644
--- a/components/update_client/request_sender_unittest.cc
+++ b/components/update_client/request_sender_unittest.cc
@@ -245,7 +245,7 @@
base::Unretained(this)));
RunThreads();
- EXPECT_EQ(-1, error_);
+ EXPECT_EQ(-10002, error_);
}
// Tests that a CUP request fails if the response is not signed.
@@ -268,7 +268,7 @@
<< post_interceptor_1_->GetRequestsAsString();
EXPECT_STREQ("test", post_interceptor_1_->GetRequestBody(0).c_str());
- EXPECT_EQ(RequestSender::kErrorResponseNotTrusted, error_);
+ EXPECT_EQ(-10000, error_);
EXPECT_TRUE(response_.empty());
}