OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <sstream> | 5 #include <sstream> |
6 | 6 |
7 #include "device/hid/hid_report_descriptor.h" | 7 #include "device/hid/hid_report_descriptor.h" |
8 #include "testing/gmock/include/gmock/gmock.h" | 8 #include "testing/gmock/include/gmock/gmock.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 0x09, 0x42, // Usage (0x42) | 279 0x09, 0x42, // Usage (0x42) |
280 0x91, 0x00, // Output (Dat|Var|Rel|NoWrp|Lin|Prf|NoNull|BitF) | 280 0x91, 0x00, // Output (Dat|Var|Rel|NoWrp|Lin|Prf|NoNull|BitF) |
281 0xC0 // End Collection | 281 0xC0 // End Collection |
282 }; | 282 }; |
283 | 283 |
284 } // namespace | 284 } // namespace |
285 | 285 |
286 class HidReportDescriptorTest : public testing::Test { | 286 class HidReportDescriptorTest : public testing::Test { |
287 | 287 |
288 protected: | 288 protected: |
289 virtual void SetUp() OVERRIDE { descriptor_ = NULL; } | 289 virtual void SetUp() override { descriptor_ = NULL; } |
290 | 290 |
291 virtual void TearDown() OVERRIDE { | 291 virtual void TearDown() override { |
292 if (descriptor_) { | 292 if (descriptor_) { |
293 delete descriptor_; | 293 delete descriptor_; |
294 } | 294 } |
295 } | 295 } |
296 | 296 |
297 public: | 297 public: |
298 void ValidateDetails( | 298 void ValidateDetails( |
299 const std::vector<HidCollectionInfo>& expected_collections, | 299 const std::vector<HidCollectionInfo>& expected_collections, |
300 const bool expected_has_report_id, | 300 const bool expected_has_report_id, |
301 const uint16_t expected_max_input_report_size, | 301 const uint16_t expected_max_input_report_size, |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 expected, expected + ARRAYSIZE_UNSAFE(expected)), | 429 expected, expected + ARRAYSIZE_UNSAFE(expected)), |
430 true, | 430 true, |
431 31, | 431 31, |
432 31, | 432 31, |
433 0, | 433 0, |
434 kLogitechUnifyingReceiver, | 434 kLogitechUnifyingReceiver, |
435 sizeof(kLogitechUnifyingReceiver)); | 435 sizeof(kLogitechUnifyingReceiver)); |
436 } | 436 } |
437 | 437 |
438 } // namespace device | 438 } // namespace device |
OLD | NEW |