Fix InvalidationNotifierTest leak and suppressions

When XmppConnection is deleted, its TaskPump member is not deleted immediately.
The destructor enqueues a task to the message loop to have it deleted later.  A
comment in ~XmppConnection that explains why it does this.

In the unit tests, the TaskPump would get leaked because the message loop would
never get a chance to run that deletion task.  This commit fixes the problem by
running all pending tasks on that message loop before we exit the test.

This commit removes the suppression for bug_80238.  Issue 80238 hasn't been
seen for a while, so it's probably safe to remove.  It's only relation to issue
79651 is that it happened in the same set of tests; the two issues probably had
different root causes.

This commit renames the suppression bug_79651, which is still necessary, but
isn't actually related to issue 79651.  When I tried to remove it, I ran into
the issue now known as issue 96904.  I've renamed the suppression to match the
issue it's actually suppressing.

Discussion of these changes can be found on the bug tracker, spread across the
pages for issues 79651, 80238 and 96904.

BUG=79651, 80238, 96904
TEST=InvalidationNotifierTest


Review URL: http://codereview.chromium.org/7919026

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102193 0039d316-1c4b-4281-b951-d872f2087c98
parent 9030921a
......@@ -43,6 +43,7 @@ class InvalidationNotifierTest : public testing::Test {
virtual void TearDown() {
invalidation_notifier_->RemoveObserver(&mock_observer_);
invalidation_notifier_.reset();
message_loop_.RunAllPending();
}
MessageLoop message_loop_;
......
......@@ -1111,20 +1111,6 @@
fun:browser_sync::SyncerThread::FinishSyncSessionJob
fun:browser_sync::SyncerThread::DoSyncSessionJob
}
{
bug_79651_a
Heapcheck:Leak
...
fun:sync_notifier::InvalidationNotifier::UpdateCredentials
fun:sync_notifier::::InvalidationNotifierTest_Basic_Test::TestBody
}
{
bug_79651_b
Heapcheck:Leak
...
fun:*basic_string*
fun:sync_notifier::::InvalidationNotifierTest_Basic_Test::TestBody
}
{
bug_80196
Heapcheck:Leak
......@@ -1134,12 +1120,6 @@
fun:browser_sync::DataTypeManagerImpl::Restart
fun:browser_sync::DataTypeManagerImpl::Configure
}
{
bug_80238
Heapcheck:Leak
...
fun:sync_notifier::::InvalidationNotifierTest::SetUp
}
{
bug_80467
Heapcheck:Leak
......@@ -1170,17 +1150,6 @@
...
fun:RenderWidgetHost::WasHidden
}
{
bug_79651
Heapcheck:Leak
...
fun:TestURLRequestContextGetter::GetURLRequestContext
fun:*SingleLoginAttempt
fun:notifier::Login::StartConnection
fun:sync_notifier::InvalidationNotifier::UpdateCredentials
fun:sync_notifier::NonBlockingInvalidationNotifier::Core::UpdateCredentials
fun:void DispatchToMethod
}
{
bug_80654
Heapcheck:Leak
......@@ -1707,3 +1676,14 @@
fun:ScopedTempDir::CreateUniqueTempDir
fun:TestingProfile
}
{
bug_96904
Heapcheck:Leak
...
fun:TestURLRequestContextGetter::GetURLRequestContext
fun:*SingleLoginAttempt
fun:notifier::Login::StartConnection
fun:sync_notifier::InvalidationNotifier::UpdateCredentials
fun:sync_notifier::NonBlockingInvalidationNotifier::Core::UpdateCredentials
fun:void DispatchToMethod
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment