Index: content/browser/download/base_file_unittest.cc |
diff --git a/content/browser/download/base_file_unittest.cc b/content/browser/download/base_file_unittest.cc |
index 6175afe86f9279abd8a04ef7a969deddb919b143..be39aed4efb264207911f039cc6110d7f9d05019 100644 |
--- a/content/browser/download/base_file_unittest.cc |
+++ b/content/browser/download/base_file_unittest.cc |
@@ -77,6 +77,11 @@ class BaseFileTest : public testing::Test { |
EXPECT_EQ(expected_data_, disk_data); |
} |
+ // Stream pointers should be closed before |base_file_| to allow stream |
+ // objects to be actually closed and deleted and to allow the files to be |
+ // deleted on Win in BaseFile destructor. |
+ file_stream_.reset(); |
+ mock_file_stream_.reset(); |
// Make sure the mock BrowserThread outlives the BaseFile to satisfy |
// thread checks inside it. |
base_file_.reset(); |