diff --git a/shell/platform/darwin/macos/framework/Source/FlutterMenuPluginTest.mm b/shell/platform/darwin/macos/framework/Source/FlutterMenuPluginTest.mm index 326863c1b8e09..915df002c3d12 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterMenuPluginTest.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterMenuPluginTest.mm @@ -25,6 +25,11 @@ - (bool)testSetMenu; @implementation FlutterMenuPluginTestObjc - (bool)testSetMenu { + // Workaround to deflake the test. + // See: https://github.com/flutter/flutter/issues/104748#issuecomment-1159336728 + NSView* view = [[NSView alloc] initWithFrame:NSZeroRect]; + view.wantsLayer = YES; + // Build a simulation of the default main menu. NSMenu* mainMenu = [[NSMenu alloc] init]; NSMenuItem* appNameMenu = [[NSMenuItem alloc] initWithTitle:@"APP_NAME" @@ -175,9 +180,7 @@ - (bool)testSetMenu { @end namespace flutter::testing { -// TODO(gspencergoog): Re-enabled when deflaked -// https://github.com/flutter/flutter/issues/106589 -TEST(FlutterMenuPluginTest, DISABLED_TestSetMenu) { +TEST(FlutterMenuPluginTest, TestSetMenu) { ASSERT_TRUE([[FlutterMenuPluginTestObjc alloc] testSetMenu]); } } // namespace flutter::testing