Index: content/renderer/media/media_stream_impl_unittest.cc |
diff --git a/content/renderer/media/media_stream_impl_unittest.cc b/content/renderer/media/media_stream_impl_unittest.cc |
index a821d1485ea89ea7b34e1249e4b6c6b8db2db685..8703374586f4ce81a5cad51bd92e1046fbcf8085 100644 |
--- a/content/renderer/media/media_stream_impl_unittest.cc |
+++ b/content/renderer/media/media_stream_impl_unittest.cc |
@@ -34,6 +34,13 @@ class MediaStreamImplTest : public ::testing::Test { |
dependency_factory)); |
} |
+ void TearDown() { |
+ // Make sure the message created by |
+ // P2PSocketDispatcher::AsyncMessageSender::Send is handled before |
+ // tear down to avoid a memory leak. |
+ loop_.RunAllPending(); |
+ } |
+ |
protected: |
MessageLoop loop_; |
scoped_ptr<MockMediaStreamDispatcher> ms_dispatcher_; |