diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-29 16:48:19 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-29 16:48:19 +0000 |
commit | 91c06e5e57d38760631ed240b1161a2af613b974 (patch) | |
tree | c24a23ab720050396179a46ddc4c64a4426dcbaa /chrome/browser/autofill/autofill_download_unittest.cc | |
parent | c7fd73291df44ad9c03c04d8aba6e5d694bf2864 (diff) | |
download | chromium_src-91c06e5e57d38760631ed240b1161a2af613b974.zip chromium_src-91c06e5e57d38760631ed240b1161a2af613b974.tar.gz chromium_src-91c06e5e57d38760631ed240b1161a2af613b974.tar.bz2 |
Add a scoper object for URLFetcher::Factory
This should make it much safer to use (i.e. memory-safe).
BUG=90585
Review URL: http://codereview.chromium.org/7524033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94694 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/autofill_download_unittest.cc')
-rw-r--r-- | chrome/browser/autofill/autofill_download_unittest.cc | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/chrome/browser/autofill/autofill_download_unittest.cc b/chrome/browser/autofill/autofill_download_unittest.cc index f62383f0..aa064a2 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); } |