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

Unified Diff: dbus/property_unittest.cc

Issue 523623003: Plug some of the leaks in dbus_unittests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove MessageLoop::Run() calls everywhere Created 6 years, 4 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: dbus/property_unittest.cc
diff --git a/dbus/property_unittest.cc b/dbus/property_unittest.cc
index e078c0044d1f9a16e1193b39cca05c3eefc0ebfe..6cd970192ccd0c7b17543fc0f90001951489d9a5 100644
--- a/dbus/property_unittest.cc
+++ b/dbus/property_unittest.cc
@@ -11,6 +11,7 @@
#include "base/bind.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
#include "base/threading/thread.h"
#include "base/threading/thread_restrictions.h"
#include "dbus/bus.h"
@@ -118,7 +119,7 @@ class PropertyTest : public testing::Test {
// Waits for the given number of updates.
void WaitForUpdates(size_t num_updates) {
while (updated_properties_.size() < num_updates)
- message_loop_.Run();
+ base::RunLoop().Run();
for (size_t i = 0; i < num_updates; ++i)
updated_properties_.erase(updated_properties_.begin());
}
@@ -136,7 +137,7 @@ class PropertyTest : public testing::Test {
// other; you can set this to whatever you wish.
void WaitForCallback(const std::string& id) {
while (last_callback_ != id) {
- message_loop_.Run();
+ base::RunLoop().Run();
}
}

Powered by Google App Engine
This is Rietveld 408576698