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

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

Issue 8392042: Split BrowserThread into public API and private implementation, step 1. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 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
Index: chrome/browser/safe_browsing/download_protection_service_unittest.cc
diff --git a/chrome/browser/safe_browsing/download_protection_service_unittest.cc b/chrome/browser/safe_browsing/download_protection_service_unittest.cc
index 308fc2fe36a1ae04707dc55715863968f3e0a57e..b3bb492bfd183fdd5dd95931e5a1d22c54187ce1 100644
--- a/chrome/browser/safe_browsing/download_protection_service_unittest.cc
+++ b/chrome/browser/safe_browsing/download_protection_service_unittest.cc
@@ -12,10 +12,10 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
-#include "chrome/common/safe_browsing/csd.pb.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
-#include "content/browser/browser_thread.h"
+#include "chrome/common/safe_browsing/csd.pb.h"
#include "content/common/net/url_fetcher.h"
+#include "content/test/test_browser_thread.h"
#include "content/test/test_url_fetcher_factory.h"
#include "googleurl/src/gurl.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -41,8 +41,10 @@ class MockSafeBrowsingService : public SafeBrowsingService {
class DownloadProtectionServiceTest : public testing::Test {
protected:
virtual void SetUp() {
- ui_thread_.reset(new BrowserThread(BrowserThread::UI, &msg_loop_));
- io_thread_.reset(new BrowserThread(BrowserThread::IO, &msg_loop_));
+ ui_thread_.reset(new content::TestBrowserThread(BrowserThread::UI,
+ &msg_loop_));
+ io_thread_.reset(new content::TestBrowserThread(BrowserThread::IO,
+ &msg_loop_));
sb_service_ = new MockSafeBrowsingService();
download_service_ = new DownloadProtectionService(sb_service_.get(),
NULL);
@@ -84,8 +86,8 @@ class DownloadProtectionServiceTest : public testing::Test {
scoped_refptr<DownloadProtectionService> download_service_;
MessageLoop msg_loop_;
DownloadProtectionService::DownloadCheckResult result_;
- scoped_ptr<BrowserThread> io_thread_;
- scoped_ptr<BrowserThread> ui_thread_;
+ scoped_ptr<content::TestBrowserThread> io_thread_;
+ scoped_ptr<content::TestBrowserThread> ui_thread_;
};
TEST_F(DownloadProtectionServiceTest, CheckClientDownloadInvalidUrl) {
« no previous file with comments | « chrome/browser/safe_browsing/download_protection_service.cc ('k') | chrome/browser/safe_browsing/malware_details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698