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

Unified Diff: device/usb/usb_service_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_service_impl.cc ('k') | extensions/browser/api/usb/usb_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/usb_service_unittest.cc
diff --git a/device/usb/usb_service_unittest.cc b/device/usb/usb_service_unittest.cc
index f0e5ae272af14ba101736523e17431c056caac27..1ee013c65fb00994ec595705d5e5697a5c75bc02 100644
--- a/device/usb/usb_service_unittest.cc
+++ b/device/usb/usb_service_unittest.cc
@@ -5,6 +5,7 @@
#include "base/message_loop/message_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"
@@ -19,11 +20,13 @@ class UsbServiceTest : 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:
scoped_ptr<base::MessageLoop> message_loop_;
scoped_ptr<base::TestIOThread> io_thread_;
+ scoped_ptr<TestDeviceClient> device_client_;
};
TEST_F(UsbServiceTest, ClaimGadget) {
« no previous file with comments | « device/usb/usb_service_impl.cc ('k') | extensions/browser/api/usb/usb_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698