| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/preferences_manager.h" | 5 #include "chrome/browser/prefs/preferences_manager.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/memory/ptr_util.h" |
| 8 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/values.h" | 11 #include "base/values.h" |
| 11 #include "chrome/browser/prefs/browser_prefs.h" | 12 #include "chrome/browser/prefs/browser_prefs.h" |
| 12 #include "chrome/test/base/testing_browser_process.h" | 13 #include "chrome/test/base/testing_browser_process.h" |
| 13 #include "chrome/test/base/testing_profile.h" | 14 #include "chrome/test/base/testing_profile.h" |
| 14 #include "chrome/test/base/testing_profile_manager.h" | 15 #include "chrome/test/base/testing_profile_manager.h" |
| 15 #include "components/pref_registry/pref_registry_syncable.h" | 16 #include "components/pref_registry/pref_registry_syncable.h" |
| 16 #include "components/prefs/pref_change_registrar.h" | 17 #include "components/prefs/pref_change_registrar.h" |
| 17 #include "components/prefs/pref_service.h" | 18 #include "components/prefs/pref_service.h" |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 std::unique_ptr<base::DictionaryValue> dictionary = | 298 std::unique_ptr<base::DictionaryValue> dictionary = |
| 298 base::MakeUnique<base::DictionaryValue>(); | 299 base::MakeUnique<base::DictionaryValue>(); |
| 299 dictionary->SetInteger(kKey, kNewValue); | 300 dictionary->SetInteger(kKey, kNewValue); |
| 300 SetPreferences(std::move(dictionary)); | 301 SetPreferences(std::move(dictionary)); |
| 301 | 302 |
| 302 EXPECT_FALSE(observer()->on_preferences_changed_called()); | 303 EXPECT_FALSE(observer()->on_preferences_changed_called()); |
| 303 EXPECT_EQ(kNewValue, service()->GetInteger(kKey)); | 304 EXPECT_EQ(kNewValue, service()->GetInteger(kKey)); |
| 304 } | 305 } |
| 305 | 306 |
| 306 } // namespace test | 307 } // namespace test |
| OLD | NEW |