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

Unified Diff: device/usb/mojo/device_impl_unittest.cc

Issue 1695643002: Destroy DeviceImpl when the underlying UsbDevice is disconnected. (Closed) Base URL: reillyg-linux.mtv.corp.google.com:/src/chromium/src@mojo_device_autoclose
Patch Set: Revert change to web_usb_device_impl.cc. Created 4 years, 10 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 | « device/usb/mojo/device_impl.cc ('k') | device/usb/usb_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/mojo/device_impl_unittest.cc
diff --git a/device/usb/mojo/device_impl_unittest.cc b/device/usb/mojo/device_impl_unittest.cc
index df23b01f5d49f902a69d15ca823ac5a61f1b4a28..25cc048ed68de423acd018d8f1ba23b21a2090fa 100644
--- a/device/usb/mojo/device_impl_unittest.cc
+++ b/device/usb/mojo/device_impl_unittest.cc
@@ -447,6 +447,15 @@ class USBDeviceImplTest : public testing::Test {
} // namespace
+TEST_F(USBDeviceImplTest, Disconnect) {
+ DevicePtr device = GetMockDeviceProxy();
+
+ base::RunLoop loop;
+ device.set_connection_error_handler(loop.QuitClosure());
+ mock_device().NotifyDeviceRemoved();
+ loop.Run();
+}
+
TEST_F(USBDeviceImplTest, Open) {
DevicePtr device = GetMockDeviceProxy();
« no previous file with comments | « device/usb/mojo/device_impl.cc ('k') | device/usb/usb_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698