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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc

Issue 10700100: Remove debug logging for SafeBrowsingServiceTest.StartAndStop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
index 1c858a12d2499bbb6e88572cf1dc27bbfd58e033..066c9e99c945833bdac9d25546ea65f92760af82 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
@@ -399,13 +399,10 @@ class SafeBrowsingServiceTest : public InProcessBrowserTest {
void CreateCSDService() {
safe_browsing::ClientSideDetectionService* csd_service =
safe_browsing::ClientSideDetectionService::Create(NULL);
- LOG(INFO) << "CSDS created";
SafeBrowsingService* sb_service =
g_browser_process->safe_browsing_service();
sb_service->csd_service_.reset(csd_service);
- LOG(INFO) << "refreshing..";
sb_service->RefreshState();
- LOG(INFO) << "refreshed";
}
protected:
@@ -421,11 +418,9 @@ class SafeBrowsingServiceTest : public InProcessBrowserTest {
// Waits for pending tasks on the IO thread to complete. This is useful
// to wait for the SafeBrowsingService to finish loading/stopping.
void WaitForIOThread() {
- LOG(INFO) << "waiting for io thread";
scoped_refptr<base::ThreadTestHelper> io_helper(new base::ThreadTestHelper(
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
ASSERT_TRUE(io_helper->Run());
- LOG(INFO) << "done waiting";
}
private:
@@ -719,19 +714,16 @@ IN_PROC_BROWSER_TEST_F(SafeBrowsingServiceTest, CheckDownloadHashTimedOut) {
}
IN_PROC_BROWSER_TEST_F(SafeBrowsingServiceTest, StartAndStop) {
- LOG(INFO) << __FUNCTION__;
CreateCSDService();
SafeBrowsingService* sb_service = g_browser_process->safe_browsing_service();
safe_browsing::ClientSideDetectionService* csd_service =
sb_service->safe_browsing_detection_service();
- LOG(INFO) << "get prefs";
PrefService* pref_service = browser()->profile()->GetPrefs();
ASSERT_TRUE(sb_service != NULL);
ASSERT_TRUE(csd_service != NULL);
ASSERT_TRUE(pref_service != NULL);
- LOG(INFO) << "checking pref";
EXPECT_TRUE(pref_service->GetBoolean(prefs::kSafeBrowsingEnabled));
// SBS might still be starting, make sure this doesn't flake.
@@ -740,51 +732,41 @@ IN_PROC_BROWSER_TEST_F(SafeBrowsingServiceTest, StartAndStop) {
EXPECT_TRUE(csd_service->enabled());
// Add a new Profile. SBS should keep running.
- LOG(INFO) << "creating ScopedTempDir";
ASSERT_TRUE(temp_profile_dir_.CreateUniqueTempDir());
- LOG(INFO) << "created " << temp_profile_dir_.path().LossyDisplayName();
- LOG(INFO) << "creating profile2";
scoped_ptr<Profile> profile2(Profile::CreateProfile(
temp_profile_dir_.path(), NULL, Profile::CREATE_MODE_SYNCHRONOUS));
ASSERT_TRUE(profile2.get() != NULL);
- LOG(INFO) << "get prefs2";
PrefService* pref_service2 = profile2->GetPrefs();
- LOG(INFO) << "checking pref2";
EXPECT_TRUE(pref_service2->GetBoolean(prefs::kSafeBrowsingEnabled));
// We don't expect the state to have changed, but if it did, wait for it.
WaitForIOThread();
EXPECT_TRUE(sb_service->enabled());
EXPECT_TRUE(csd_service->enabled());
- LOG(INFO) << "setting pref";
// Change one of the prefs. SBS should keep running.
pref_service->SetBoolean(prefs::kSafeBrowsingEnabled, false);
WaitForIOThread();
EXPECT_TRUE(sb_service->enabled());
EXPECT_TRUE(csd_service->enabled());
- LOG(INFO) << "setting pref2";
// Change the other pref. SBS should stop now.
pref_service2->SetBoolean(prefs::kSafeBrowsingEnabled, false);
WaitForIOThread();
EXPECT_FALSE(sb_service->enabled());
EXPECT_FALSE(csd_service->enabled());
- LOG(INFO) << "setting pref2";
// Turn it back on. SBS comes back.
pref_service2->SetBoolean(prefs::kSafeBrowsingEnabled, true);
WaitForIOThread();
EXPECT_TRUE(sb_service->enabled());
EXPECT_TRUE(csd_service->enabled());
- LOG(INFO) << "deleting profile2";
// Delete the Profile. SBS stops again.
pref_service2 = NULL;
profile2.reset();
WaitForIOThread();
EXPECT_FALSE(sb_service->enabled());
EXPECT_FALSE(csd_service->enabled());
- LOG(INFO) << __FUNCTION__ << " done";
}
} // namespace
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698