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

Unified Diff: device/usb/usb_device_filter_unittest.cc

Issue 1265833005: Get all the UsbConfigDescriptor for the device configuration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use const auto Created 5 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
Index: device/usb/usb_device_filter_unittest.cc
diff --git a/device/usb/usb_device_filter_unittest.cc b/device/usb/usb_device_filter_unittest.cc
index 5ed3db9a04bc175cc2490348516ec4e22ff80b11..f1d501237fe38dcc69e432cd8f3b26f626c4c64b 100644
--- a/device/usb/usb_device_filter_unittest.cc
+++ b/device/usb/usb_device_filter_unittest.cc
@@ -70,7 +70,7 @@ TEST_F(UsbFilterTest, MatchProductIdNegative) {
TEST_F(UsbFilterTest, MatchInterfaceClass) {
UsbDeviceFilter filter;
filter.SetInterfaceClass(0xff);
- EXPECT_CALL(*android_phone_.get(), GetConfiguration())
+ EXPECT_CALL(*android_phone_.get(), GetActiveConfiguration())
.WillOnce(Return(&config_));
ASSERT_TRUE(filter.Matches(android_phone_));
}
@@ -78,7 +78,7 @@ TEST_F(UsbFilterTest, MatchInterfaceClass) {
TEST_F(UsbFilterTest, MatchInterfaceClassNegative) {
UsbDeviceFilter filter;
filter.SetInterfaceClass(0xe0);
- EXPECT_CALL(*android_phone_.get(), GetConfiguration())
+ EXPECT_CALL(*android_phone_.get(), GetActiveConfiguration())
.WillOnce(Return(&config_));
ASSERT_FALSE(filter.Matches(android_phone_));
}
@@ -87,7 +87,7 @@ TEST_F(UsbFilterTest, MatchInterfaceSubclass) {
UsbDeviceFilter filter;
filter.SetInterfaceClass(0xff);
filter.SetInterfaceSubclass(0x42);
- EXPECT_CALL(*android_phone_.get(), GetConfiguration())
+ EXPECT_CALL(*android_phone_.get(), GetActiveConfiguration())
.WillOnce(Return(&config_));
ASSERT_TRUE(filter.Matches(android_phone_));
}
@@ -96,7 +96,7 @@ TEST_F(UsbFilterTest, MatchInterfaceSubclassNegative) {
UsbDeviceFilter filter;
filter.SetInterfaceClass(0xff);
filter.SetInterfaceSubclass(0x01);
- EXPECT_CALL(*android_phone_.get(), GetConfiguration())
+ EXPECT_CALL(*android_phone_.get(), GetActiveConfiguration())
.WillOnce(Return(&config_));
ASSERT_FALSE(filter.Matches(android_phone_));
}
@@ -106,7 +106,7 @@ TEST_F(UsbFilterTest, MatchInterfaceProtocol) {
filter.SetInterfaceClass(0xff);
filter.SetInterfaceSubclass(0x42);
filter.SetInterfaceProtocol(0x01);
- EXPECT_CALL(*android_phone_.get(), GetConfiguration())
+ EXPECT_CALL(*android_phone_.get(), GetActiveConfiguration())
.WillOnce(Return(&config_));
ASSERT_TRUE(filter.Matches(android_phone_));
}
@@ -116,7 +116,7 @@ TEST_F(UsbFilterTest, MatchInterfaceProtocolNegative) {
filter.SetInterfaceClass(0xff);
filter.SetInterfaceSubclass(0x42);
filter.SetInterfaceProtocol(0x02);
- EXPECT_CALL(*android_phone_.get(), GetConfiguration())
+ EXPECT_CALL(*android_phone_.get(), GetActiveConfiguration())
.WillOnce(Return(&config_));
ASSERT_FALSE(filter.Matches(android_phone_));
}

Powered by Google App Engine
This is Rietveld 408576698