diff options
author | reillyg <reillyg@chromium.org> | 2015-05-14 09:06:06 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-14 16:06:33 +0000 |
commit | cf9be26f35fa706d770ae59dd6d185aed84edc17 (patch) | |
tree | 158e3cb5bfa62649feb22cd06fcb2624a5b2f7dc /device/usb/mock_usb_device_handle.cc | |
parent | 4e25c85d4ce2a2f507b28b76096e1c8a9b98c491 (diff) | |
download | chromium_src-cf9be26f35fa706d770ae59dd6d185aed84edc17.zip chromium_src-cf9be26f35fa706d770ae59dd6d185aed84edc17.tar.gz chromium_src-cf9be26f35fa706d770ae59dd6d185aed84edc17.tar.bz2 |
Extract //device/usb mocks so that they can be shared.
A number of browser and unit tests use mocks of the UsbService,
UsbDevice and UsbDeviceHandle classes. This change de-duplicates them.
Review URL: https://codereview.chromium.org/1144493003
Cr-Commit-Position: refs/heads/master@{#329856}
Diffstat (limited to 'device/usb/mock_usb_device_handle.cc')
-rw-r--r-- | device/usb/mock_usb_device_handle.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/device/usb/mock_usb_device_handle.cc b/device/usb/mock_usb_device_handle.cc new file mode 100644 index 0000000..61bdf94 --- /dev/null +++ b/device/usb/mock_usb_device_handle.cc @@ -0,0 +1,21 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "device/usb/mock_usb_device_handle.h" + +#include "device/usb/usb_device.h" + +namespace device { + +MockUsbDeviceHandle::MockUsbDeviceHandle(UsbDevice* device) : device_(device) { +} + +scoped_refptr<UsbDevice> MockUsbDeviceHandle::GetDevice() const { + return device_; +} + +MockUsbDeviceHandle::~MockUsbDeviceHandle() { +} + +} // namespace device |