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

Turn off software rendering in iOS scenario golden tests #55016

Merged
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion testing/scenario_app/bin/run_ios_tests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,6 @@ final _skipTestsForImpeller = [
'ScenariosUITests/PlatformViewUITests/testPlatformView',
'ScenariosUITests/PlatformViewWithNegativeOtherBackDropFilterTests/testPlatformView',
'ScenariosUITests/PlatformViewWithOtherBackdropFilterTests/testPlatformView',
'ScenariosUITests/RenderingSelectionTest/testSoftwareRendering',
'ScenariosUITests/TwoPlatformViewClipPathTests/testPlatformView',
'ScenariosUITests/TwoPlatformViewClipPathMultipleClipsTests/testPlatformView',
'ScenariosUITests/TwoPlatformViewClipRectTests/testPlatformView',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
0DDEBC89258830B40065D0E8 /* SpawnEngineTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DDEBC88258830B40065D0E8 /* SpawnEngineTest.m */; };
242F37A222E636DE001E83D4 /* ../../Flutter.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 246B4E4522E3B61000073EBF /* ../../Flutter.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
242F37A322E636DE001E83D4 /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 246B4E4122E3B5F700073EBF /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
246A6611252E693A00EAB0F3 /* RenderingSelectionTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 246A6610252E693A00EAB0F3 /* RenderingSelectionTest.m */; };
246B4E4222E3B5F700073EBF /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 246B4E4122E3B5F700073EBF /* App.framework */; };
246B4E4622E3B61000073EBF /* ../../Flutter.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 246B4E4522E3B61000073EBF /* ../../Flutter.xcframework */; };
248D76CC22E388370012F0C1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 248D76CB22E388370012F0C1 /* AppDelegate.m */; };
Expand Down Expand Up @@ -197,7 +196,6 @@
0D8470A3240F0B1F0030B565 /* StatusBarTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StatusBarTest.m; sourceTree = "<group>"; };
0DB781FC22EA2C0300E9B371 /* FlutterViewControllerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FlutterViewControllerTest.m; sourceTree = "<group>"; };
0DDEBC88258830B40065D0E8 /* SpawnEngineTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SpawnEngineTest.m; sourceTree = "<group>"; };
246A6610252E693A00EAB0F3 /* RenderingSelectionTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RenderingSelectionTest.m; sourceTree = "<group>"; };
246B4E4122E3B5F700073EBF /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = App.framework; sourceTree = "<group>"; };
246B4E4522E3B61000073EBF /* ../../Flutter.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = ../../Flutter.xcframework; sourceTree = "<group>"; };
248D76C722E388370012F0C1 /* Scenarios.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Scenarios.app; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -390,7 +388,6 @@
68A5B63323EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m */,
0D8470A2240F0B1F0030B565 /* StatusBarTest.h */,
0D8470A3240F0B1F0030B565 /* StatusBarTest.m */,
246A6610252E693A00EAB0F3 /* RenderingSelectionTest.m */,
0DDEBC88258830B40065D0E8 /* SpawnEngineTest.m */,
F26F15B7268B6B5500EC54D3 /* iPadGestureTests.m */,
686383122AC202B700E27AAD /* AppExtensionTests.m */,
Expand Down Expand Up @@ -729,7 +726,6 @@
248D76EF22E388380012F0C1 /* PlatformViewUITests.m in Sources */,
0D8470A4240F0B1F0030B565 /* StatusBarTest.m in Sources */,
F26F15B8268B6B5600EC54D3 /* iPadGestureTests.m in Sources */,
246A6611252E693A00EAB0F3 /* RenderingSelectionTest.m in Sources */,
4F06F1B32473296E000AF246 /* LocalizationInitializationTest.m in Sources */,
686383132AC202B700E27AAD /* AppExtensionTests.m in Sources */,
0DDEBC89258830B40065D0E8 /* SpawnEngineTest.m in Sources */,
Expand Down
23 changes: 9 additions & 14 deletions testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,13 @@ @implementation AppDelegate

- (BOOL)application:(UIApplication*)application
didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
NSArray<NSString*>* processArguments = NSProcessInfo.processInfo.arguments;
if ([processArguments containsObject:@"--enable-software-rendering"]) {
@throw @"--enable-software-rendering is unsupported in iOS scenario tests";
}

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
if ([[[NSProcessInfo processInfo] arguments] containsObject:@"--maskview-blocking"]) {
if ([processArguments containsObject:@"--maskview-blocking"]) {
self.window.tintColor = UIColor.systemPinkColor;
}
NSDictionary<NSString*, NSString*>* launchArgsMap = @{
Expand Down Expand Up @@ -121,21 +126,21 @@ - (BOOL)application:(UIApplication*)application
__block NSString* flutterViewControllerTestName = nil;
[launchArgsMap
enumerateKeysAndObjectsUsingBlock:^(NSString* argument, NSString* testName, BOOL* stop) {
if ([[[NSProcessInfo processInfo] arguments] containsObject:argument]) {
if ([processArguments containsObject:argument]) {
flutterViewControllerTestName = testName;
*stop = YES;
}
}];
if (flutterViewControllerTestName) {
[self setupFlutterViewControllerTest:flutterViewControllerTestName];
} else if ([[[NSProcessInfo processInfo] arguments] containsObject:@"--screen-before-flutter"]) {
} else if ([processArguments containsObject:@"--screen-before-flutter"]) {
self.window.rootViewController = [[ScreenBeforeFlutter alloc] initWithEngineRunCompletion:nil];
} else {
self.window.rootViewController = [[UIViewController alloc] init];
}

[self.window makeKeyAndVisible];
if ([[[NSProcessInfo processInfo] arguments] containsObject:@"--with-continuous-texture"]) {
if ([processArguments containsObject:@"--with-continuous-texture"]) {
[ContinuousTexture
registerWithRegistrar:[self registrarForPlugin:@"com.constant.firing.texture"]];
}
Expand Down Expand Up @@ -213,16 +218,6 @@ - (void)setupFlutterViewControllerTest:(NSString*)scenarioIdentifier {
}

self.window.rootViewController = rootViewController;

if ([[[NSProcessInfo processInfo] arguments] containsObject:@"--assert-ca-layer-type"]) {
if ([[[NSProcessInfo processInfo] arguments] containsObject:@"--enable-software-rendering"]) {
NSAssert([flutterViewController.view.layer isKindOfClass:[CALayer class]],
@"Expected CALayer for software rendering.");
} else {
NSAssert([flutterViewController.view.layer isKindOfClass:[CAMetalLayer class]],
@"Expected CAMetalLayer for non-software rendering.");
}
}
}

@end
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ - (void)setUp {
self.continueAfterFailure = NO;

self.application = [[XCUIApplication alloc] init];
self.application.launchArguments = @[ self.manager.launchArg, @"--enable-software-rendering" ];
self.application.launchArguments = @[ self.manager.launchArg ];
[self.application launch];
}

Expand Down

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion testing/scenario_app/run_ios_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ if set -o pipefail && xcodebuild -sdk iphonesimulator \
-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/TwoPlatformViewClipPathMultipleClipsTests/testPlatformView \
-skip-testing ScenariosUITests/TwoPlatformViewClipRectTests/testPlatformView \
Expand Down