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

Side by Side Diff: chrome/browser/extensions/api/declarative/rules_registry_with_cache_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 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 | Annotate | Revision Log
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/api/declarative/rules_registry_with_cache.h" 5 #include "chrome/browser/extensions/api/declarative/rules_registry_with_cache.h"
6 6
7 // Here we test the TestRulesRegistry which is the simplest possible 7 // Here we test the TestRulesRegistry which is the simplest possible
8 // implementation of RulesRegistryWithCache as a proxy for 8 // implementation of RulesRegistryWithCache as a proxy for
9 // RulesRegistryWithCache. 9 // RulesRegistryWithCache.
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 67
68 int GetNumberOfRules(const std::string& extension_id) { 68 int GetNumberOfRules(const std::string& extension_id) {
69 std::vector<linked_ptr<extensions::RulesRegistry::Rule> > get_rules; 69 std::vector<linked_ptr<extensions::RulesRegistry::Rule> > get_rules;
70 std::string error = registry_->GetAllRules(extension_id, &get_rules); 70 std::string error = registry_->GetAllRules(extension_id, &get_rules);
71 EXPECT_EQ("", error); 71 EXPECT_EQ("", error);
72 return get_rules.size(); 72 return get_rules.size();
73 } 73 }
74 74
75 protected: 75 protected:
76 MessageLoop message_loop_; 76 base::MessageLoop message_loop_;
77 content::TestBrowserThread ui_thread_; 77 content::TestBrowserThread ui_thread_;
78 content::TestBrowserThread file_thread_; 78 content::TestBrowserThread file_thread_;
79 scoped_refptr<TestRulesRegistry> registry_; 79 scoped_refptr<TestRulesRegistry> registry_;
80 #if defined OS_CHROMEOS 80 #if defined OS_CHROMEOS
81 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; 81 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_;
82 chromeos::ScopedTestCrosSettings test_cros_settings_; 82 chromeos::ScopedTestCrosSettings test_cros_settings_;
83 chromeos::ScopedTestUserManager test_user_manager_; 83 chromeos::ScopedTestUserManager test_user_manager_;
84 #endif 84 #endif
85 }; 85 };
86 86
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 EXPECT_EQ(read_count, store->read_count()); 265 EXPECT_EQ(read_count, store->read_count());
266 read_count = store->read_count(); 266 read_count = store->read_count();
267 267
268 ui_part->SetDeclarativeRulesStored(extension_id, true); 268 ui_part->SetDeclarativeRulesStored(extension_id, true);
269 ui_part->ReadFromStorage(extension_id); 269 ui_part->ReadFromStorage(extension_id);
270 message_loop_.RunUntilIdle(); 270 message_loop_.RunUntilIdle();
271 EXPECT_EQ(read_count + 1, store->read_count()); 271 EXPECT_EQ(read_count + 1, store->read_count());
272 } 272 }
273 273
274 } // namespace extensions 274 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698