Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit c974af2

Browse files
committed
Accept >=1 calls for implementation detail mocks
1 parent 0769d11 commit c974af2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

shell/platform/windows/flutter_window_unittests.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ TEST(FlutterWindowTest, AlertNode) {
313313
std::unique_ptr<MockFlutterWindow> win32window =
314314
std::make_unique<MockFlutterWindow>();
315315
EXPECT_CALL(*win32window.get(), GetAxFragmentRootDelegate())
316-
.WillOnce(Return(nullptr));
316+
.WillRepeatedly(Return(nullptr));
317317
EXPECT_CALL(*win32window.get(), OnWindowStateEvent).Times(AnyNumber());
318318
MockFlutterWindowsView view(std::move(win32window));
319319
std::wstring message = L"Test alert";

shell/platform/windows/flutter_windows_engine_unittests.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ TEST_F(FlutterWindowsEngineTest, AlertPlatformMessage) {
641641
ui::AXPlatformNodeDelegateBase parent_delegate;
642642
AlertPlatformNodeDelegate delegate(parent_delegate);
643643
EXPECT_CALL(*window_binding_handler, GetAlertDelegate)
644-
.WillOnce(Return(&delegate));
644+
.WillRepeatedly(Return(&delegate));
645645
MockFlutterWindowsView view(std::move(window_binding_handler));
646646
view.SetEngine(engine.get());
647647

@@ -717,7 +717,7 @@ TEST_F(FlutterWindowsEngineTest, TestExit) {
717717
std::optional<WPARAM> wparam,
718718
std::optional<LPARAM> lparam,
719719
UINT exit_code) { finished = exit_code == 0; });
720-
EXPECT_CALL(*handler, IsLastWindowOfProcess).WillOnce(Return(true));
720+
EXPECT_CALL(*handler, IsLastWindowOfProcess).WillRepeatedly(Return(true));
721721
modifier.SetLifecycleManager(std::move(handler));
722722

723723
engine->lifecycle_manager()->BeginProcessingExit();
@@ -749,7 +749,7 @@ TEST_F(FlutterWindowsEngineTest, TestExitCancel) {
749749
modifier.embedder_api().RunsAOTCompiledDartCode = []() { return false; };
750750
auto handler = std::make_unique<MockWindowsLifecycleManager>(engine.get());
751751
EXPECT_CALL(*handler, SetLifecycleState(AppLifecycleState::kResumed));
752-
EXPECT_CALL(*handler, IsLastWindowOfProcess).WillOnce(Return(true));
752+
EXPECT_CALL(*handler, IsLastWindowOfProcess).WillRepeatedly(Return(true));
753753
EXPECT_CALL(*handler, Quit).Times(0);
754754
modifier.SetLifecycleManager(std::move(handler));
755755
engine->lifecycle_manager()->BeginProcessingExit();

0 commit comments

Comments
 (0)