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

Unified Diff: device/hid/hid_connection_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/devices_app/devices_app.cc ('k') | device/test/test_device_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/hid/hid_connection_unittest.cc
diff --git a/device/hid/hid_connection_unittest.cc b/device/hid/hid_connection_unittest.cc
index b0361982a15391643f09eac22ac9af95a7a8b221..c77d7d320eb4000b2ff0b8ace1945928952de42f 100644
--- a/device/hid/hid_connection_unittest.cc
+++ b/device/hid/hid_connection_unittest.cc
@@ -14,6 +14,7 @@
#include "base/test/test_io_thread.h"
#include "device/hid/hid_connection.h"
#include "device/hid/hid_service.h"
+#include "device/test/test_device_client.h"
#include "device/test/usb_test_gadget.h"
#include "device/usb/usb_device.h"
#include "net/base/io_buffer.h"
@@ -150,6 +151,7 @@ class HidConnectionTest : public testing::Test {
message_loop_.reset(new base::MessageLoopForUI());
io_thread_.reset(new base::TestIOThread(base::TestIOThread::kAutoStart));
+ device_client_.reset(new TestDeviceClient(io_thread_->task_runner()));
service_ = HidService::GetInstance(io_thread_->task_runner());
ASSERT_TRUE(service_);
@@ -166,6 +168,7 @@ class HidConnectionTest : public testing::Test {
scoped_ptr<base::MessageLoopForUI> message_loop_;
scoped_ptr<base::TestIOThread> io_thread_;
+ scoped_ptr<TestDeviceClient> device_client_;
HidService* service_;
scoped_ptr<UsbTestGadget> test_gadget_;
HidDeviceId device_id_;
« no previous file with comments | « device/devices_app/devices_app.cc ('k') | device/test/test_device_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698