| Index: components/usb_service/usb_device_filter_unittest.cc
|
| diff --git a/components/usb_service/usb_device_filter_unittest.cc b/components/usb_service/usb_device_filter_unittest.cc
|
| index a8120682a32ce74aa71086479ec0963094b0a506..c4789ea4b3364e18d8a0b92d1b3b867b75d2877f 100644
|
| --- a/components/usb_service/usb_device_filter_unittest.cc
|
| +++ b/components/usb_service/usb_device_filter_unittest.cc
|
| @@ -237,3 +237,20 @@ TEST_F(UsbFilterTest, MatchInterfaceProtocolNegative) {
|
| filter.SetInterfaceProtocol(0x02);
|
| ASSERT_FALSE(filter.Matches(android_phone_));
|
| }
|
| +
|
| +TEST_F(UsbFilterTest, MatchAnyEmptyListNegative) {
|
| + std::vector<UsbDeviceFilter> filters;
|
| + ASSERT_FALSE(UsbDeviceFilter::MatchesAny(android_phone_, filters));
|
| +}
|
| +
|
| +TEST_F(UsbFilterTest, MatchesAnyVendorId) {
|
| + std::vector<UsbDeviceFilter> filters(1);
|
| + filters.back().SetVendorId(0x18d1);
|
| + ASSERT_TRUE(UsbDeviceFilter::MatchesAny(android_phone_, filters));
|
| +}
|
| +
|
| +TEST_F(UsbFilterTest, MatchesAnyVendorIdNegative) {
|
| + std::vector<UsbDeviceFilter> filters(1);
|
| + filters.back().SetVendorId(0x1d6b);
|
| + ASSERT_FALSE(UsbDeviceFilter::MatchesAny(android_phone_, filters));
|
| +}
|
|
|