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

Unified Diff: chrome/browser/prefs/pref_hash_store_impl_unittest.cc

Issue 332473002: Make super MAC optional. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/prefs/pref_hash_store_impl_unittest.cc
diff --git a/chrome/browser/prefs/pref_hash_store_impl_unittest.cc b/chrome/browser/prefs/pref_hash_store_impl_unittest.cc
index 139e9e05c3e0a89262a4610f6c11c1376f8c2c8e..44d5cb4ae94ca4a125da0411c131678275eea5c4 100644
--- a/chrome/browser/prefs/pref_hash_store_impl_unittest.cc
+++ b/chrome/browser/prefs/pref_hash_store_impl_unittest.cc
@@ -104,7 +104,7 @@ TEST_F(PrefHashStoreImplTest, AtomicHashStoreAndCheck) {
{
// 32 NULL bytes is the seed that was used to generate the legacy hash.
PrefHashStoreImpl pref_hash_store(
- std::string(32, 0), "device_id", CreateHashStoreContents());
+ std::string(32, 0), "device_id", CreateHashStoreContents(), true);
scoped_ptr<PrefHashStoreTransaction> transaction(
pref_hash_store.BeginTransaction());
@@ -153,7 +153,7 @@ TEST_F(PrefHashStoreImplTest, AtomicHashStoreAndCheck) {
// |pref_hash_store2| should trust its initial hashes dictionary and thus
// trust new unknown values.
PrefHashStoreImpl pref_hash_store2(
- std::string(32, 0), "device_id", CreateHashStoreContents());
+ std::string(32, 0), "device_id", CreateHashStoreContents(), true);
scoped_ptr<PrefHashStoreTransaction> transaction(
pref_hash_store2.BeginTransaction());
EXPECT_EQ(PrefHashStoreTransaction::TRUSTED_UNKNOWN_VALUE,
@@ -177,7 +177,7 @@ TEST_F(PrefHashStoreImplTest, AtomicHashStoreAndCheck) {
// |pref_hash_store3| should no longer trust its initial hashes dictionary
// and thus shouldn't trust non-NULL unknown values.
PrefHashStoreImpl pref_hash_store3(
- std::string(32, 0), "device_id", CreateHashStoreContents());
+ std::string(32, 0), "device_id", CreateHashStoreContents(), true);
scoped_ptr<PrefHashStoreTransaction> transaction(
pref_hash_store3.BeginTransaction());
EXPECT_EQ(PrefHashStoreTransaction::UNTRUSTED_UNKNOWN_VALUE,
@@ -212,7 +212,7 @@ TEST_F(PrefHashStoreImplTest, SplitHashStoreAndCheck) {
{
PrefHashStoreImpl pref_hash_store(
- std::string(32, 0), "device_id", CreateHashStoreContents());
+ std::string(32, 0), "device_id", CreateHashStoreContents(), true);
scoped_ptr<PrefHashStoreTransaction> transaction(
pref_hash_store.BeginTransaction());
@@ -288,7 +288,7 @@ TEST_F(PrefHashStoreImplTest, SplitHashStoreAndCheck) {
// |pref_hash_store2| should trust its initial hashes dictionary and thus
// trust new unknown values.
PrefHashStoreImpl pref_hash_store2(
- std::string(32, 0), "device_id", CreateHashStoreContents());
+ std::string(32, 0), "device_id", CreateHashStoreContents(), true);
scoped_ptr<PrefHashStoreTransaction> transaction(
pref_hash_store2.BeginTransaction());
EXPECT_EQ(PrefHashStoreTransaction::TRUSTED_UNKNOWN_VALUE,
@@ -309,7 +309,7 @@ TEST_F(PrefHashStoreImplTest, SplitHashStoreAndCheck) {
// |pref_hash_store3| should no longer trust its initial hashes dictionary
// and thus shouldn't trust unknown values.
PrefHashStoreImpl pref_hash_store3(
- std::string(32, 0), "device_id", CreateHashStoreContents());
+ std::string(32, 0), "device_id", CreateHashStoreContents(), true);
scoped_ptr<PrefHashStoreTransaction> transaction(
pref_hash_store3.BeginTransaction());
EXPECT_EQ(PrefHashStoreTransaction::UNTRUSTED_UNKNOWN_VALUE,
@@ -331,7 +331,7 @@ TEST_F(PrefHashStoreImplTest, EmptyAndNULLSplitDict) {
{
PrefHashStoreImpl pref_hash_store(
- std::string(32, 0), "device_id", CreateHashStoreContents());
+ std::string(32, 0), "device_id", CreateHashStoreContents(), true);
scoped_ptr<PrefHashStoreTransaction> transaction(
pref_hash_store.BeginTransaction());
@@ -368,7 +368,7 @@ TEST_F(PrefHashStoreImplTest, EmptyAndNULLSplitDict) {
// test ensuring that the internal action of clearing some hashes does
// update the stored hash of hashes).
PrefHashStoreImpl pref_hash_store2(
- std::string(32, 0), "device_id", CreateHashStoreContents());
+ std::string(32, 0), "device_id", CreateHashStoreContents(), true);
scoped_ptr<PrefHashStoreTransaction> transaction(
pref_hash_store2.BeginTransaction());
@@ -399,7 +399,7 @@ TEST_F(PrefHashStoreImplTest, TrustedUnknownSplitValueFromExistingAtomic) {
{
PrefHashStoreImpl pref_hash_store(
- std::string(32, 0), "device_id", CreateHashStoreContents());
+ std::string(32, 0), "device_id", CreateHashStoreContents(), true);
scoped_ptr<PrefHashStoreTransaction> transaction(
pref_hash_store.BeginTransaction());
@@ -411,7 +411,7 @@ TEST_F(PrefHashStoreImplTest, TrustedUnknownSplitValueFromExistingAtomic) {
{
// Load a new |pref_hash_store2| in which the hashes dictionary is trusted.
PrefHashStoreImpl pref_hash_store2(
- std::string(32, 0), "device_id", CreateHashStoreContents());
+ std::string(32, 0), "device_id", CreateHashStoreContents(), true);
scoped_ptr<PrefHashStoreTransaction> transaction(
pref_hash_store2.BeginTransaction());
std::vector<std::string> invalid_keys;

Powered by Google App Engine
This is Rietveld 408576698