Index: base/threading/post_task_and_reply_impl_unittest.cc |
diff --git a/base/threading/post_task_and_reply_impl_unittest.cc b/base/threading/post_task_and_reply_impl_unittest.cc |
index 8c6faaf8c0afc9a8d01a999f8238c4ecf8823556..bb4a950f916fbdbc7427ea47908ec6a93fa90c44 100644 |
--- a/base/threading/post_task_and_reply_impl_unittest.cc |
+++ b/base/threading/post_task_and_reply_impl_unittest.cc |
@@ -27,8 +27,8 @@ class PostTaskAndReplyTaskRunner : public internal::PostTaskAndReplyImpl { |
private: |
bool PostTask(const tracked_objects::Location& from_here, |
- const Closure& task) override { |
- return destination_->PostTask(from_here, task); |
+ OnceClosure task) override { |
+ return destination_->PostTask(from_here, std::move(task)); |
} |
// Non-owning. |
@@ -97,8 +97,8 @@ TEST(PostTaskAndReplyImplTest, PostTaskAndReply) { |
post_runner->RunUntilIdle(); |
testing::Mock::VerifyAndClear(&mock_object); |
- // Expect the task's argument not to have been deleted yet. |
- EXPECT_FALSE(delete_flag); |
+ // Expect the task's argument to have been deleted on the target task runner. |
+ EXPECT_TRUE(delete_flag); |
// Expect the reply to be posted to |reply_runner|. |
EXPECT_FALSE(post_runner->HasPendingTask()); |
@@ -106,7 +106,6 @@ TEST(PostTaskAndReplyImplTest, PostTaskAndReply) { |
EXPECT_CALL(mock_object, ReplyMock()); |
reply_runner->RunUntilIdle(); |
testing::Mock::VerifyAndClear(&mock_object); |
- EXPECT_TRUE(delete_flag); |
// Expect no pending task in |post_runner| and |reply_runner|. |
EXPECT_FALSE(post_runner->HasPendingTask()); |