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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/macros.h" |
6 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
7 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
8 #include "base/strings/string_piece.h" | 11 #include "base/strings/string_piece.h" |
9 #include "device/serial/buffer.h" | 12 #include "device/serial/buffer.h" |
10 #include "device/serial/data_receiver.h" | 13 #include "device/serial/data_receiver.h" |
11 #include "device/serial/data_source_sender.h" | 14 #include "device/serial/data_source_sender.h" |
12 #include "device/serial/data_stream.mojom.h" | 15 #include "device/serial/data_stream.mojom.h" |
13 #include "mojo/public/cpp/bindings/interface_ptr.h" | 16 #include "mojo/public/cpp/bindings/interface_ptr.h" |
14 #include "mojo/public/cpp/environment/async_waiter.h" | 17 #include "mojo/public/cpp/environment/async_waiter.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 // Test that the receiver shutting down is correctly reported to the source. | 252 // Test that the receiver shutting down is correctly reported to the source. |
250 TEST_F(DataSourceTest, ReceiverShutdown) { | 253 TEST_F(DataSourceTest, ReceiverShutdown) { |
251 Receive(); | 254 Receive(); |
252 receiver_ = NULL; | 255 receiver_ = NULL; |
253 EXPECT_EQ(kFatalError, error_); | 256 EXPECT_EQ(kFatalError, error_); |
254 WaitForEvent(EVENT_ERROR); | 257 WaitForEvent(EVENT_ERROR); |
255 EXPECT_TRUE(seen_connection_error_); | 258 EXPECT_TRUE(seen_connection_error_); |
256 } | 259 } |
257 | 260 |
258 } // namespace device | 261 } // namespace device |
OLD | NEW |