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

Side by Side Diff: tools/battor_agent/battor_connection_impl_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_connection_impl.cc ('k') | no next file » | 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 "tools/battor_agent/battor_connection_impl.h" 5 #include "tools/battor_agent/battor_connection_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 10 matching lines...) Expand all
21 void NullReadCallback(int, device::serial::ReceiveError) {} 21 void NullReadCallback(int, device::serial::ReceiveError) {}
22 22
23 } // namespace 23 } // namespace
24 24
25 namespace battor { 25 namespace battor {
26 26
27 // TestableBattOrConnection uses a fake serial connection be testable. 27 // TestableBattOrConnection uses a fake serial connection be testable.
28 class TestableBattOrConnection : public BattOrConnectionImpl { 28 class TestableBattOrConnection : public BattOrConnectionImpl {
29 public: 29 public:
30 TestableBattOrConnection(BattOrConnection::Listener* listener) 30 TestableBattOrConnection(BattOrConnection::Listener* listener)
31 : BattOrConnectionImpl("/dev/test", listener, nullptr, nullptr) {} 31 : BattOrConnectionImpl("/dev/test", listener, nullptr) {}
32 scoped_refptr<device::SerialIoHandler> CreateIoHandler() override { 32 scoped_refptr<device::SerialIoHandler> CreateIoHandler() override {
33 return device::TestSerialIoHandler::Create(); 33 return device::TestSerialIoHandler::Create();
34 } 34 }
35 35
36 scoped_refptr<device::SerialIoHandler> GetIoHandler() { return io_handler_; } 36 scoped_refptr<device::SerialIoHandler> GetIoHandler() { return io_handler_; }
37 }; 37 };
38 38
39 // BattOrConnectionImplTest provides a BattOrConnection and captures the 39 // BattOrConnectionImplTest provides a BattOrConnection and captures the
40 // results of all its commands. 40 // results of all its commands.
41 class BattOrConnectionImplTest : public testing::Test, 41 class BattOrConnectionImplTest : public testing::Test,
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 BATTOR_CONTROL_BYTE_END, 390 BATTOR_CONTROL_BYTE_END,
391 }; 391 };
392 SendBytesRaw(data, 3); 392 SendBytesRaw(data, 3);
393 ReadMessage(BATTOR_MESSAGE_TYPE_PRINT); 393 ReadMessage(BATTOR_MESSAGE_TYPE_PRINT);
394 394
395 ASSERT_TRUE(IsReadComplete()); 395 ASSERT_TRUE(IsReadComplete());
396 ASSERT_FALSE(GetReadSuccess()); 396 ASSERT_FALSE(GetReadSuccess());
397 } 397 }
398 398
399 } // namespace battor 399 } // namespace battor
OLDNEW
« no previous file with comments | « tools/battor_agent/battor_connection_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698