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

Unified Diff: extensions/browser/api/usb/usb_apitest.cc

Issue 601073002: Move string descriptor getters from UsbDeviceHandle to UsbDevice. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix function order. Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/usb/usb_service_unittest.cc ('k') | extensions/browser/api/usb_private/usb_private_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/usb/usb_apitest.cc
diff --git a/extensions/browser/api/usb/usb_apitest.cc b/extensions/browser/api/usb/usb_apitest.cc
index eea26c57c06f37420864506b3a420ed4b15ce87f..2c0fe9621e7f92ea73ead69f44ee3f5843262aa3 100644
--- a/extensions/browser/api/usb/usb_apitest.cc
+++ b/extensions/browser/api/usb/usb_apitest.cc
@@ -87,13 +87,11 @@ class MockUsbDeviceHandle : public UsbDeviceHandle {
const UsbTransferCallback& callback));
MOCK_METHOD0(ResetDevice, bool());
+ MOCK_METHOD2(GetStringDescriptor, bool(uint8_t, base::string16*));
MOCK_METHOD1(ClaimInterface, bool(const int interface_number));
MOCK_METHOD1(ReleaseInterface, bool(const int interface_number));
MOCK_METHOD2(SetInterfaceAlternateSetting,
bool(const int interface_number, const int alternate_setting));
- MOCK_METHOD1(GetManufacturer, bool(base::string16* manufacturer));
- MOCK_METHOD1(GetProduct, bool(base::string16* product));
- MOCK_METHOD1(GetSerial, bool(base::string16* serial));
virtual scoped_refptr<UsbDevice> GetDevice() const OVERRIDE {
return device_;
@@ -133,6 +131,9 @@ class MockUsbDevice : public UsbDevice {
#endif // OS_CHROMEOS
MOCK_METHOD0(GetConfiguration, const UsbConfigDescriptor&());
+ MOCK_METHOD1(GetManufacturer, bool(base::string16* manufacturer));
+ MOCK_METHOD1(GetProduct, bool(base::string16* product));
+ MOCK_METHOD1(GetSerialNumber, bool(base::string16* serial_number));
private:
MockUsbDeviceHandle* mock_handle_;
« no previous file with comments | « device/usb/usb_service_unittest.cc ('k') | extensions/browser/api/usb_private/usb_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698