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 <memory> | 5 #include <memory> |
6 #include <utility> | 6 #include <utility> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
| 13 #include "base/threading/thread_task_runner_handle.h" |
13 #include "device/serial/serial.mojom.h" | 14 #include "device/serial/serial.mojom.h" |
14 #include "device/serial/serial_service_impl.h" | 15 #include "device/serial/serial_service_impl.h" |
15 #include "device/serial/test_serial_io_handler.h" | 16 #include "device/serial/test_serial_io_handler.h" |
16 #include "mojo/public/cpp/bindings/interface_ptr.h" | 17 #include "mojo/public/cpp/bindings/interface_ptr.h" |
17 #include "mojo/public/cpp/bindings/interface_request.h" | 18 #include "mojo/public/cpp/bindings/interface_request.h" |
18 #include "mojo/public/cpp/bindings/strong_binding.h" | 19 #include "mojo/public/cpp/bindings/strong_binding.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
20 | 21 |
21 namespace device { | 22 namespace device { |
22 namespace { | 23 namespace { |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 TEST_F(SerialServiceTest, ConnectInvalidPath) { | 141 TEST_F(SerialServiceTest, ConnectInvalidPath) { |
141 RunConnectTest("invalid_path", false); | 142 RunConnectTest("invalid_path", false); |
142 } | 143 } |
143 | 144 |
144 TEST_F(SerialServiceTest, ConnectOpenFailed) { | 145 TEST_F(SerialServiceTest, ConnectOpenFailed) { |
145 io_handler_ = new FailToOpenIoHandler; | 146 io_handler_ = new FailToOpenIoHandler; |
146 RunConnectTest("device", false); | 147 RunConnectTest("device", false); |
147 } | 148 } |
148 | 149 |
149 } // namespace device | 150 } // namespace device |
OLD | NEW |