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

Unified Diff: net/base/upload_data_stream_unittest.cc

Issue 23872030: Fix teardown in tests which use UploadFileElementReader. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 7 years, 3 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: net/base/upload_data_stream_unittest.cc
diff --git a/net/base/upload_data_stream_unittest.cc b/net/base/upload_data_stream_unittest.cc
index 42b71b9cbea2eab026ca75997409a88e72b898e1..1bdd7d58ffcbfc4534cc6d6daba9588ecb08a8fb 100644
--- a/net/base/upload_data_stream_unittest.cc
+++ b/net/base/upload_data_stream_unittest.cc
@@ -14,6 +14,7 @@
#include "base/files/scoped_temp_dir.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
#include "base/time/time.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
@@ -123,9 +124,13 @@ class MockUploadElementReader : public UploadElementReader {
class UploadDataStreamTest : public PlatformTest {
public:
- virtual void SetUp() OVERRIDE {
+ UploadDataStreamTest() {
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
}
+ ~UploadDataStreamTest() {
Ryan Sleevi 2013/09/13 21:57:27 style nit: virtual
+ element_readers_.clear();
+ base::RunLoop().RunUntilIdle();
+ }
void FileChangedHelper(const base::FilePath& file_path,
const base::Time& time,
« no previous file with comments | « no previous file | net/base/upload_file_element_reader_unittest.cc » ('j') | net/base/upload_file_element_reader_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698