diff --git a/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj b/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj index 81e3520794ddd..ec69054a447da 100644 --- a/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj +++ b/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj @@ -32,6 +32,8 @@ 248D76EF22E388380012F0C1 /* PlatformViewUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 248D76EE22E388380012F0C1 /* PlatformViewUITests.m */; }; 248FDFC422FE7CD0009CC7CD /* FlutterEngineTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 248FDFC322FE7CD0009CC7CD /* FlutterEngineTest.m */; }; 24F1FB89230B4579005ACE7C /* TextPlatformView.m in Sources */ = {isa = PBXBuildFile; fileRef = 24F1FB87230B4579005ACE7C /* TextPlatformView.m */; }; + 3BFD97202A990CF50094F51B /* golden_bogus_font_text_impeller_iPhone SE (3rd generation)_16.2_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 3BFD971E2A990CF40094F51B /* golden_bogus_font_text_impeller_iPhone SE (3rd generation)_16.2_simulator.png */; }; + 3BFD97212A990CF50094F51B /* golden_spawn_engine_works_impeller_iPhone SE (3rd generation)_16.2_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 3BFD971F2A990CF40094F51B /* golden_spawn_engine_works_impeller_iPhone SE (3rd generation)_16.2_simulator.png */; }; 4F06F1B32473296E000AF246 /* LocalizationInitializationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F06F1B124731F66000AF246 /* LocalizationInitializationTest.m */; }; 6402EBD124147BDA00987DCB /* UnobstructedPlatformViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6402EBD024147BDA00987DCB /* UnobstructedPlatformViewTests.m */; }; 6816DB9E231750ED00A51400 /* GoldenPlatformViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6816DB9D231750ED00A51400 /* GoldenPlatformViewTests.m */; }; @@ -150,6 +152,8 @@ 24D47D1E230CA4480069DD5E /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 24F1FB87230B4579005ACE7C /* TextPlatformView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TextPlatformView.m; sourceTree = ""; }; 24F1FB88230B4579005ACE7C /* TextPlatformView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextPlatformView.h; sourceTree = ""; }; + 3BFD971E2A990CF40094F51B /* golden_bogus_font_text_impeller_iPhone SE (3rd generation)_16.2_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_bogus_font_text_impeller_iPhone SE (3rd generation)_16.2_simulator.png"; sourceTree = ""; }; + 3BFD971F2A990CF40094F51B /* golden_spawn_engine_works_impeller_iPhone SE (3rd generation)_16.2_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_spawn_engine_works_impeller_iPhone SE (3rd generation)_16.2_simulator.png"; sourceTree = ""; }; 4F06F1B124731F66000AF246 /* LocalizationInitializationTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocalizationInitializationTest.m; sourceTree = ""; }; 6402EBD024147BDA00987DCB /* UnobstructedPlatformViewTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UnobstructedPlatformViewTests.m; sourceTree = ""; }; 6816DB9C231750ED00A51400 /* GoldenPlatformViewTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GoldenPlatformViewTests.h; sourceTree = ""; }; @@ -310,6 +314,8 @@ F7B464DC2759D02B00079189 /* Goldens */ = { isa = PBXGroup; children = ( + 3BFD971E2A990CF40094F51B /* golden_bogus_font_text_impeller_iPhone SE (3rd generation)_16.2_simulator.png */, + 3BFD971F2A990CF40094F51B /* golden_spawn_engine_works_impeller_iPhone SE (3rd generation)_16.2_simulator.png */, 68D93AED2A46097E0054AB6D /* golden_platform_view_with_negative_backdrop_filter_iPhone SE (3rd generation)_16.2_simulator.png */, 6860CE242A01B2FF00B68EC5 /* golden_two_platform_view_clip_path_iPhone SE (3rd generation)_16.2_simulator.png */, 6860CE232A01B2FF00B68EC5 /* golden_two_platform_view_clip_rect_iPhone SE (3rd generation)_16.2_simulator.png */, @@ -472,6 +478,7 @@ 684FFF8F29F9C10700281002 /* golden_platform_view_with_other_backdrop_filter_iPhone SE (3rd generation)_16.2_simulator.png in Resources */, 6860CE262A01B2FF00B68EC5 /* golden_two_platform_view_clip_rect_iPhone SE (3rd generation)_16.2_simulator.png in Resources */, 684FFF8A29F9C10700281002 /* golden_platform_view_clippath_with_transform_iPhone SE (3rd generation)_16.2_simulator.png in Resources */, + 3BFD97212A990CF50094F51B /* golden_spawn_engine_works_impeller_iPhone SE (3rd generation)_16.2_simulator.png in Resources */, 684FFF8429F9C10700281002 /* golden_non_full_screen_flutter_view_platform_view_iPhone SE (3rd generation)_16.2_simulator.png in Resources */, 684FFF7C29F9C10700281002 /* golden_platform_view_cliprrect_with_transform_iPhone SE (3rd generation)_16.2_simulator.png in Resources */, 684FFF7F29F9C10700281002 /* golden_platform_view_rotate_iPhone SE (3rd generation)_16.2_simulator.png in Resources */, @@ -481,6 +488,7 @@ 684FFF7E29F9C10700281002 /* golden_platform_view_opacity_iPhone SE (3rd generation)_16.2_simulator.png in Resources */, 684FFF8729F9C10700281002 /* golden_platform_view_multiple_iPhone SE (3rd generation)_16.2_simulator.png in Resources */, 68D93AEE2A46097E0054AB6D /* golden_platform_view_with_negative_backdrop_filter_iPhone SE (3rd generation)_16.2_simulator.png in Resources */, + 3BFD97202A990CF50094F51B /* golden_bogus_font_text_impeller_iPhone SE (3rd generation)_16.2_simulator.png in Resources */, 684FFF8D29F9C10700281002 /* golden_platform_view_large_cliprrect_iPhone SE (3rd generation)_16.2_simulator.png in Resources */, 684FFF8329F9C10700281002 /* golden_platform_view_transform_iPhone SE (3rd generation)_16.2_simulator.png in Resources */, 684FFF8B29F9C10700281002 /* golden_platform_view_clippath_iPhone SE (3rd generation)_16.2_simulator.png in Resources */, diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m index 78bda2122b80f..96f65fe760491 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m @@ -55,7 +55,18 @@ - (instancetype)initWithLaunchArg:(NSString*)launchArg { }; }); _identifier = launchArgsMap[launchArg]; - NSString* prefix = [NSString stringWithFormat:@"golden_%@_", _identifier]; + + NSString* impeller = @""; + NSNumber* enableImpeller = [[NSBundle bundleWithIdentifier:@"dev.flutter.ScenariosUITests"] + objectForInfoDictionaryKey:@"FLTEnableImpeller"]; + if (enableImpeller != nil) { + impeller = enableImpeller.boolValue ? @"impeller_" : @""; + } else { + NSLog(@"FLTEnableImpeller was nil"); + } + NSLog(@"impeller = '%@'", impeller); + + NSString* prefix = [NSString stringWithFormat:@"golden_%@_%@", _identifier, impeller]; _goldenImage = [[GoldenImage alloc] initWithGoldenNamePrefix:prefix]; _launchArg = launchArg; } @@ -65,8 +76,8 @@ - (instancetype)initWithLaunchArg:(NSString*)launchArg { - (void)checkGoldenForTest:(XCTestCase*)test { XCUIScreenshot* screenshot = [[XCUIScreen mainScreen] screenshot]; if (!_goldenImage.image) { - XCTAttachment* attachment = [XCTAttachment attachmentWithScreenshot:screenshot]; - attachment.name = [_goldenImage.goldenName stringByAppendingString:@"_new"]; + XCTAttachment* attachment = [XCTAttachment attachmentWithScreenshot:screenshot.image]; + attachment.name = [_goldenImage.goldenName stringByAppendingString:@"_new.png"]; attachment.lifetime = XCTAttachmentLifetimeKeepAlways; [test addAttachment:attachment]; // Instead of XCTFail because that definition changed between Xcode 11 and 12 whereas this impl @@ -79,7 +90,7 @@ - (void)checkGoldenForTest:(XCTestCase*)test { if (![_goldenImage compareGoldenToImage:screenshot.image]) { XCTAttachment* screenshotAttachment = [XCTAttachment attachmentWithImage:screenshot.image]; - screenshotAttachment.name = [_goldenImage.goldenName stringByAppendingString:@"_actual"]; + screenshotAttachment.name = [_goldenImage.goldenName stringByAppendingString:@"_actual.png"]; screenshotAttachment.lifetime = XCTAttachmentLifetimeKeepAlways; [test addAttachment:screenshotAttachment]; diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/PlatformViewGestureRecognizerTests.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/PlatformViewGestureRecognizerTests.m index 18bf5574063b7..5bd831f0948b5 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/PlatformViewGestureRecognizerTests.m +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/PlatformViewGestureRecognizerTests.m @@ -18,8 +18,7 @@ - (void)setUp { - (void)testRejectPolicyUtilTouchesEnded { XCUIApplication* app = [[XCUIApplication alloc] init]; - app.launchArguments = - @[ @"--gesture-reject-after-touches-ended", @"--enable-software-rendering" ]; + app.launchArguments = @[ @"--gesture-reject-after-touches-ended" ]; [app launch]; NSPredicate* predicateToFindPlatformView = diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/SpawnEngineTest.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/SpawnEngineTest.m index 2e529965e9bd9..f00a8c988bdfd 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/SpawnEngineTest.m +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/SpawnEngineTest.m @@ -13,7 +13,7 @@ - (void)testSpawnEngineWorks { self.continueAfterFailure = NO; XCUIApplication* application = [[XCUIApplication alloc] init]; - application.launchArguments = @[ @"--spawn-engine-works", @"--enable-software-rendering" ]; + application.launchArguments = @[ @"--spawn-engine-works" ]; [application launch]; XCUIElement* addTextField = application.textFields[@"ready"]; diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/UnobstructedPlatformViewTests.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/UnobstructedPlatformViewTests.m index 3397e4b1effa2..2e9ed55dc6195 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/UnobstructedPlatformViewTests.m +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/UnobstructedPlatformViewTests.m @@ -23,8 +23,7 @@ - (void)setUp { // +---+ - (void)testNoOverlay { XCUIApplication* app = [[XCUIApplication alloc] init]; - app.launchArguments = - @[ @"--platform-view-no-overlay-intersection", @"--enable-software-rendering" ]; + app.launchArguments = @[ @"--platform-view-no-overlay-intersection" ]; [app launch]; XCUIElement* platform_view = app.otherElements[@"platform_view[0]"]; diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_bogus_font_text_impeller_iPhone SE (3rd generation)_16.2_simulator.png b/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_bogus_font_text_impeller_iPhone SE (3rd generation)_16.2_simulator.png new file mode 100644 index 0000000000000..f14162a33b707 Binary files /dev/null and b/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_bogus_font_text_impeller_iPhone SE (3rd generation)_16.2_simulator.png differ diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_spawn_engine_works_impeller_iPhone SE (3rd generation)_16.2_simulator.png b/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_spawn_engine_works_impeller_iPhone SE (3rd generation)_16.2_simulator.png new file mode 100644 index 0000000000000..f14162a33b707 Binary files /dev/null and b/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_spawn_engine_works_impeller_iPhone SE (3rd generation)_16.2_simulator.png differ diff --git a/testing/scenario_app/run_ios_tests.sh b/testing/scenario_app/run_ios_tests.sh index f91a875feea22..3f730deaf3bba 100755 --- a/testing/scenario_app/run_ios_tests.sh +++ b/testing/scenario_app/run_ios_tests.sh @@ -85,7 +85,30 @@ if set -o pipefail && xcodebuild -sdk iphonesimulator \ -destination 'platform=iOS Simulator,OS=16.2,name=iPhone SE (3rd generation)' \ clean test \ FLUTTER_ENGINE="$FLUTTER_ENGINE" \ - -skip-testing "ScenariosUITests/BogusFontTextTest/testFontRenderingWhenSuppliedWithBogusFont,ScenarioUITests/PlatformViewMutationLargeClipRRectWithTransformTests/testPlatformView,ScenarioUITests/MultiplePlatformViewsTest/testPlatformView,ScenarioUITests/PlatformViewWithOtherBackdropFilterTests/testPlatformView,ScenarioUITests/TwoPlatformViewsWithOtherBackDropFilterTests/testPlatformView,ScenarioUITests/PlatformViewMutationClipPathTests/testPlatformView,ScenarioUITests/PlatformViewMutationClipRectWithTransformTests/testPlatformView,ScenarioUITests/PlatformViewGestureRecognizerTests/testRejectPolicyUtilTouchesEnded,ScenarioUITests/NonFullScreenFlutterViewPlatformViewUITests/testPlatformView,ScenarioUITests/PlatformViewUITests/testPlatformView,ScenarioUITests/PlatformViewMutationClipRectAfterMovedTests/testPlatformView,ScenarioUITests/PlatformViewMutationClipRectTests/testPlatformView,ScenarioUITests/TwoPlatformViewClipPathTests/testPlatformView,ScenarioUITests/MultiplePlatformViewsBackgroundForegroundTest/testPlatformView,ScenarioUITests/PlatformViewMutationOpacityTests/testPlatformView,ScenarioUITests/PlatformViewMutationClipRRectTests/testPlatformView,ScenarioUITests/PlatformViewMutationClipRRectWithTransformTests/testPlatformView,ScenarioUITests/PlatformViewMutationClipPathWithTransformTests/testPlatformView,ScenarioUITests/SpawnEngineTest/testSpawnEngineWorks,ScenarioUITests/PlatformViewRotation/testPlatformView,ScenarioUITests/TwoPlatformViewClipRRectTests/testPlatformView,ScenarioUITests/TwoPlatformViewClipRectTests/testPlatformView,ScenarioUITests/RenderingSelectionTest/testSoftwareRendering,ScenarioUITests/UnobstructedPlatformViewTests/testMultiplePlatformViewsWithOverlays,ScenarioUITests/UnobstructedPlatformViewTests/testNoOverlay,ScenarioUITests/PlatformViewMutationTransformTests/testPlatformView,ScenarioUITests/PlatformViewMutationLargeClipRRectTests/testPlatformView,ScenarioUITests/PlatformViewWithNegativeOtherBackDropFilterTests/testPlatformView" \ + -skip-testing ScenariosUITests/MultiplePlatformViewsBackgroundForegroundTest/testPlatformView \ + -skip-testing ScenariosUITests/MultiplePlatformViewsTest/testPlatformView \ + -skip-testing ScenariosUITests/NonFullScreenFlutterViewPlatformViewUITests/testPlatformView \ + -skip-testing ScenariosUITests/PlatformViewMutationClipPathTests/testPlatformView \ + -skip-testing ScenariosUITests/PlatformViewMutationClipPathWithTransformTests/testPlatformView \ + -skip-testing ScenariosUITests/PlatformViewMutationClipRectAfterMovedTests/testPlatformView \ + -skip-testing ScenariosUITests/PlatformViewMutationClipRectTests/testPlatformView \ + -skip-testing ScenariosUITests/PlatformViewMutationClipRectWithTransformTests/testPlatformView \ + -skip-testing ScenariosUITests/PlatformViewMutationClipRRectTests/testPlatformView \ + -skip-testing ScenariosUITests/PlatformViewMutationClipRRectWithTransformTests/testPlatformView \ + -skip-testing ScenariosUITests/PlatformViewMutationLargeClipRRectTests/testPlatformView \ + -skip-testing ScenariosUITests/PlatformViewMutationLargeClipRRectWithTransformTests/testPlatformView \ + -skip-testing ScenariosUITests/PlatformViewMutationOpacityTests/testPlatformView \ + -skip-testing ScenariosUITests/PlatformViewMutationTransformTests/testPlatformView \ + -skip-testing ScenariosUITests/PlatformViewRotation/testPlatformView \ + -skip-testing ScenariosUITests/PlatformViewUITests/testPlatformView \ + -skip-testing ScenariosUITests/PlatformViewWithNegativeOtherBackDropFilterTests/testPlatformView \ + -skip-testing ScenariosUITests/PlatformViewWithOtherBackdropFilterTests/testPlatformView \ + -skip-testing ScenariosUITests/RenderingSelectionTest/testSoftwareRendering \ + -skip-testing ScenariosUITests/TwoPlatformViewClipPathTests/testPlatformView \ + -skip-testing ScenariosUITests/TwoPlatformViewClipRectTests/testPlatformView \ + -skip-testing ScenariosUITests/TwoPlatformViewClipRRectTests/testPlatformView \ + -skip-testing ScenariosUITests/TwoPlatformViewsWithOtherBackDropFilterTests/testPlatformView \ + -skip-testing ScenariosUITests/UnobstructedPlatformViewTests/testMultiplePlatformViewsWithOverlays \ INFOPLIST_FILE="Scenarios/Info_Impeller.plist"; then # Plist with FLTEnableImpeller=YES echo "test success." else