| 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 "chrome/browser/prefs/pref_hash_calculator.h" | 5 #include "chrome/browser/prefs/tracked/pref_hash_calculator.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 13 |
| 14 TEST(PrefHashCalculatorTest, TestCurrentAlgorithm) { | 14 TEST(PrefHashCalculatorTest, TestCurrentAlgorithm) { |
| 15 base::StringValue string_value_1("string value 1"); | 15 base::StringValue string_value_1("string value 1"); |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 static const char kExpectedValue[] = | 197 static const char kExpectedValue[] = |
| 198 "845EF34663FF8D32BE6707F40258FBA531C2BFC532E3B014AFB3476115C2A9DE"; | 198 "845EF34663FF8D32BE6707F40258FBA531C2BFC532E3B014AFB3476115C2A9DE"; |
| 199 | 199 |
| 200 base::ListValue startup_urls; | 200 base::ListValue startup_urls; |
| 201 startup_urls.Set(0, new base::StringValue("http://www.chromium.org/")); | 201 startup_urls.Set(0, new base::StringValue("http://www.chromium.org/")); |
| 202 | 202 |
| 203 EXPECT_EQ(PrefHashCalculator::VALID_SECURE_LEGACY, | 203 EXPECT_EQ(PrefHashCalculator::VALID_SECURE_LEGACY, |
| 204 PrefHashCalculator(std::string(kSeed, arraysize(kSeed)), kDeviceId). | 204 PrefHashCalculator(std::string(kSeed, arraysize(kSeed)), kDeviceId). |
| 205 Validate("session.startup_urls", &startup_urls, kExpectedValue)); | 205 Validate("session.startup_urls", &startup_urls, kExpectedValue)); |
| 206 } | 206 } |
| OLD | NEW |