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

Unified Diff: device/usb/mock_usb_device.h

Issue 2269993004: Add unit test for UsbChooserController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@modify_UsbDeviceFilter_MatchesAny
Patch Set: address more comment Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/mock_usb_device.h
diff --git a/device/usb/mock_usb_device.h b/device/usb/mock_usb_device.h
index 6c6241a5ad0ca9d04a220eb8ab4a87861cd5d437..a9a6cd0ca6f32fa5234d5e85f8891c5df7784968 100644
--- a/device/usb/mock_usb_device.h
+++ b/device/usb/mock_usb_device.h
@@ -7,11 +7,13 @@
#include <stdint.h>
+#include <memory>
#include <string>
#include <vector>
#include "device/usb/usb_device.h"
#include "device/usb/usb_device_handle.h"
+#include "device/usb/webusb_descriptors.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace device {
@@ -44,6 +46,11 @@ class MockUsbDevice : public UsbDevice {
void AddMockConfig(const UsbConfigDescriptor& config);
+ void set_webusb_allowed_origins(
+ std::unique_ptr<WebUsbAllowedOrigins> webusb_allowed_origins) {
+ webusb_allowed_origins_ = std::move(webusb_allowed_origins);
+ }
+
// Public wrappers around protected functions.
void ActiveConfigurationChanged(int configuration_value);
void NotifyDeviceRemoved();
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698