From b47c0ebf205aacdc78589e3ae995a14f019603ca Mon Sep 17 00:00:00 2001
From: "sergeyu@chromium.org"
 <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Wed, 4 Aug 2010 23:57:29 +0000
Subject: Fixed memory leaks in new unittests TEST=heapcheck with
 remoting_unittest BUG=None TBR: ajwong

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55003 0039d316-1c4b-4281-b951-d872f2087c98
---
 remoting/host/heartbeat_sender_unittest.cc | 3 +++
 remoting/host/host_key_pair_unittest.cc    | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/remoting/host/heartbeat_sender_unittest.cc b/remoting/host/heartbeat_sender_unittest.cc
index 6ac2037..f5877e1 100644
--- a/remoting/host/heartbeat_sender_unittest.cc
+++ b/remoting/host/heartbeat_sender_unittest.cc
@@ -72,6 +72,9 @@ class HeartbeatSenderTest : public testing::Test {
         NewRunnableMethod(config_updater.get(), &TestConfigUpdater::DoUpdate,
                           config_));
 
+    // Run the message loop to save new config.
+    message_loop_.RunAllPending();
+
     jingle_thread_.message_loop_ = &message_loop_;
 
     jingle_client_ = new MockJingleClient(&jingle_thread_);
diff --git a/remoting/host/host_key_pair_unittest.cc b/remoting/host/host_key_pair_unittest.cc
index e5af756..c5d525e 100644
--- a/remoting/host/host_key_pair_unittest.cc
+++ b/remoting/host/host_key_pair_unittest.cc
@@ -52,6 +52,8 @@ TEST_F(HostKeyPairTest, SaveLoad) {
   exported_key.LoadFromString(kTestHostKeyPair);
   exported_key.Save(config_);
 
+  message_loop_.RunAllPending();
+
   HostKeyPair imported_key;
   imported_key.Load(config_);
 
-- 
cgit v1.1