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

Unified Diff: chrome/browser/autofill/autofill_download_unittest.cc

Issue 7524033: Add a scoper object for URLFetcher::Factory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 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: chrome/browser/autofill/autofill_download_unittest.cc
diff --git a/chrome/browser/autofill/autofill_download_unittest.cc b/chrome/browser/autofill/autofill_download_unittest.cc
index f62383f06f91aad0b33f75b47c8f65c2fb1a11be..aa064a251378a4193d93876954c3d4b077f3a399 100644
--- a/chrome/browser/autofill/autofill_download_unittest.cc
+++ b/chrome/browser/autofill/autofill_download_unittest.cc
@@ -16,7 +16,7 @@
#include "chrome/test/testing_browser_process.h"
#include "chrome/test/testing_browser_process_test.h"
#include "chrome/test/testing_profile.h"
-#include "content/common/test_url_fetcher_factory.h"
+#include "content/test/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"
@@ -121,7 +121,6 @@ TEST_F(AutofillDownloadTest, QueryAndUploadTest) {
// Create and register factory.
AutofillDownloadTestHelper helper;
TestURLFetcherFactory factory;
- URLFetcher::set_factory(&factory);
FormData form;
form.method = ASCIIToUTF16("post");
@@ -363,9 +362,6 @@ TEST_F(AutofillDownloadTest, QueryAndUploadTest) {
FieldTypeSet()));
fetcher = factory.GetFetcherByID(5);
EXPECT_EQ(NULL, fetcher);
-
- // Make sure consumer of URLFetcher does the right thing.
- URLFetcher::set_factory(NULL);
}
TEST_F(AutofillDownloadTest, CacheQueryTest) {
@@ -373,7 +369,6 @@ TEST_F(AutofillDownloadTest, CacheQueryTest) {
AutofillDownloadTestHelper helper;
// Create and register factory.
TestURLFetcherFactory factory;
- URLFetcher::set_factory(&factory);
helper.InitContextGetter();
FormData form;
@@ -545,8 +540,5 @@ TEST_F(AutofillDownloadTest, CacheQueryTest) {
std::string(responses[0]));
ASSERT_EQ(static_cast<size_t>(1), helper.responses_.size());
EXPECT_EQ(responses[0], helper.responses_.front().response);
-
- // Make sure consumer of URLFetcher does the right thing.
- URLFetcher::set_factory(NULL);
}
« no previous file with comments | « chrome/browser/autofill/autofill_browsertest.cc ('k') | chrome/browser/chromeos/login/google_authenticator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698