| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <map> | 5 #include <map> |
| 6 #include <queue> | 6 #include <queue> |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 | 352 |
| 353 EXPECT_FALSE(is_device_open()); | 353 EXPECT_FALSE(is_device_open()); |
| 354 } | 354 } |
| 355 | 355 |
| 356 // Test that the information returned via the Device::GetDeviceInfo matches that | 356 // Test that the information returned via the Device::GetDeviceInfo matches that |
| 357 // of the underlying device. | 357 // of the underlying device. |
| 358 TEST_F(USBDeviceImplTest, GetDeviceInfo) { | 358 TEST_F(USBDeviceImplTest, GetDeviceInfo) { |
| 359 DevicePtr device = | 359 DevicePtr device = |
| 360 GetMockDeviceProxy(0x1234, 0x5678, "ACME", "Frobinator", "ABCDEF"); | 360 GetMockDeviceProxy(0x1234, 0x5678, "ACME", "Frobinator", "ABCDEF"); |
| 361 | 361 |
| 362 EXPECT_CALL(mock_device(), GetConfiguration()); | 362 EXPECT_CALL(mock_device(), GetActiveConfiguration()); |
| 363 | 363 |
| 364 base::RunLoop loop; | 364 base::RunLoop loop; |
| 365 device->GetDeviceInfo(base::Bind(&ExpectDeviceInfoAndThen, | 365 device->GetDeviceInfo(base::Bind(&ExpectDeviceInfoAndThen, |
| 366 mock_device().guid(), 0x1234, 0x5678, "ACME", | 366 mock_device().guid(), 0x1234, 0x5678, "ACME", |
| 367 "Frobinator", "ABCDEF", loop.QuitClosure())); | 367 "Frobinator", "ABCDEF", loop.QuitClosure())); |
| 368 loop.Run(); | 368 loop.Run(); |
| 369 | 369 |
| 370 EXPECT_CALL(mock_handle(), Close()); | 370 EXPECT_CALL(mock_handle(), Close()); |
| 371 } | 371 } |
| 372 | 372 |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 0, 4, 8, 0, base::Bind(&ExpectPacketsAndThen, TRANSFER_STATUS_COMPLETED, | 698 0, 4, 8, 0, base::Bind(&ExpectPacketsAndThen, TRANSFER_STATUS_COMPLETED, |
| 699 packets, loop.QuitClosure())); | 699 packets, loop.QuitClosure())); |
| 700 loop.Run(); | 700 loop.Run(); |
| 701 } | 701 } |
| 702 | 702 |
| 703 EXPECT_CALL(mock_handle(), Close()); | 703 EXPECT_CALL(mock_handle(), Close()); |
| 704 } | 704 } |
| 705 | 705 |
| 706 } // namespace usb | 706 } // namespace usb |
| 707 } // namespace device | 707 } // namespace device |
| OLD | NEW |