[cr143] Single-argument testing::{DoAll,Invoke} deprecated
This change removes all the remaining occurrences of these functions being used with a single argument, following upstream deprecation. Chromium changes: https://chromium.googlesource.com/chromium/src/+/b843c806672c1e1b950f0868ddde79390c1eea69 commit b843c806672c1e1b950f0868ddde79390c1eea69 Author: Jonathan Lee <jonathanjlee@google.com> Date: Mon Oct 13 16:04:32 2025 -0700 Roll src/third_party/googletest/src/ 244cec869..7917641ff (4 commits) **Note to gardeners**: This CL may be incompatible with other CLs that add new usage of single-argument `testing::{DoAll,Invoke}`, which are deprecated. Please prefer forward-fixing by cleaning up the deprecated callsites instead of reverting this roll. The forward-fix is well- understood (crbug.com/439838457), and we want CQ to stop new deprecated callsites from landing. https://chromium.googlesource.com/external/github.com/google/googletest.git/+log/244cec869d12..7917641ff965 $ git log 244cec869..7917641ff --date=short --no-merges --format='%ad %ae %s' 2025-09-02 dmauro Bump Abseil dependency to 20250814.0 2025-08-24 absl-team Remove unused syslog dependency for Fuchsia. 2025-08-19 absl-team Internal header include changes. 2025-08-16 absl-team Deprecate single-argument DoAll and Invoke. Created with: roll-dep src/third_party/googletest/src Change-Id: Id197f789d82c374e16b07153012983792fcb4be7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6920668 Reviewed-by: Brian Sheedy <bsheedy@chromium.org> Commit-Queue: Jonathan Lee <jonathanjlee@google.com> Cr-Commit-Position: refs/heads/main@{#1529188}
This commit is contained in:
@@ -51,12 +51,12 @@ ContentAgentToolBaseTest::RunWithExpectedSuccess(
|
||||
base::RunLoop run_loop;
|
||||
optimization_guide::proto::Actions captured_actions;
|
||||
EXPECT_CALL(*mock_task_provider_, ExecuteActions)
|
||||
.WillOnce(testing::Invoke([&captured_actions, &run_loop](
|
||||
optimization_guide::proto::Actions actions,
|
||||
Tool::UseToolCallback callback) {
|
||||
.WillOnce([&captured_actions, &run_loop](
|
||||
optimization_guide::proto::Actions actions,
|
||||
Tool::UseToolCallback callback) {
|
||||
captured_actions = std::move(actions);
|
||||
run_loop.Quit();
|
||||
}));
|
||||
});
|
||||
|
||||
tool_->UseTool(input_json, base::DoNothing());
|
||||
run_loop.Run();
|
||||
|
||||
@@ -2575,8 +2575,7 @@ TEST_F(ConversationHandlerUnitTest,
|
||||
// Mock engine to return no new entry
|
||||
base::RunLoop run_loop;
|
||||
EXPECT_CALL(*engine, GenerateAssistantResponse)
|
||||
.WillOnce(testing::DoAll(
|
||||
// Complete the request
|
||||
.WillOnce( // Complete the request
|
||||
testing::WithArg<8>(
|
||||
[&](EngineConsumer::GenerationCompletedCallback callback) {
|
||||
std::move(callback).Run(
|
||||
@@ -2585,7 +2584,7 @@ TEST_F(ConversationHandlerUnitTest,
|
||||
mojom::CompletionEvent::New("")),
|
||||
std::nullopt)));
|
||||
run_loop.QuitWhenIdle();
|
||||
})));
|
||||
}));
|
||||
|
||||
// Submit a human entry to trigger the mocked response
|
||||
conversation_handler_->SubmitHumanConversationEntry("Test question",
|
||||
|
||||
Reference in New Issue
Block a user