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

Unified Diff: device/usb/usb_device_handle_unittest.cc

Issue 1314273002: Manage UsbService lifetime in DeviceClient implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « device/usb/usb_context.cc ('k') | device/usb/usb_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/usb_device_handle_unittest.cc
diff --git a/device/usb/usb_device_handle_unittest.cc b/device/usb/usb_device_handle_unittest.cc
index d8d7a6b69ec266aa2ce6ea47b90f59e14e7a98dc..ea636676bfdc6d88380a8a025fdcf68a9f92a297 100644
--- a/device/usb/usb_device_handle_unittest.cc
+++ b/device/usb/usb_device_handle_unittest.cc
@@ -7,6 +7,7 @@
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/test_io_thread.h"
+#include "device/test/test_device_client.h"
#include "device/test/usb_test_gadget.h"
#include "device/usb/usb_device.h"
#include "device/usb/usb_device_handle.h"
@@ -21,6 +22,7 @@ class UsbDeviceHandleTest : public ::testing::Test {
void SetUp() override {
message_loop_.reset(new base::MessageLoopForUI);
io_thread_.reset(new base::TestIOThread(base::TestIOThread::kAutoStart));
+ device_client_.reset(new TestDeviceClient(io_thread_->task_runner()));
}
protected:
@@ -28,6 +30,7 @@ class UsbDeviceHandleTest : public ::testing::Test {
private:
scoped_ptr<base::MessageLoop> message_loop_;
+ scoped_ptr<TestDeviceClient> device_client_;
};
class TestOpenCallback {
« no previous file with comments | « device/usb/usb_context.cc ('k') | device/usb/usb_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698