| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "device/hid/hid_connection.h" | 5 #include "device/hid/hid_connection.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/bind.h" | 13 #include "base/bind.h" |
| 14 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "base/message_loop/message_loop.h" |
| 15 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
| 16 #include "base/scoped_observer.h" | 17 #include "base/scoped_observer.h" |
| 17 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
| 18 #include "base/test/test_io_thread.h" | 19 #include "base/test/test_io_thread.h" |
| 19 #include "device/hid/hid_service.h" | 20 #include "device/hid/hid_service.h" |
| 20 #include "device/test/test_device_client.h" | 21 #include "device/test/test_device_client.h" |
| 21 #include "device/test/usb_test_gadget.h" | 22 #include "device/test/usb_test_gadget.h" |
| 22 #include "device/usb/usb_device.h" | 23 #include "device/usb/usb_device.h" |
| 23 #include "net/base/io_buffer.h" | 24 #include "net/base/io_buffer.h" |
| 24 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 ASSERT_EQ(0, read_callback.buffer()->data()[0]); | 205 ASSERT_EQ(0, read_callback.buffer()->data()[0]); |
| 205 for (unsigned char j = 1; j < kBufferSize; ++j) { | 206 for (unsigned char j = 1; j < kBufferSize; ++j) { |
| 206 ASSERT_EQ(i + j - 1, read_callback.buffer()->data()[j]); | 207 ASSERT_EQ(i + j - 1, read_callback.buffer()->data()[j]); |
| 207 } | 208 } |
| 208 } | 209 } |
| 209 | 210 |
| 210 conn->Close(); | 211 conn->Close(); |
| 211 } | 212 } |
| 212 | 213 |
| 213 } // namespace device | 214 } // namespace device |
| OLD | NEW |