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

Side by Side Diff: chrome/browser/extensions/extension_prefs_unittest.cc

Issue 2083363002: Remove calls to deprecated MessageLoop methods in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extensions/extension_prefs_unittest.h" 5 #include "chrome/browser/extensions/extension_prefs_unittest.h"
6 6
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/run_loop.h"
9 #include "base/stl_util.h" 10 #include "base/stl_util.h"
10 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
11 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
12 #include "base/time/time.h" 13 #include "base/time/time.h"
13 #include "base/values.h" 14 #include "base/values.h"
14 #include "chrome/common/chrome_paths.h" 15 #include "chrome/common/chrome_paths.h"
15 #include "components/pref_registry/pref_registry_syncable.h" 16 #include "components/pref_registry/pref_registry_syncable.h"
16 #include "components/prefs/mock_pref_change_callback.h" 17 #include "components/prefs/mock_pref_change_callback.h"
17 #include "components/prefs/pref_change_registrar.h" 18 #include "components/prefs/pref_change_registrar.h"
18 #include "components/prefs/scoped_user_pref_update.h" 19 #include "components/prefs/scoped_user_pref_update.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 60
60 void ExtensionPrefsTest::TearDown() { 61 void ExtensionPrefsTest::TearDown() {
61 Verify(); 62 Verify();
62 63
63 // Reset ExtensionPrefs, and re-verify. 64 // Reset ExtensionPrefs, and re-verify.
64 prefs_.ResetPrefRegistry(); 65 prefs_.ResetPrefRegistry();
65 RegisterPreferences(prefs_.pref_registry().get()); 66 RegisterPreferences(prefs_.pref_registry().get());
66 prefs_.RecreateExtensionPrefs(); 67 prefs_.RecreateExtensionPrefs();
67 Verify(); 68 Verify();
68 prefs_.pref_service()->CommitPendingWrite(); 69 prefs_.pref_service()->CommitPendingWrite();
69 message_loop_.RunUntilIdle(); 70 base::RunLoop().RunUntilIdle();
70 } 71 }
71 72
72 // Tests the LastPingDay/SetLastPingDay functions. 73 // Tests the LastPingDay/SetLastPingDay functions.
73 class ExtensionPrefsLastPingDay : public ExtensionPrefsTest { 74 class ExtensionPrefsLastPingDay : public ExtensionPrefsTest {
74 public: 75 public:
75 ExtensionPrefsLastPingDay() 76 ExtensionPrefsLastPingDay()
76 : extension_time_(Time::Now() - TimeDelta::FromHours(4)), 77 : extension_time_(Time::Now() - TimeDelta::FromHours(4)),
77 blacklist_time_(Time::Now() - TimeDelta::FromHours(2)) {} 78 blacklist_time_(Time::Now() - TimeDelta::FromHours(2)) {}
78 79
79 void Initialize() override { 80 void Initialize() override {
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 990
990 private: 991 private:
991 std::unique_ptr<const PermissionSet> active_perms_; 992 std::unique_ptr<const PermissionSet> active_perms_;
992 scoped_refptr<Extension> component_extension_; 993 scoped_refptr<Extension> component_extension_;
993 scoped_refptr<Extension> no_component_extension_; 994 scoped_refptr<Extension> no_component_extension_;
994 }; 995 };
995 TEST_F(ExtensionPrefsComponentExtension, ExtensionPrefsComponentExtension) { 996 TEST_F(ExtensionPrefsComponentExtension, ExtensionPrefsComponentExtension) {
996 } 997 }
997 998
998 } // namespace extensions 999 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698