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