| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 <list> | 5 #include <list> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/message_loop/message_loop.h" |
| 9 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| 10 #include "base/test/test_io_thread.h" | 11 #include "base/test/test_io_thread.h" |
| 11 #include "base/threading/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
| 12 #include "device/base/mock_device_client.h" | 13 #include "device/base/mock_device_client.h" |
| 13 #include "device/hid/hid_connection.h" | 14 #include "device/hid/hid_connection.h" |
| 14 #include "device/hid/hid_device_filter.h" | 15 #include "device/hid/hid_device_filter.h" |
| 15 #include "device/hid/mock_hid_service.h" | 16 #include "device/hid/mock_hid_service.h" |
| 16 #include "device/test/test_device_client.h" | 17 #include "device/test/test_device_client.h" |
| 17 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 U2fApduResponse::CreateFromMessage(std::vector<uint8_t>({0x0, 0x0}))); | 309 U2fApduResponse::CreateFromMessage(std::vector<uint8_t>({0x0, 0x0}))); |
| 309 device->DeviceTransact(U2fApduCommand::CreateVersion(), | 310 device->DeviceTransact(U2fApduCommand::CreateVersion(), |
| 310 base::Bind(&ResponseCallback, &response3)); | 311 base::Bind(&ResponseCallback, &response3)); |
| 311 EXPECT_EQ(U2fHidDevice::State::DEVICE_ERROR, device->state_); | 312 EXPECT_EQ(U2fHidDevice::State::DEVICE_ERROR, device->state_); |
| 312 EXPECT_EQ(nullptr, response1); | 313 EXPECT_EQ(nullptr, response1); |
| 313 EXPECT_EQ(nullptr, response2); | 314 EXPECT_EQ(nullptr, response2); |
| 314 EXPECT_EQ(nullptr, response3); | 315 EXPECT_EQ(nullptr, response3); |
| 315 }; | 316 }; |
| 316 | 317 |
| 317 } // namespace device | 318 } // namespace device |
| OLD | NEW |