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

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

Issue 128993004: Fix subtle bug with the in-process utility thread usage in unit tests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 6 years, 11 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/updater/extension_updater_unittest.cc ('k') | content/public/test/test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/download_protection_service_unittest.cc
===================================================================
--- chrome/browser/safe_browsing/download_protection_service_unittest.cc (revision 243741)
+++ chrome/browser/safe_browsing/download_protection_service_unittest.cc (working copy)
@@ -25,9 +25,9 @@
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/safe_browsing/signature_util.h"
#include "chrome/common/safe_browsing/csd.pb.h"
-#include "content/public/browser/render_process_host.h"
#include "content/public/test/mock_download_item.h"
#include "content/public/test/test_browser_thread_bundle.h"
+#include "content/public/test/test_utils.h"
#include "net/cert/x509_certificate.h"
#include "net/http/http_status_code.h"
#include "net/url_request/test_url_fetcher_factory.h"
@@ -157,7 +157,6 @@
content::TestBrowserThreadBundle::IO_MAINLOOP) {
}
virtual void SetUp() {
- content::RenderProcessHost::SetRunRendererInProcess(true);
// Start real threads for the IO and File threads so that the DCHECKs
// to test that we're on the correct thread work.
sb_service_ = new StrictMock<FakeSafeBrowsingService>();
@@ -185,7 +184,6 @@
// tasks currently running.
FlushThreadMessageLoops();
sb_service_ = NULL;
- content::RenderProcessHost::SetRunRendererInProcess(false);
}
bool RequestContainsResource(const ClientDownloadRequest& request,
@@ -318,6 +316,7 @@
DownloadProtectionService::DownloadCheckResult result_;
bool has_result_;
content::TestBrowserThreadBundle test_browser_thread_bundle_;
+ content::InProcessUtilityThreadHelper in_process_utility_thread_helper_;
base::FilePath testdata_path_;
};
« no previous file with comments | « chrome/browser/extensions/updater/extension_updater_unittest.cc ('k') | content/public/test/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698