Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions shell/platform/windows/flutter_windows_view_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ struct TestResponseHandle {
};

static bool test_response = false;
static bool semantics_enabled = false;

constexpr uint64_t kKeyEventFromChannel = 0x11;
constexpr uint64_t kKeyEventFromEmbedder = 0x22;
Expand Down Expand Up @@ -130,11 +129,15 @@ TEST(FlutterWindowsViewTest, RestartClearsKeyboardState) {
TEST(FlutterWindowsViewTest, EnableSemantics) {
std::unique_ptr<FlutterWindowsEngine> engine = GetTestEngine();
EngineModifier modifier(engine.get());
modifier.embedder_api().UpdateSemanticsEnabled =
[](FLUTTER_API_SYMBOL(FlutterEngine) engine, bool enabled) {

bool semantics_enabled = false;
modifier.embedder_api().UpdateSemanticsEnabled = MOCK_ENGINE_PROC(
UpdateSemanticsEnabled,
[&semantics_enabled](FLUTTER_API_SYMBOL(FlutterEngine) engine,
bool enabled) {
semantics_enabled = enabled;
return kSuccess;
};
});

auto window_binding_handler =
std::make_unique<::testing::NiceMock<MockWindowBindingHandler>>();
Expand Down