Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: tools/battor_agent/battor_agent_unittest.cc

Issue 2622003005: [BattOr] Initialize BattOr before getting firmware git hash. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« tools/battor_agent/battor_agent.cc ('K') | « tools/battor_agent/battor_agent.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/battor_agent/battor_agent_unittest.cc
diff --git a/tools/battor_agent/battor_agent_unittest.cc b/tools/battor_agent/battor_agent_unittest.cc
index 291c109c9ae016f7a3620e3bedbf1678cca3e631..611f809dc893612485c05f17f43161ca226a1dd1 100644
--- a/tools/battor_agent/battor_agent_unittest.cc
+++ b/tools/battor_agent/battor_agent_unittest.cc
@@ -301,6 +301,15 @@ class BattOrAgentTest : public testing::Test, public BattOrAgent::Listener {
return;
OnBytesSent(true);
+ if (end_state == BattOrAgentState::INIT_SENT)
+ return;
+
+ OnMessageRead(true, BATTOR_MESSAGE_TYPE_CONTROL_ACK,
+ ToCharVector(kInitAck));
+ if (end_state == BattOrAgentState::INIT_ACKED)
+ return;
+
+ OnBytesSent(true);
if (end_state == BattOrAgentState::GIT_FIRMWARE_HASH_REQUEST_SENT)
return;
« tools/battor_agent/battor_agent.cc ('K') | « tools/battor_agent/battor_agent.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698