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

Commit c33eae1

Browse files
author
Chris Yang
authored
Macos re-enable TestSetMenu (#37058)
1 parent ecb5136 commit c33eae1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

shell/platform/darwin/macos/framework/Source/FlutterMenuPluginTest.mm

+6-3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ - (bool)testSetMenu;
2525
@implementation FlutterMenuPluginTestObjc
2626

2727
- (bool)testSetMenu {
28+
// Workaround to deflake the test.
29+
// See: https://github.com/flutter/flutter/issues/104748#issuecomment-1159336728
30+
NSView* view = [[NSView alloc] initWithFrame:NSZeroRect];
31+
view.wantsLayer = YES;
32+
2833
// Build a simulation of the default main menu.
2934
NSMenu* mainMenu = [[NSMenu alloc] init];
3035
NSMenuItem* appNameMenu = [[NSMenuItem alloc] initWithTitle:@"APP_NAME"
@@ -175,9 +180,7 @@ - (bool)testSetMenu {
175180
@end
176181

177182
namespace flutter::testing {
178-
// TODO(gspencergoog): Re-enabled when deflaked
179-
// https://github.com/flutter/flutter/issues/106589
180-
TEST(FlutterMenuPluginTest, DISABLED_TestSetMenu) {
183+
TEST(FlutterMenuPluginTest, TestSetMenu) {
181184
ASSERT_TRUE([[FlutterMenuPluginTestObjc alloc] testSetMenu]);
182185
}
183186
} // namespace flutter::testing

0 commit comments

Comments
 (0)