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

Unified Diff: components/autofill/core/browser/autofill_download_unittest.cc

Issue 17127002: Correctly integrate StoragePartition into TestingProfile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup TODOs. merge code. kill more threads. i never get tired of thread carnage. Created 7 years, 5 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: components/autofill/core/browser/autofill_download_unittest.cc
diff --git a/components/autofill/core/browser/autofill_download_unittest.cc b/components/autofill/core/browser/autofill_download_unittest.cc
index 0f78726b82417b5c6a1c5ff37e69dac0cb790a5f..86ff44252d58b253d4133bd92fe3b8d4f3a69cfc 100644
--- a/components/autofill/core/browser/autofill_download_unittest.cc
+++ b/components/autofill/core/browser/autofill_download_unittest.cc
@@ -15,14 +15,13 @@
#include "components/autofill/core/browser/autofill_type.h"
#include "components/autofill/core/browser/form_structure.h"
#include "components/autofill/core/common/form_data.h"
-#include "content/public/test/test_browser_thread.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "net/url_request/test_url_fetcher_factory.h"
#include "net/url_request/url_request_status.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/public/web/WebInputElement.h"
-using content::BrowserThread;
using WebKit::WebInputElement;
namespace autofill {
@@ -65,18 +64,7 @@ class AutofillDownloadTest : public AutofillDownloadManager::Observer,
public testing::Test {
public:
AutofillDownloadTest()
- : download_manager_(&profile_, this),
- io_thread_(BrowserThread::IO) {
- }
-
- virtual void SetUp() {
- io_thread_.StartIOThread();
- profile_.CreateRequestContext();
- }
-
- virtual void TearDown() {
- profile_.ResetRequestContext();
- io_thread_.Stop();
+ : download_manager_(&profile_, this) {
}
void LimitCache(size_t cache_size) {
@@ -128,16 +116,12 @@ class AutofillDownloadTest : public AutofillDownloadManager::Observer,
};
std::list<ResponseData> responses_;
+ content::TestBrowserThreadBundle thread_bundle_;
TestingProfile profile_;
tfarina 2013/07/11 01:35:45 do you still need profile_?
awong 2013/07/11 21:04:15 Seems to be used by download_manager_.
AutofillDownloadManager download_manager_;
-
- private:
- // The profile's request context must be released on the IO thread.
- content::TestBrowserThread io_thread_;
};
TEST_F(AutofillDownloadTest, QueryAndUploadTest) {
- base::MessageLoopForUI message_loop;
// Create and register factory.
net::TestURLFetcherFactory factory;
@@ -349,7 +333,6 @@ TEST_F(AutofillDownloadTest, QueryAndUploadTest) {
}
TEST_F(AutofillDownloadTest, CacheQueryTest) {
- base::MessageLoopForUI message_loop;
// Create and register factory.
net::TestURLFetcherFactory factory;

Powered by Google App Engine
This is Rietveld 408576698