OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "components/payments/content/android/utility/fingerprint_parser.h" | 5 #include "components/payments/content/utility/fingerprint_parser.h" |
6 | 6 |
7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 | 8 |
9 namespace payments { | 9 namespace payments { |
10 namespace { | 10 namespace { |
11 | 11 |
12 TEST(FingerprintParserTest, CheckInputSize) { | 12 TEST(FingerprintParserTest, CheckInputSize) { |
13 // To short. | 13 // To short. |
14 EXPECT_TRUE(FingerprintStringToByteArray("00:01:02:03:04:05:06:07:08:09:" | 14 EXPECT_TRUE(FingerprintStringToByteArray("00:01:02:03:04:05:06:07:08:09:" |
15 "A0:A1:A2:A3:A4:A5:A6:A7:A8:A9:" | 15 "A0:A1:A2:A3:A4:A5:A6:A7:A8:A9:" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 "B2:B3:B4:B5:B6:B7:B8:B9:FE:FF"); | 81 "B2:B3:B4:B5:B6:B7:B8:B9:FE:FF"); |
82 std::vector<uint8_t> expect_output = { | 82 std::vector<uint8_t> expect_output = { |
83 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0xA0, | 83 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0xA0, |
84 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xB0, 0xB1, | 84 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xB0, 0xB1, |
85 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xFE, 0xFF}; | 85 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xFE, 0xFF}; |
86 EXPECT_EQ(expect_output, actual_output); | 86 EXPECT_EQ(expect_output, actual_output); |
87 } | 87 } |
88 | 88 |
89 } // namespace | 89 } // namespace |
90 } // namespace payments | 90 } // namespace payments |
OLD | NEW |