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

Unified Diff: chrome/browser/extensions/extension_updater_unittest.cc

Issue 345023: Get rid of MessageLoop* caching in extensions code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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
« no previous file with comments | « chrome/browser/extensions/extension_updater.cc ('k') | chrome/browser/extensions/extensions_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_updater_unittest.cc
===================================================================
--- chrome/browser/extensions/extension_updater_unittest.cc (revision 30521)
+++ chrome/browser/extensions/extension_updater_unittest.cc (working copy)
@@ -252,7 +252,7 @@
URLFetcher::set_factory(&factory);
ScopedTempPrefService prefs;
scoped_refptr<ExtensionUpdater> updater =
- new ExtensionUpdater(&service, prefs.get(), 60*60*24, NULL, NULL);
+ new ExtensionUpdater(&service, prefs.get(), 60*60*24);
updater->Start();
// Tell the update that it's time to do update checks.
@@ -298,7 +298,7 @@
URLFetcher::set_factory(&factory);
ScopedTempPrefService prefs;
scoped_refptr<ExtensionUpdater> updater =
- new ExtensionUpdater(&service, prefs.get(), 60*60*24, NULL, NULL);
+ new ExtensionUpdater(&service, prefs.get(), 60*60*24);
updater->Start();
// Tell the updater that it's time to do update checks.
@@ -341,8 +341,7 @@
MessageLoop message_loop;
ScopedTempPrefService prefs;
scoped_refptr<ExtensionUpdater> updater =
- new ExtensionUpdater(&service, prefs.get(), kUpdateFrequencySecs,
- NULL, NULL);
+ new ExtensionUpdater(&service, prefs.get(), kUpdateFrequencySecs);
// Check passing an empty list of parse results to DetermineUpdates
std::vector<UpdateManifest::Result> updates;
@@ -366,6 +365,7 @@
static void TestMultipleManifestDownloading() {
MessageLoop ui_loop;
+ ChromeThread ui_thread(ChromeThread::UI, &ui_loop);
ChromeThread file_thread(ChromeThread::FILE);
file_thread.Start();
ChromeThread io_thread(ChromeThread::IO);
@@ -377,9 +377,7 @@
ServiceForDownloadTests service;
ScopedTempPrefService prefs;
scoped_refptr<ExtensionUpdater> updater =
- new ExtensionUpdater(&service, prefs.get(), kUpdateFrequencySecs,
- file_thread.message_loop(),
- io_thread.message_loop());
+ new ExtensionUpdater(&service, prefs.get(), kUpdateFrequencySecs);
GURL url1("http://localhost/manifest1");
GURL url2("http://localhost/manifest2");
@@ -427,6 +425,7 @@
static void TestSingleExtensionDownloading() {
MessageLoop ui_loop;
+ ChromeThread ui_thread(ChromeThread::UI, &ui_loop);
ChromeThread file_thread(ChromeThread::FILE);
file_thread.Start();
ChromeThread io_thread(ChromeThread::IO);
@@ -438,8 +437,7 @@
ServiceForDownloadTests service;
ScopedTempPrefService prefs;
scoped_refptr<ExtensionUpdater> updater =
- new ExtensionUpdater(&service, prefs.get(), kUpdateFrequencySecs,
- file_thread.message_loop(), NULL);
+ new ExtensionUpdater(&service, prefs.get(), kUpdateFrequencySecs);
GURL test_url("http://localhost/extension.crx");
@@ -476,6 +474,7 @@
static void TestBlacklistDownloading() {
MessageLoop message_loop;
+ ChromeThread ui_thread(ChromeThread::UI, &message_loop);
ChromeThread io_thread(ChromeThread::IO);
io_thread.Start();
@@ -485,8 +484,7 @@
ServiceForBlacklistTests service;
ScopedTempPrefService prefs;
scoped_refptr<ExtensionUpdater> updater =
- new ExtensionUpdater(&service, prefs.get(), kUpdateFrequencySecs,
- NULL, NULL);
+ new ExtensionUpdater(&service, prefs.get(), kUpdateFrequencySecs);
prefs.get()->
RegisterStringPref(prefs::kExtensionBlacklistUpdateVersion, L"0");
GURL test_url("http://localhost/extension.crx");
@@ -523,6 +521,8 @@
static void TestMultipleExtensionDownloading() {
MessageLoopForUI message_loop;
+ ChromeThread ui_thread(ChromeThread::UI, &message_loop);
+ ChromeThread file_thread(ChromeThread::FILE, &message_loop);
ChromeThread io_thread(ChromeThread::IO);
io_thread.Start();
@@ -532,8 +532,7 @@
ServiceForDownloadTests service;
ScopedTempPrefService prefs;
scoped_refptr<ExtensionUpdater> updater =
- new ExtensionUpdater(&service, prefs.get(), kUpdateFrequencySecs,
- &message_loop, NULL);
+ new ExtensionUpdater(&service, prefs.get(), kUpdateFrequencySecs);
GURL url1("http://localhost/extension1.crx");
GURL url2("http://localhost/extension2.crx");
« no previous file with comments | « chrome/browser/extensions/extension_updater.cc ('k') | chrome/browser/extensions/extensions_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698