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

Side by Side Diff: device/hid/hid_service_unittest.cc

Issue 143883005: HID backend (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hid-impl-base
Patch Set: Really fix tests for lack of testing hardware; adapt to ancient libudev in the cros distro Created 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include <string>
6 #include <vector>
7
8 #include "base/bind.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h"
11 #include "device/hid/hid_connection.h"
12 #include "device/hid/hid_service.h"
13 #include "net/base/io_buffer.h"
14 #include "testing/gtest/include/gtest/gtest.h"
15
16 namespace device {
17
18 TEST(HidServiceTest, Create) {
19 base::MessageLoopForIO message_loop;
20 HidService* service = HidService::GetInstance();
21 ASSERT_TRUE(service);
22
23 std::vector<HidDeviceInfo> devices;
24 service->GetDevices(&devices);
25
26 for (std::vector<HidDeviceInfo>::iterator it = devices.begin();
27 it != devices.end();
28 ++it) {
29 ASSERT_TRUE(!it->device_id.empty());
30 }
31 }
32
33 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698