OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stdint.h> |
| 6 |
5 #include <string> | 7 #include <string> |
6 | 8 |
7 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/macros.h" |
8 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
9 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
10 #include "base/strings/string_piece.h" | 13 #include "base/strings/string_piece.h" |
11 #include "device/serial/data_receiver.h" | 14 #include "device/serial/data_receiver.h" |
12 #include "device/serial/data_sender.h" | 15 #include "device/serial/data_sender.h" |
13 #include "device/serial/data_stream.mojom.h" | 16 #include "device/serial/data_stream.mojom.h" |
14 #include "device/serial/serial.mojom.h" | 17 #include "device/serial/serial.mojom.h" |
15 #include "device/serial/serial_connection.h" | 18 #include "device/serial/serial_connection.h" |
16 #include "device/serial/serial_service_impl.h" | 19 #include "device/serial/serial_service_impl.h" |
17 #include "device/serial/test_serial_io_handler.h" | 20 #include "device/serial/test_serial_io_handler.h" |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 WaitForEvent(EVENT_DATA_SENT); | 328 WaitForEvent(EVENT_DATA_SENT); |
326 EXPECT_EQ(serial::SEND_ERROR_NONE, send_error_); | 329 EXPECT_EQ(serial::SEND_ERROR_NONE, send_error_); |
327 EXPECT_EQ(4, bytes_sent_); | 330 EXPECT_EQ(4, bytes_sent_); |
328 ASSERT_NO_FATAL_FAILURE(Receive()); | 331 ASSERT_NO_FATAL_FAILURE(Receive()); |
329 WaitForEvent(EVENT_DATA_RECEIVED); | 332 WaitForEvent(EVENT_DATA_RECEIVED); |
330 EXPECT_EQ("data", data_received_); | 333 EXPECT_EQ("data", data_received_); |
331 EXPECT_EQ(serial::RECEIVE_ERROR_NONE, receive_error_); | 334 EXPECT_EQ(serial::RECEIVE_ERROR_NONE, receive_error_); |
332 } | 335 } |
333 | 336 |
334 } // namespace device | 337 } // namespace device |
OLD | NEW |