Commit 16655808 authored by Austin Tankiang's avatar Austin Tankiang Committed by Commit Bot

Remove uses of base::Bind in service_connection_unittest

Bug: 1007662
Change-Id: I2e998f545703e0009c4887e9febf80c6039afc9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2371845
Commit-Queue: Honglin Yu <honglinyu@chromium.org>
Auto-Submit: Austin Tankiang <austinct@chromium.org>
Reviewed-by: default avatarHonglin Yu <honglinyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800971}
parent 1a7c0a2e
......@@ -254,7 +254,7 @@ TEST_F(ServiceConnectionTest,
bool infer_callback_done = false;
text_classifier->Annotate(
std::move(request),
base::Bind(
base::BindOnce(
[](bool* infer_callback_done,
std::vector<mojom::TextAnnotationPtr> annotations) {
*infer_callback_done = true;
......@@ -301,16 +301,15 @@ TEST_F(ServiceConnectionTest,
request->user_selection = mojom::CodepointSpan::New();
bool infer_callback_done = false;
text_classifier->SuggestSelection(
std::move(request),
base::Bind(
[](bool* infer_callback_done,
mojom::CodepointSpanPtr suggested_span) {
*infer_callback_done = true;
// Check if the suggestion is correct.
EXPECT_EQ(suggested_span->start_offset, 1u);
EXPECT_EQ(suggested_span->end_offset, 2u);
},
&infer_callback_done));
std::move(request), base::BindOnce(
[](bool* infer_callback_done,
mojom::CodepointSpanPtr suggested_span) {
*infer_callback_done = true;
// Check if the suggestion is correct.
EXPECT_EQ(suggested_span->start_offset, 1u);
EXPECT_EQ(suggested_span->end_offset, 2u);
},
&infer_callback_done));
base::RunLoop().RunUntilIdle();
ASSERT_TRUE(infer_callback_done);
}
......@@ -344,7 +343,7 @@ TEST_F(ServiceConnectionTest,
std::string input_text = "dummy input text";
bool infer_callback_done = false;
text_classifier->FindLanguages(
input_text, base::Bind(
input_text, base::BindOnce(
[](bool* infer_callback_done,
std::vector<mojom::TextLanguagePtr> languages) {
*infer_callback_done = true;
......@@ -396,7 +395,7 @@ TEST_F(ServiceConnectionTest, FakeHandWritingRecognizerWithSpec) {
bool infer_callback_done = false;
recognizer->Recognize(
std::move(query),
base::Bind(
base::BindOnce(
[](bool* infer_callback_done,
mojom::HandwritingRecognizerResultPtr result) {
*infer_callback_done = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment