OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chrome/browser/extensions/api/signed_in_devices/id_mapping_helper.h" |
| 6 |
| 7 #include <memory> |
5 #include <string> | 8 #include <string> |
6 | 9 |
7 #include "base/guid.h" | 10 #include "base/guid.h" |
8 #include "base/memory/scoped_ptr.h" | |
9 #include "base/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
10 #include "base/values.h" | 12 #include "base/values.h" |
11 #include "chrome/browser/extensions/api/signed_in_devices/id_mapping_helper.h" | |
12 #include "components/sync_driver/device_info.h" | 13 #include "components/sync_driver/device_info.h" |
13 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
15 | 16 |
16 using sync_driver::DeviceInfo; | 17 using sync_driver::DeviceInfo; |
17 | 18 |
18 namespace extensions { | 19 namespace extensions { |
19 bool VerifyDictionary( | 20 bool VerifyDictionary( |
20 const std::string& path, | 21 const std::string& path, |
21 const std::string& expected_value, | 22 const std::string& expected_value, |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 EXPECT_NE(public_id3, public_id2); | 79 EXPECT_NE(public_id3, public_id2); |
79 | 80 |
80 // Verify the dictionary. | 81 // Verify the dictionary. |
81 EXPECT_TRUE(VerifyDictionary(public_id1, devices[0]->guid(), dictionary)); | 82 EXPECT_TRUE(VerifyDictionary(public_id1, devices[0]->guid(), dictionary)); |
82 EXPECT_TRUE(VerifyDictionary(public_id2, devices[1]->guid(), dictionary)); | 83 EXPECT_TRUE(VerifyDictionary(public_id2, devices[1]->guid(), dictionary)); |
83 EXPECT_TRUE(VerifyDictionary(public_id3, devices[2]->guid(), dictionary)); | 84 EXPECT_TRUE(VerifyDictionary(public_id3, devices[2]->guid(), dictionary)); |
84 | 85 |
85 EXPECT_EQ(dictionary.size(), 3U); | 86 EXPECT_EQ(dictionary.size(), 3U); |
86 } | 87 } |
87 } // namespace extensions | 88 } // namespace extensions |
OLD | NEW |