Turn off software rendering in iOS scenario golden tests (flutter/engine#55016)
Follow-up to https://github.com/flutter/engine/pull/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 https://github.com/flutter/engine/pull/55012. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
@@ -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',
|
||||
|
||||
@@ -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 */; };
|
||||
@@ -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; };
|
||||
@@ -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 */,
|
||||
@@ -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 */,
|
||||
|
||||
@@ -37,8 +37,13 @@
|
||||
|
||||
- (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 = @{
|
||||
@@ -121,21 +126,21 @@
|
||||
__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"]];
|
||||
}
|
||||
@@ -213,16 +218,6 @@
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
@@ -31,7 +31,7 @@ static const NSInteger kSecondsToWaitForPlatformView = 30;
|
||||
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];
|
||||
}
|
||||
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
// Copyright 2020 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Flutter/Flutter.h>
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
@interface RenderingSelectionTest : XCTestCase
|
||||
@property(nonatomic, strong) XCUIApplication* application;
|
||||
@end
|
||||
|
||||
@implementation RenderingSelectionTest
|
||||
|
||||
- (void)setUp {
|
||||
[super setUp];
|
||||
self.continueAfterFailure = NO;
|
||||
self.application = [[XCUIApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)testSoftwareRendering {
|
||||
self.application.launchArguments =
|
||||
@[ @"--animated-color-square", @"--assert-ca-layer-type", @"--enable-software-rendering" ];
|
||||
[self.application launch];
|
||||
|
||||
// App asserts that the rendering API is CALayer
|
||||
}
|
||||
|
||||
- (void)testMetalRendering {
|
||||
self.application.launchArguments = @[ @"--animated-color-square", @"--assert-ca-layer-type" ];
|
||||
[self.application launch];
|
||||
|
||||
// App asserts that the rendering API is CAMetalLayer
|
||||
}
|
||||
@end
|
||||
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 47 KiB |
@@ -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 \
|
||||
|
||||