Index: chromeos/dbus/fake_shill_manager_client.cc |
diff --git a/chromeos/dbus/fake_shill_manager_client.cc b/chromeos/dbus/fake_shill_manager_client.cc |
index f524c1f7c0f62adbd73131c1d40a72cff7e771f8..7b4eb61f39c3f515d2c7cdb962a0c5ec2d86b00b 100644 |
--- a/chromeos/dbus/fake_shill_manager_client.cc |
+++ b/chromeos/dbus/fake_shill_manager_client.cc |
@@ -565,6 +565,11 @@ void FakeShillManagerClient::SetBestServiceToConnect( |
} |
void FakeShillManagerClient::SetupDefaultEnvironment() { |
+ // Bail out from setup if there is no message loop. This will be the common |
+ // case for tests that are not testing Shill. |
+ if (!base::MessageLoop::current()) |
+ return; |
+ |
DBusThreadManager* dbus_manager = DBusThreadManager::Get(); |
ShillServiceClient::TestInterface* services = |
dbus_manager->GetShillServiceClient()->GetTestInterface(); |