diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-16 22:17:09 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-16 22:17:09 +0000 |
commit | e520de1f48940b70487e56b88a70311091432783 (patch) | |
tree | 0556a262d6c7a5b19c95ad879a678a419c7294f3 | |
parent | 0484d7b02b002cd4561e93dcaafb7bdea4ae3a33 (diff) | |
download | chromium_src-e520de1f48940b70487e56b88a70311091432783.zip chromium_src-e520de1f48940b70487e56b88a70311091432783.tar.gz chromium_src-e520de1f48940b70487e56b88a70311091432783.tar.bz2 |
Fixed notifier_unit_tests failures.
These were introduced by r59629, but weren't caught since notifier_unit_tests
isn't on the waterfall (bug 55799).
BUG=None
TEST=ran notifier_unit_tests manually
Review URL: http://codereview.chromium.org/3416005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59739 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | jingle/notifier/base/xmpp_connection_unittest.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/jingle/notifier/base/xmpp_connection_unittest.cc b/jingle/notifier/base/xmpp_connection_unittest.cc index edf30e3..88adfab 100644 --- a/jingle/notifier/base/xmpp_connection_unittest.cc +++ b/jingle/notifier/base/xmpp_connection_unittest.cc @@ -70,7 +70,7 @@ class XmppConnectionTest : public testing::Test { virtual ~XmppConnectionTest() {} virtual void TearDown() { - // Clear out any messages posted by XmppConnections. + // Clear out any messages posted by XmppConnection's destructor. message_loop_.RunAllPending(); } @@ -94,6 +94,10 @@ TEST_F(XmppConnectionTest, ImmediateFailure) { XmppConnection xmpp_connection(buzz::XmppClientSettings(), &mock_xmpp_connection_delegate_, NULL); + + // We need to do this *before* |xmpp_connection| gets destroyed or + // our delegate won't be called. + message_loop_.RunAllPending(); } TEST_F(XmppConnectionTest, PreAuthFailure) { @@ -109,6 +113,10 @@ TEST_F(XmppConnectionTest, PreAuthFailure) { XmppConnection xmpp_connection( buzz::XmppClientSettings(), &mock_xmpp_connection_delegate_, mock_pre_xmpp_auth_.release()); + + // We need to do this *before* |xmpp_connection| gets destroyed or + // our delegate won't be called. + message_loop_.RunAllPending(); } TEST_F(XmppConnectionTest, FailureAfterPreAuth) { @@ -123,6 +131,10 @@ TEST_F(XmppConnectionTest, FailureAfterPreAuth) { XmppConnection xmpp_connection( buzz::XmppClientSettings(), &mock_xmpp_connection_delegate_, mock_pre_xmpp_auth_.release()); + + // We need to do this *before* |xmpp_connection| gets destroyed or + // our delegate won't be called. + message_loop_.RunAllPending(); } TEST_F(XmppConnectionTest, RaisedError) { |