Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: device/devices_app/usb/device_impl_unittest.cc

Issue 1265833005: Get all the UsbConfigDescriptor for the device configuration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use const auto Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698