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

Side by Side Diff: tools/battor_agent/battor_agent_unittest.cc

Issue 2914173002: Removing file_thread_task_runner parameter from SerialIoHandler (Closed)
Patch Set: removed unused variable Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « tools/battor_agent/battor_agent_bin.cc ('k') | tools/battor_agent/battor_connection_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <memory> 5 #include <memory>
6 6
7 #include "tools/battor_agent/battor_agent.h" 7 #include "tools/battor_agent/battor_agent.h"
8 8
9 #include "base/test/test_simple_task_runner.h" 9 #include "base/test/test_simple_task_runner.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 private: 75 private:
76 DISALLOW_COPY_AND_ASSIGN(MockBattOrConnection); 76 DISALLOW_COPY_AND_ASSIGN(MockBattOrConnection);
77 }; 77 };
78 78
79 } // namespace 79 } // namespace
80 80
81 // TestableBattOrAgent uses a fake BattOrConnection to be testable. 81 // TestableBattOrAgent uses a fake BattOrConnection to be testable.
82 class TestableBattOrAgent : public BattOrAgent { 82 class TestableBattOrAgent : public BattOrAgent {
83 public: 83 public:
84 TestableBattOrAgent(BattOrAgent::Listener* listener) 84 TestableBattOrAgent(BattOrAgent::Listener* listener)
85 : BattOrAgent("/dev/test", listener, nullptr, nullptr) { 85 : BattOrAgent("/dev/test", listener, nullptr) {
86 connection_ = 86 connection_ =
87 std::unique_ptr<BattOrConnection>(new MockBattOrConnection(this)); 87 std::unique_ptr<BattOrConnection>(new MockBattOrConnection(this));
88 } 88 }
89 89
90 MockBattOrConnection* GetConnection() { 90 MockBattOrConnection* GetConnection() {
91 return static_cast<MockBattOrConnection*>(connection_.get()); 91 return static_cast<MockBattOrConnection*>(connection_.get());
92 } 92 }
93 93
94 void OnActionTimeout() override {} 94 void OnActionTimeout() override {}
95 }; 95 };
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 1031
1032 EXPECT_FALSE(IsCommandComplete()); 1032 EXPECT_FALSE(IsCommandComplete());
1033 1033
1034 RunGetFirmwareGitHashTo(BattOrAgentState::READ_GIT_HASH_RECEIVED); 1034 RunGetFirmwareGitHashTo(BattOrAgentState::READ_GIT_HASH_RECEIVED);
1035 1035
1036 EXPECT_TRUE(IsCommandComplete()); 1036 EXPECT_TRUE(IsCommandComplete());
1037 EXPECT_EQ(BATTOR_ERROR_NONE, GetCommandError()); 1037 EXPECT_EQ(BATTOR_ERROR_NONE, GetCommandError());
1038 } 1038 }
1039 1039
1040 } // namespace battor 1040 } // namespace battor
OLDNEW
« no previous file with comments | « tools/battor_agent/battor_agent_bin.cc ('k') | tools/battor_agent/battor_connection_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698