diff --git a/testing/scenario_app/bin/run_ios_tests.dart b/testing/scenario_app/bin/run_ios_tests.dart index 32a9d5b1db1c4..f3e29789cd919 100644 --- a/testing/scenario_app/bin/run_ios_tests.dart +++ b/testing/scenario_app/bin/run_ios_tests.dart @@ -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', diff --git a/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj b/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj index 7f8c0bac1756a..10b276c530eb7 100644 --- a/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj +++ b/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj @@ -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 = ""; }; 0DB781FC22EA2C0300E9B371 /* FlutterViewControllerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FlutterViewControllerTest.m; sourceTree = ""; }; 0DDEBC88258830B40065D0E8 /* SpawnEngineTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SpawnEngineTest.m; sourceTree = ""; }; - 246A6610252E693A00EAB0F3 /* RenderingSelectionTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RenderingSelectionTest.m; sourceTree = ""; }; 246B4E4122E3B5F700073EBF /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = App.framework; sourceTree = ""; }; 246B4E4522E3B61000073EBF /* ../../Flutter.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = ../../Flutter.xcframework; sourceTree = ""; }; 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 */, diff --git a/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m b/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m index c7f86cf200c2b..298f501a9ba12 100644 --- a/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m +++ b/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m @@ -37,8 +37,13 @@ @implementation AppDelegate - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { + NSArray* 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* launchArgsMap = @{ @@ -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"]]; } @@ -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 diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenPlatformViewTests.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenPlatformViewTests.m index 7199fa2600e86..cb82f245411df 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenPlatformViewTests.m +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenPlatformViewTests.m @@ -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]; } diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/RenderingSelectionTest.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/RenderingSelectionTest.m deleted file mode 100644 index 0f52816b60e5c..0000000000000 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/RenderingSelectionTest.m +++ /dev/null @@ -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 -#import - -@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 diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_cliprect_with_transform_iPhone SE (3rd generation)_17.0_simulator.png b/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_cliprect_with_transform_iPhone SE (3rd generation)_17.0_simulator.png index 80d7b7da3739c..92f213800a468 100644 Binary files a/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_cliprect_with_transform_iPhone SE (3rd generation)_17.0_simulator.png and b/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_cliprect_with_transform_iPhone SE (3rd generation)_17.0_simulator.png differ diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_cliprect_with_transform_multiple_clips_iPhone SE (3rd generation)_17.0_simulator.png b/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_cliprect_with_transform_multiple_clips_iPhone SE (3rd generation)_17.0_simulator.png index 7504b1f0257c2..c8bba3d1deebb 100644 Binary files a/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_cliprect_with_transform_multiple_clips_iPhone SE (3rd generation)_17.0_simulator.png and b/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_cliprect_with_transform_multiple_clips_iPhone SE (3rd generation)_17.0_simulator.png differ diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_large_cliprrect_with_transform_iPhone SE (3rd generation)_17.0_simulator.png b/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_large_cliprrect_with_transform_iPhone SE (3rd generation)_17.0_simulator.png index 177d0c817fdb0..0a9acfb0aa8a7 100644 Binary files a/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_large_cliprrect_with_transform_iPhone SE (3rd generation)_17.0_simulator.png and b/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_large_cliprrect_with_transform_iPhone SE (3rd generation)_17.0_simulator.png differ diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_opacity_iPhone SE (3rd generation)_17.0_simulator.png b/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_opacity_iPhone SE (3rd generation)_17.0_simulator.png index 48289b61e86ef..169ff027669b7 100644 Binary files a/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_opacity_iPhone SE (3rd generation)_17.0_simulator.png and b/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_opacity_iPhone SE (3rd generation)_17.0_simulator.png differ diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_with_negative_backdrop_filter_iPhone SE (3rd generation)_17.0_simulator.png b/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_with_negative_backdrop_filter_iPhone SE (3rd generation)_17.0_simulator.png index 5a74b97d05ac2..0bd2a535d7355 100644 Binary files a/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_with_negative_backdrop_filter_iPhone SE (3rd generation)_17.0_simulator.png and b/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_with_negative_backdrop_filter_iPhone SE (3rd generation)_17.0_simulator.png differ diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_with_other_backdrop_filter_iPhone SE (3rd generation)_17.0_simulator.png b/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_with_other_backdrop_filter_iPhone SE (3rd generation)_17.0_simulator.png index b2453349f333f..f9cc53a9613d0 100644 Binary files a/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_with_other_backdrop_filter_iPhone SE (3rd generation)_17.0_simulator.png and b/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_with_other_backdrop_filter_iPhone SE (3rd generation)_17.0_simulator.png differ diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_two_platform_views_with_other_backdrop_filter_iPhone SE (3rd generation)_17.0_simulator.png b/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_two_platform_views_with_other_backdrop_filter_iPhone SE (3rd generation)_17.0_simulator.png index 4666602e18379..50462119ef9ce 100644 Binary files a/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_two_platform_views_with_other_backdrop_filter_iPhone SE (3rd generation)_17.0_simulator.png and b/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_two_platform_views_with_other_backdrop_filter_iPhone SE (3rd generation)_17.0_simulator.png differ diff --git a/testing/scenario_app/run_ios_tests.sh b/testing/scenario_app/run_ios_tests.sh index 66b13fddb0c52..5a2067cc9ed75 100755 --- a/testing/scenario_app/run_ios_tests.sh +++ b/testing/scenario_app/run_ios_tests.sh @@ -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 \