OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "components/user_prefs/tracked/pref_hash_calculator.h" | 5 #include "services/preferences/tracked/pref_hash_calculator.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 187 |
188 // As in PrefHashCalculatorTest.CatchHashChanges. | 188 // As in PrefHashCalculatorTest.CatchHashChanges. |
189 const base::Value string_value("testing with special chars:\n<>{}:^^@#$\\/"); | 189 const base::Value string_value("testing with special chars:\n<>{}:^^@#$\\/"); |
190 static const char kExpectedValue[] = | 190 static const char kExpectedValue[] = |
191 "05ACCBD3B05C45C36CD06190F63EC577112311929D8380E26E5F13182EB68318"; | 191 "05ACCBD3B05C45C36CD06190F63EC577112311929D8380E26E5F13182EB68318"; |
192 | 192 |
193 EXPECT_EQ(PrefHashCalculator::VALID_SECURE_LEGACY, | 193 EXPECT_EQ(PrefHashCalculator::VALID_SECURE_LEGACY, |
194 PrefHashCalculator(kSeed, kNewDeviceId, kLegacyDeviceId) | 194 PrefHashCalculator(kSeed, kNewDeviceId, kLegacyDeviceId) |
195 .Validate("pref.path", &string_value, kExpectedValue)); | 195 .Validate("pref.path", &string_value, kExpectedValue)); |
196 } | 196 } |
OLD | NEW |