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/macros.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/prefs/testing_pref_service.h" | 13 #include "components/prefs/testing_pref_service.h" |
14 #include "components/proximity_auth/proximity_auth_pref_names.h" | 14 #include "components/proximity_auth/proximity_auth_pref_names.h" |
15 #include "testing/gmock/include/gmock/gmock.h" | 15 #include "testing/gmock/include/gmock/gmock.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
18 namespace proximity_auth { | 18 namespace proximity_auth { |
19 namespace { | 19 namespace { |
20 | 20 |
21 const char kBluetoothAddress1[] = "11:22:33:44:55:66"; | 21 const char kBluetoothAddress1[] = "11:22:33:44:55:66"; |
22 const char kPublicKey1[] = "public key 1"; | 22 const char kPublicKey1[] = "public key 1"; |
23 | 23 |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 // 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 |
151 // insertion, so directly comparing vectors would not work. | 151 // insertion, so directly comparing vectors would not work. |
152 EXPECT_TRUE(public_keys.size() == 2); | 152 EXPECT_TRUE(public_keys.size() == 2); |
153 EXPECT_TRUE(std::find(public_keys.begin(), public_keys.end(), kPublicKey1) != | 153 EXPECT_TRUE(std::find(public_keys.begin(), public_keys.end(), kPublicKey1) != |
154 public_keys.end()); | 154 public_keys.end()); |
155 EXPECT_TRUE(std::find(public_keys.begin(), public_keys.end(), kPublicKey2) != | 155 EXPECT_TRUE(std::find(public_keys.begin(), public_keys.end(), kPublicKey2) != |
156 public_keys.end()); | 156 public_keys.end()); |
157 } | 157 } |
158 | 158 |
159 } // namespace proximity_auth | 159 } // namespace proximity_auth |
OLD | NEW |