Index: dbus/mock_unittest.cc |
diff --git a/dbus/mock_unittest.cc b/dbus/mock_unittest.cc |
index cf644df0d861bc67dea4dba9cce47f82f0725cf2..f86008298a33632c1df8670fe4ef6af0b724184f 100644 |
--- a/dbus/mock_unittest.cc |
+++ b/dbus/mock_unittest.cc |
@@ -39,7 +39,7 @@ class MockTest : public testing::Test { |
// Set an expectation so mock_proxy's CallMethodAndBlock() will use |
// CreateMockProxyResponse() to return responses. |
- EXPECT_CALL(*mock_proxy_, CallMethodAndBlock(_, _)) |
+ EXPECT_CALL(*mock_proxy_, MockCallMethodAndBlock(_, _)) |
.WillRepeatedly(Invoke(this, &MockTest::CreateMockProxyResponse)); |
// Set an expectation so mock_proxy's CallMethod() will use |
@@ -91,10 +91,10 @@ class MockTest : public testing::Test { |
dbus::MessageReader reader(method_call); |
std::string text_message; |
if (reader.PopString(&text_message)) { |
- dbus::Response* response = dbus::Response::CreateEmpty(); |
- dbus::MessageWriter writer(response); |
+ scoped_ptr<dbus::Response> response = dbus::Response::CreateEmpty(); |
+ dbus::MessageWriter writer(response.get()); |
writer.AppendString(text_message); |
- return response; |
+ return response.release(); |
} |
} |