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

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

Issue 597423002: Device info datatype should be moved to components/sync_driver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor CR feedback addressed. Created 6 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 <string> 5 #include <string>
6 6
7 #include "base/guid.h" 7 #include "base/guid.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/browser/extensions/api/signed_in_devices/id_mapping_helper.h" 11 #include "chrome/browser/extensions/api/signed_in_devices/id_mapping_helper.h"
12 #include "chrome/browser/sync/glue/device_info.h" 12 #include "components/sync_driver/device_info.h"
13 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gmock/include/gmock/gmock.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 using browser_sync::DeviceInfo; 16 using sync_driver::DeviceInfo;
17 17
18 namespace extensions { 18 namespace extensions {
19 bool VerifyDictionary( 19 bool VerifyDictionary(
20 const std::string& path, 20 const std::string& path,
21 const std::string& expected_value, 21 const std::string& expected_value,
22 const base::DictionaryValue& dictionary) { 22 const base::DictionaryValue& dictionary) {
23 std::string out; 23 std::string out;
24 if (dictionary.GetString(path, &out)) { 24 if (dictionary.GetString(path, &out)) {
25 return (out == expected_value); 25 return (out == expected_value);
26 } 26 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 EXPECT_NE(public_id3, public_id2); 78 EXPECT_NE(public_id3, public_id2);
79 79
80 // Verify the dictionary. 80 // Verify the dictionary.
81 EXPECT_TRUE(VerifyDictionary(public_id1, devices[0]->guid(), dictionary)); 81 EXPECT_TRUE(VerifyDictionary(public_id1, devices[0]->guid(), dictionary));
82 EXPECT_TRUE(VerifyDictionary(public_id2, devices[1]->guid(), dictionary)); 82 EXPECT_TRUE(VerifyDictionary(public_id2, devices[1]->guid(), dictionary));
83 EXPECT_TRUE(VerifyDictionary(public_id3, devices[2]->guid(), dictionary)); 83 EXPECT_TRUE(VerifyDictionary(public_id3, devices[2]->guid(), dictionary));
84 84
85 EXPECT_EQ(dictionary.size(), 3U); 85 EXPECT_EQ(dictionary.size(), 3U);
86 } 86 }
87 } // namespace extensions 87 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698