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

Commit b3a7339

Browse files
committed
Unskip iOS launch URL tests
1 parent d6ddc31 commit b3a7339

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

shell/platform/darwin/ios/framework/Source/FlutterAppDelegateTest.mm

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,16 @@ @interface FlutterAppDelegateTest : XCTestCase
1818

1919
@implementation FlutterAppDelegateTest
2020

21-
// TODO(dnfield): https://github.com/flutter/flutter/issues/74267
22-
- (void)skip_testLaunchUrl {
21+
- (void)testLaunchUrl {
2322
FlutterAppDelegate* appDelegate = [[FlutterAppDelegate alloc] init];
2423
FlutterViewController* viewController = OCMClassMock([FlutterViewController class]);
2524
FlutterEngine* engine = OCMClassMock([FlutterEngine class]);
2625
FlutterMethodChannel* navigationChannel = OCMClassMock([FlutterMethodChannel class]);
2726
OCMStub([engine navigationChannel]).andReturn(navigationChannel);
2827
OCMStub([viewController engine]).andReturn(engine);
29-
OCMStub([engine waitForFirstFrame:3.0 callback:([OCMArg invokeBlockWithArgs:@(NO), nil])]);
28+
// Set blockArg to a strong local to retain to end of scope.
29+
id blockArg = [OCMArg invokeBlockWithArgs:@(NO), nil];
30+
OCMStub([engine waitForFirstFrame:3.0 callback:blockArg]);
3031
appDelegate.rootFlutterViewControllerGetter = ^{
3132
return viewController;
3233
};
@@ -42,14 +43,16 @@ - (void)skip_testLaunchUrl {
4243
OCMVerify([navigationChannel invokeMethod:@"pushRoute" arguments:@"/custom/route?query=test"]);
4344
}
4445

45-
- (void)skip_testLaunchUrlWithQueryParameterAndFragment {
46+
- (void)testLaunchUrlWithQueryParameterAndFragment {
4647
FlutterAppDelegate* appDelegate = [[FlutterAppDelegate alloc] init];
4748
FlutterViewController* viewController = OCMClassMock([FlutterViewController class]);
4849
FlutterEngine* engine = OCMClassMock([FlutterEngine class]);
4950
FlutterMethodChannel* navigationChannel = OCMClassMock([FlutterMethodChannel class]);
5051
OCMStub([engine navigationChannel]).andReturn(navigationChannel);
5152
OCMStub([viewController engine]).andReturn(engine);
52-
OCMStub([engine waitForFirstFrame:3.0 callback:([OCMArg invokeBlockWithArgs:@(NO), nil])]);
53+
// Set blockArg to a strong local to retain to end of scope.
54+
id blockArg = [OCMArg invokeBlockWithArgs:@(NO), nil];
55+
OCMStub([engine waitForFirstFrame:3.0 callback:blockArg]);
5356
appDelegate.rootFlutterViewControllerGetter = ^{
5457
return viewController;
5558
};
@@ -66,14 +69,16 @@ - (void)skip_testLaunchUrlWithQueryParameterAndFragment {
6669
arguments:@"/custom/route?query=test#fragment"]);
6770
}
6871

69-
- (void)skip_testLaunchUrlWithFragmentNoQueryParameter {
72+
- (void)testLaunchUrlWithFragmentNoQueryParameter {
7073
FlutterAppDelegate* appDelegate = [[FlutterAppDelegate alloc] init];
7174
FlutterViewController* viewController = OCMClassMock([FlutterViewController class]);
7275
FlutterEngine* engine = OCMClassMock([FlutterEngine class]);
7376
FlutterMethodChannel* navigationChannel = OCMClassMock([FlutterMethodChannel class]);
7477
OCMStub([engine navigationChannel]).andReturn(navigationChannel);
7578
OCMStub([viewController engine]).andReturn(engine);
76-
OCMStub([engine waitForFirstFrame:3.0 callback:([OCMArg invokeBlockWithArgs:@(NO), nil])]);
79+
// Set blockArg to a strong local to retain to end of scope.
80+
id blockArg = [OCMArg invokeBlockWithArgs:@(NO), nil];
81+
OCMStub([engine waitForFirstFrame:3.0 callback:blockArg]);
7782
appDelegate.rootFlutterViewControllerGetter = ^{
7883
return viewController;
7984
};

0 commit comments

Comments
 (0)