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

Unified Diff: chrome/browser/search_engines/search_provider_install_data_unittest.cc

Issue 287103002: Introduce ability to register callback with GoogleURLTracker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
Index: chrome/browser/search_engines/search_provider_install_data_unittest.cc
diff --git a/chrome/browser/search_engines/search_provider_install_data_unittest.cc b/chrome/browser/search_engines/search_provider_install_data_unittest.cc
index a55425580be38960b97d2a4407ea9631e90c1299..e4f4615e8e244897ea5b5494fc09a82c50e3cd92 100644
--- a/chrome/browser/search_engines/search_provider_install_data_unittest.cc
+++ b/chrome/browser/search_engines/search_provider_install_data_unittest.cc
@@ -242,7 +242,14 @@ TEST_F(SearchProviderInstallDataTest, GoogleBaseUrlChange) {
// Set up the database.
util_.ChangeModelToLoadState();
std::string google_host = "w.com";
- util_.SetGoogleBaseURL(GURL("http://" + google_host + "/"));
+ GURL new_url = GURL("http://" + google_host + "/");
+ util_.SetGoogleBaseURL(new_url);
+ BrowserThread::PostTask(
blundell 2014/05/15 20:58:00 This was the most straightforward way that I could
Peter Kasting 2014/05/15 21:12:52 At least put all this code in a protected helper i
blundell 2014/05/16 09:09:55 Done.
+ BrowserThread::IO,
+ FROM_HERE,
+ base::Bind(&SearchProviderInstallData::OnGoogleURLChange,
+ base::Unretained(install_data_),
+ new_url.spec()));
// Wait for the I/O thread to process the update notification.
base::RunLoop().RunUntilIdle();
@@ -260,7 +267,14 @@ TEST_F(SearchProviderInstallDataTest, GoogleBaseUrlChange) {
// Change the Google base url.
google_host = "foo.com";
- util_.SetGoogleBaseURL(GURL("http://" + google_host + "/"));
+ new_url = GURL("http://" + google_host + "/");
+ util_.SetGoogleBaseURL(new_url);
+ BrowserThread::PostTask(
+ BrowserThread::IO,
+ FROM_HERE,
+ base::Bind(&SearchProviderInstallData::OnGoogleURLChange,
+ base::Unretained(install_data_),
+ new_url.spec()));
// Wait for the I/O thread to process the update notification.
base::RunLoop().RunUntilIdle();

Powered by Google App Engine
This is Rietveld 408576698