| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/segregated_pref_store.h" | 5 #include "components/user_prefs/tracked/segregated_pref_store.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 base::MakeUnique<base::StringValue>(kValue2), | 287 base::MakeUnique<base::StringValue>(kValue2), |
| 288 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); | 288 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); |
| 289 selected_store_->SetValue(kSharedPref, | 289 selected_store_->SetValue(kSharedPref, |
| 290 base::MakeUnique<base::StringValue>(kValue1), | 290 base::MakeUnique<base::StringValue>(kValue1), |
| 291 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); | 291 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); |
| 292 | 292 |
| 293 auto values = segregated_store_->GetValues(); | 293 auto values = segregated_store_->GetValues(); |
| 294 const base::Value* value = nullptr; | 294 const base::Value* value = nullptr; |
| 295 // Check that a selected preference is returned. | 295 // Check that a selected preference is returned. |
| 296 ASSERT_TRUE(values->Get(kSelectedPref, &value)); | 296 ASSERT_TRUE(values->Get(kSelectedPref, &value)); |
| 297 EXPECT_TRUE(base::FundamentalValue(kValue1).Equals(value)); | 297 EXPECT_TRUE(base::Value(kValue1).Equals(value)); |
| 298 | 298 |
| 299 // Check that a a default preference is returned. | 299 // Check that a a default preference is returned. |
| 300 ASSERT_TRUE(values->Get(kUnselectedPref, &value)); | 300 ASSERT_TRUE(values->Get(kUnselectedPref, &value)); |
| 301 EXPECT_TRUE(base::FundamentalValue(kValue2).Equals(value)); | 301 EXPECT_TRUE(base::Value(kValue2).Equals(value)); |
| 302 | 302 |
| 303 // Check that the selected preference is preferred. | 303 // Check that the selected preference is preferred. |
| 304 ASSERT_TRUE(values->Get(kSharedPref, &value)); | 304 ASSERT_TRUE(values->Get(kSharedPref, &value)); |
| 305 EXPECT_TRUE(base::FundamentalValue(kValue1).Equals(value)); | 305 EXPECT_TRUE(base::Value(kValue1).Equals(value)); |
| 306 } | 306 } |
| OLD | NEW |