Commit 8a05362e authored by skerner@chromium.org's avatar skerner@chromium.org

Fix memory leak in UrlFetcherTempFileTest.* tests.

TBR=thestig
BUG=none
TEST=URLFetcherTempFileTest.*

Review URL: http://codereview.chromium.org/7051036

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86286 0039d316-1c4b-4281-b951-d872f2087c98
parent c5f233fa
...@@ -357,13 +357,6 @@ TEST_F(URLFetcherTempFileTest, SmallGet) { ...@@ -357,13 +357,6 @@ TEST_F(URLFetcherTempFileTest, SmallGet) {
MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit(). MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit().
ASSERT_TRUE(file_util::PathExists(temp_file_))
<< temp_file_.value() << " not found.";
// Deleting the fetcher should remove the file.
delete fetcher_;
MessageLoop::current()->RunAllPending();
ASSERT_FALSE(file_util::PathExists(temp_file_)) ASSERT_FALSE(file_util::PathExists(temp_file_))
<< temp_file_.value() << " not removed."; << temp_file_.value() << " not removed.";
} }
...@@ -392,12 +385,6 @@ TEST_F(URLFetcherTempFileTest, CanTakeOwnershipOfFile) { ...@@ -392,12 +385,6 @@ TEST_F(URLFetcherTempFileTest, CanTakeOwnershipOfFile) {
MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit(). MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit().
ASSERT_TRUE(file_util::PathExists(temp_file_))
<< temp_file_.value() << " not found.";
// Deleting the fetcher should remove the file.
delete fetcher_;
MessageLoop::current()->RunAllPending(); MessageLoop::current()->RunAllPending();
ASSERT_FALSE(file_util::PathExists(temp_file_)) ASSERT_FALSE(file_util::PathExists(temp_file_))
<< temp_file_.value() << " not removed."; << temp_file_.value() << " not removed.";
...@@ -646,6 +633,8 @@ void URLFetcherTempFileTest::OnURLFetchComplete(const URLFetcher* source) { ...@@ -646,6 +633,8 @@ void URLFetcherTempFileTest::OnURLFetchComplete(const URLFetcher* source) {
EXPECT_TRUE(file_util::ContentsEqual(expected_file_, temp_file_)); EXPECT_TRUE(file_util::ContentsEqual(expected_file_, temp_file_));
delete fetcher_;
io_message_loop_proxy()->PostTask(FROM_HERE, new MessageLoop::QuitTask()); io_message_loop_proxy()->PostTask(FROM_HERE, new MessageLoop::QuitTask());
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment