Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Side by Side Diff: chrome/browser/extensions/api/signed_in_devices/id_mapping_helper_unittest.cc

Issue 2376123003: [Sync] Move //components/sync to the syncer namespace. (Closed)
Patch Set: Rebase. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "components/sync/device_info/device_info.h" 13 #include "components/sync/device_info/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 syncer::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) {
24 std::string out; 24 std::string out;
25 if (dictionary.GetString(path, &out)) { 25 if (dictionary.GetString(path, &out)) {
26 return (out == expected_value); 26 return (out == expected_value);
27 } 27 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 EXPECT_NE(public_id3, public_id2); 70 EXPECT_NE(public_id3, public_id2);
71 71
72 // Verify the dictionary. 72 // Verify the dictionary.
73 EXPECT_TRUE(VerifyDictionary(public_id1, devices[0]->guid(), dictionary)); 73 EXPECT_TRUE(VerifyDictionary(public_id1, devices[0]->guid(), dictionary));
74 EXPECT_TRUE(VerifyDictionary(public_id2, devices[1]->guid(), dictionary)); 74 EXPECT_TRUE(VerifyDictionary(public_id2, devices[1]->guid(), dictionary));
75 EXPECT_TRUE(VerifyDictionary(public_id3, devices[2]->guid(), dictionary)); 75 EXPECT_TRUE(VerifyDictionary(public_id3, devices[2]->guid(), dictionary));
76 76
77 EXPECT_EQ(dictionary.size(), 3U); 77 EXPECT_EQ(dictionary.size(), 3U);
78 } 78 }
79 } // namespace extensions 79 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698