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

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

Issue 278633003: Extracted UsbDeviceHandle as interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « extensions/browser/api/usb/usb_api.cc ('k') | no next file » | 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 785031768a053688c78cb46d9358eee2b0b74eba..96d00ece88cdd2e407fbc038d3984931eef813df 100644
--- a/extensions/browser/api/usb/usb_apitest.cc
+++ b/extensions/browser/api/usb/usb_apitest.cc
@@ -84,10 +84,21 @@ class MockUsbDeviceHandle : public UsbDeviceHandle {
const UsbTransferCallback& callback));
MOCK_METHOD0(ResetDevice, bool());
+ 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(GetSerial, bool(base::string16* serial));
+
+ virtual scoped_refptr<UsbDevice> GetDevice() const OVERRIDE {
+ return device_;
+ }
void set_device(UsbDevice* device) { device_ = device; }
protected:
+ UsbDevice* device_;
+
virtual ~MockUsbDeviceHandle() {}
};
« no previous file with comments | « extensions/browser/api/usb/usb_api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698