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

Commit 5b9d74f

Browse files
authored
Turn off software rendering in iOS scenario golden tests (#55016)
Follow-up to #45093. Remove software rendering for the golden/screenshot compare iOS scenario tests. Throw an exception if this flag is passed into the test app. Delete `RenderingSelectionTest`. This did require updating some screenshots, so there are changes. Note, these golden tests are still not running on Impeller, but I'm going to follow-up in #55012. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
1 parent b9f9015 commit 5b9d74f

13 files changed

+10
-55
lines changed

testing/scenario_app/bin/run_ios_tests.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,6 @@ final _skipTestsForImpeller = [
381381
'ScenariosUITests/PlatformViewUITests/testPlatformView',
382382
'ScenariosUITests/PlatformViewWithNegativeOtherBackDropFilterTests/testPlatformView',
383383
'ScenariosUITests/PlatformViewWithOtherBackdropFilterTests/testPlatformView',
384-
'ScenariosUITests/RenderingSelectionTest/testSoftwareRendering',
385384
'ScenariosUITests/TwoPlatformViewClipPathTests/testPlatformView',
386385
'ScenariosUITests/TwoPlatformViewClipPathMultipleClipsTests/testPlatformView',
387386
'ScenariosUITests/TwoPlatformViewClipRectTests/testPlatformView',

testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
0DDEBC89258830B40065D0E8 /* SpawnEngineTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DDEBC88258830B40065D0E8 /* SpawnEngineTest.m */; };
2424
242F37A222E636DE001E83D4 /* ../../Flutter.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 246B4E4522E3B61000073EBF /* ../../Flutter.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
2525
242F37A322E636DE001E83D4 /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 246B4E4122E3B5F700073EBF /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
26-
246A6611252E693A00EAB0F3 /* RenderingSelectionTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 246A6610252E693A00EAB0F3 /* RenderingSelectionTest.m */; };
2726
246B4E4222E3B5F700073EBF /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 246B4E4122E3B5F700073EBF /* App.framework */; };
2827
246B4E4622E3B61000073EBF /* ../../Flutter.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 246B4E4522E3B61000073EBF /* ../../Flutter.xcframework */; };
2928
248D76CC22E388370012F0C1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 248D76CB22E388370012F0C1 /* AppDelegate.m */; };
@@ -197,7 +196,6 @@
197196
0D8470A3240F0B1F0030B565 /* StatusBarTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StatusBarTest.m; sourceTree = "<group>"; };
198197
0DB781FC22EA2C0300E9B371 /* FlutterViewControllerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FlutterViewControllerTest.m; sourceTree = "<group>"; };
199198
0DDEBC88258830B40065D0E8 /* SpawnEngineTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SpawnEngineTest.m; sourceTree = "<group>"; };
200-
246A6610252E693A00EAB0F3 /* RenderingSelectionTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RenderingSelectionTest.m; sourceTree = "<group>"; };
201199
246B4E4122E3B5F700073EBF /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = App.framework; sourceTree = "<group>"; };
202200
246B4E4522E3B61000073EBF /* ../../Flutter.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = ../../Flutter.xcframework; sourceTree = "<group>"; };
203201
248D76C722E388370012F0C1 /* Scenarios.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Scenarios.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -390,7 +388,6 @@
390388
68A5B63323EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m */,
391389
0D8470A2240F0B1F0030B565 /* StatusBarTest.h */,
392390
0D8470A3240F0B1F0030B565 /* StatusBarTest.m */,
393-
246A6610252E693A00EAB0F3 /* RenderingSelectionTest.m */,
394391
0DDEBC88258830B40065D0E8 /* SpawnEngineTest.m */,
395392
F26F15B7268B6B5500EC54D3 /* iPadGestureTests.m */,
396393
686383122AC202B700E27AAD /* AppExtensionTests.m */,
@@ -729,7 +726,6 @@
729726
248D76EF22E388380012F0C1 /* PlatformViewUITests.m in Sources */,
730727
0D8470A4240F0B1F0030B565 /* StatusBarTest.m in Sources */,
731728
F26F15B8268B6B5600EC54D3 /* iPadGestureTests.m in Sources */,
732-
246A6611252E693A00EAB0F3 /* RenderingSelectionTest.m in Sources */,
733729
4F06F1B32473296E000AF246 /* LocalizationInitializationTest.m in Sources */,
734730
686383132AC202B700E27AAD /* AppExtensionTests.m in Sources */,
735731
0DDEBC89258830B40065D0E8 /* SpawnEngineTest.m in Sources */,

testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,13 @@ @implementation AppDelegate
3737

3838
- (BOOL)application:(UIApplication*)application
3939
didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
40+
NSArray<NSString*>* processArguments = NSProcessInfo.processInfo.arguments;
41+
if ([processArguments containsObject:@"--enable-software-rendering"]) {
42+
@throw @"--enable-software-rendering is unsupported in iOS scenario tests";
43+
}
44+
4045
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
41-
if ([[[NSProcessInfo processInfo] arguments] containsObject:@"--maskview-blocking"]) {
46+
if ([processArguments containsObject:@"--maskview-blocking"]) {
4247
self.window.tintColor = UIColor.systemPinkColor;
4348
}
4449
NSDictionary<NSString*, NSString*>* launchArgsMap = @{
@@ -121,21 +126,21 @@ - (BOOL)application:(UIApplication*)application
121126
__block NSString* flutterViewControllerTestName = nil;
122127
[launchArgsMap
123128
enumerateKeysAndObjectsUsingBlock:^(NSString* argument, NSString* testName, BOOL* stop) {
124-
if ([[[NSProcessInfo processInfo] arguments] containsObject:argument]) {
129+
if ([processArguments containsObject:argument]) {
125130
flutterViewControllerTestName = testName;
126131
*stop = YES;
127132
}
128133
}];
129134
if (flutterViewControllerTestName) {
130135
[self setupFlutterViewControllerTest:flutterViewControllerTestName];
131-
} else if ([[[NSProcessInfo processInfo] arguments] containsObject:@"--screen-before-flutter"]) {
136+
} else if ([processArguments containsObject:@"--screen-before-flutter"]) {
132137
self.window.rootViewController = [[ScreenBeforeFlutter alloc] initWithEngineRunCompletion:nil];
133138
} else {
134139
self.window.rootViewController = [[UIViewController alloc] init];
135140
}
136141

137142
[self.window makeKeyAndVisible];
138-
if ([[[NSProcessInfo processInfo] arguments] containsObject:@"--with-continuous-texture"]) {
143+
if ([processArguments containsObject:@"--with-continuous-texture"]) {
139144
[ContinuousTexture
140145
registerWithRegistrar:[self registrarForPlugin:@"com.constant.firing.texture"]];
141146
}
@@ -213,16 +218,6 @@ - (void)setupFlutterViewControllerTest:(NSString*)scenarioIdentifier {
213218
}
214219

215220
self.window.rootViewController = rootViewController;
216-
217-
if ([[[NSProcessInfo processInfo] arguments] containsObject:@"--assert-ca-layer-type"]) {
218-
if ([[[NSProcessInfo processInfo] arguments] containsObject:@"--enable-software-rendering"]) {
219-
NSAssert([flutterViewController.view.layer isKindOfClass:[CALayer class]],
220-
@"Expected CALayer for software rendering.");
221-
} else {
222-
NSAssert([flutterViewController.view.layer isKindOfClass:[CAMetalLayer class]],
223-
@"Expected CAMetalLayer for non-software rendering.");
224-
}
225-
}
226221
}
227222

228223
@end

testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenPlatformViewTests.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ - (void)setUp {
3131
self.continueAfterFailure = NO;
3232

3333
self.application = [[XCUIApplication alloc] init];
34-
self.application.launchArguments = @[ self.manager.launchArg, @"--enable-software-rendering" ];
34+
self.application.launchArguments = @[ self.manager.launchArg ];
3535
[self.application launch];
3636
}
3737

testing/scenario_app/ios/Scenarios/ScenariosUITests/RenderingSelectionTest.m

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)