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

Unified Diff: dbus/end_to_end_async_unittest.cc

Issue 7830009: Add Bus::ShutdownOnDBusThreadAndBlock() and remove bus::Shutdown() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 9 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
« no previous file with comments | « dbus/bus_unittest.cc ('k') | dbus/end_to_end_sync_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/end_to_end_async_unittest.cc
diff --git a/dbus/end_to_end_async_unittest.cc b/dbus/end_to_end_async_unittest.cc
index 41b06b6c89402a24bc0763ea7b63d312c6f4f729..cea37a8aa8973613998f93fe4990abd8fa908e6e 100644
--- a/dbus/end_to_end_async_unittest.cc
+++ b/dbus/end_to_end_async_unittest.cc
@@ -66,15 +66,10 @@ class EndToEndAsyncTest : public testing::Test {
}
virtual void TearDown() {
- bus_->Shutdown(base::Bind(&EndToEndAsyncTest::OnShutdown,
- base::Unretained(this)));
- // Wait until the bus is shutdown. OnShutdown() will be called in
- // message_loop_.
- message_loop_.Run();
+ bus_->ShutdownOnDBusThreadAndBlock();
// Shut down the service.
- test_service_->Shutdown();
- ASSERT_TRUE(test_service_->WaitUntilServiceIsShutdown());
+ test_service_->ShutdownAndBlock();
// Reset to the default.
base::ThreadRestrictions::SetIOAllowed(true);
@@ -117,11 +112,6 @@ class EndToEndAsyncTest : public testing::Test {
message_loop_.Quit();
};
- // Called when the shutdown is complete.
- void OnShutdown() {
- message_loop_.Quit();
- }
-
// Called when the "Test" signal is received, in the main thread.
// Copy the string payload to |test_signal_string_|.
void OnTestSignal(dbus::Signal* signal) {
« no previous file with comments | « dbus/bus_unittest.cc ('k') | dbus/end_to_end_sync_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698