OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/proximity_auth/proximity_auth_pref_manager.h" | 5 #include "components/proximity_auth/proximity_auth_pref_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
| 11 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
12 #include "base/prefs/testing_pref_service.h" | 13 #include "base/prefs/testing_pref_service.h" |
13 #include "components/proximity_auth/proximity_auth_pref_names.h" | 14 #include "components/proximity_auth/proximity_auth_pref_names.h" |
14 #include "testing/gmock/include/gmock/gmock.h" | 15 #include "testing/gmock/include/gmock/gmock.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
16 | 17 |
17 namespace proximity_auth { | 18 namespace proximity_auth { |
18 namespace { | 19 namespace { |
19 | 20 |
20 const char kBluetoothAddress1[] = "11:22:33:44:55:66"; | 21 const char kBluetoothAddress1[] = "11:22:33:44:55:66"; |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 // Note: it's not guarantee that the order in |public_key| is the same as | 150 // Note: it's not guarantee that the order in |public_key| is the same as |
150 // insertion, so directly comparing vectors would not work. | 151 // insertion, so directly comparing vectors would not work. |
151 EXPECT_TRUE(public_keys.size() == 2); | 152 EXPECT_TRUE(public_keys.size() == 2); |
152 EXPECT_TRUE(std::find(public_keys.begin(), public_keys.end(), kPublicKey1) != | 153 EXPECT_TRUE(std::find(public_keys.begin(), public_keys.end(), kPublicKey1) != |
153 public_keys.end()); | 154 public_keys.end()); |
154 EXPECT_TRUE(std::find(public_keys.begin(), public_keys.end(), kPublicKey2) != | 155 EXPECT_TRUE(std::find(public_keys.begin(), public_keys.end(), kPublicKey2) != |
155 public_keys.end()); | 156 public_keys.end()); |
156 } | 157 } |
157 | 158 |
158 } // namespace proximity_auth | 159 } // namespace proximity_auth |
OLD | NEW |