Add a golden scenario test for fallback font rendering on iOS take 3 (#22736)
1
testing/scenario_app/.gitignore
vendored
@ -3,6 +3,7 @@ pubspec.lock # This only has local dependencies in it.
|
||||
build/
|
||||
|
||||
ios/Scenarios/*.framework/
|
||||
ios/Scenarios/*.xcframework/
|
||||
android/app/libs/flutter.jar
|
||||
android/app/src/main/jniLibs/arm64-v8a/libapp.so
|
||||
android/gradle-home/.cache
|
||||
|
||||
@ -7,11 +7,13 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
0A02E8F724EFAD27002D54E5 /* BogusFontTextTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A02E8F624EFAD27002D54E5 /* BogusFontTextTest.m */; };
|
||||
0A42BFB42447E179007E212E /* TextSemanticsFocusTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A42BFB32447E179007E212E /* TextSemanticsFocusTest.m */; };
|
||||
0A57B3BD2323C4BD00DD9521 /* ScreenBeforeFlutter.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A57B3BC2323C4BD00DD9521 /* ScreenBeforeFlutter.m */; };
|
||||
0A57B3BF2323C74200DD9521 /* FlutterEngine+ScenariosTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A57B3BE2323C74200DD9521 /* FlutterEngine+ScenariosTest.m */; };
|
||||
0A57B3C22323D2D700DD9521 /* AppLifecycleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A57B3C12323D2D700DD9521 /* AppLifecycleTests.m */; };
|
||||
0A97D7C024BA937000050525 /* FlutterViewControllerInitialRouteTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A97D7BF24BA937000050525 /* FlutterViewControllerInitialRouteTest.m */; };
|
||||
0AC83146256E534E00DAE6BE /* golden_bogus_font_text_iPhone 8_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 0AC83145256E534E00DAE6BE /* golden_bogus_font_text_iPhone 8_simulator.png */; };
|
||||
0D14A3FE239743190013D873 /* golden_platform_view_rotate_iPhone SE_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 0D14A3FD239743190013D873 /* golden_platform_view_rotate_iPhone SE_simulator.png */; };
|
||||
0D8470A4240F0B1F0030B565 /* StatusBarTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D8470A3240F0B1F0030B565 /* StatusBarTest.m */; };
|
||||
0DB781EF22E931BE00E9B371 /* Flutter.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 246B4E4522E3B61000073EBF /* Flutter.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
@ -33,7 +35,6 @@
|
||||
248D76EF22E388380012F0C1 /* PlatformViewUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 248D76EE22E388380012F0C1 /* PlatformViewUITests.m */; };
|
||||
248FDFC422FE7CD0009CC7CD /* FlutterEngineTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 248FDFC322FE7CD0009CC7CD /* FlutterEngineTest.m */; };
|
||||
24D47D1B230C79840069DD5E /* golden_platform_view_D211AP.png in Resources */ = {isa = PBXBuildFile; fileRef = 24D47D1A230C79840069DD5E /* golden_platform_view_D211AP.png */; };
|
||||
24D47D1D230CA2700069DD5E /* golden_platform_view_iPhone SE_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 24D47D1C230CA2700069DD5E /* golden_platform_view_iPhone SE_simulator.png */; };
|
||||
24F1FB89230B4579005ACE7C /* TextPlatformView.m in Sources */ = {isa = PBXBuildFile; fileRef = 24F1FB87230B4579005ACE7C /* TextPlatformView.m */; };
|
||||
3DEF491223C3BE6500184216 /* golden_platform_view_clippath_iPhone 8_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE09E8B23C010BC006C9851 /* golden_platform_view_clippath_iPhone 8_simulator.png */; };
|
||||
3DEF491323C3BE6500184216 /* golden_platform_view_cliprect_iPhone 8_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE09E9223C010BD006C9851 /* golden_platform_view_cliprect_iPhone 8_simulator.png */; };
|
||||
@ -45,17 +46,11 @@
|
||||
3DEF491923C3BE6500184216 /* golden_platform_view_rotate_iPhone 8_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE09E8E23C010BD006C9851 /* golden_platform_view_rotate_iPhone 8_simulator.png */; };
|
||||
3DEF491A23C3BE6500184216 /* golden_platform_view_transform_iPhone 8_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE09E9123C010BD006C9851 /* golden_platform_view_transform_iPhone 8_simulator.png */; };
|
||||
4F06F1B32473296E000AF246 /* LocalizationInitializationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F06F1B124731F66000AF246 /* LocalizationInitializationTest.m */; };
|
||||
59A97FD8236A49D300B4C066 /* golden_platform_view_multiple_iPhone SE_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 59A97FD7236A49D300B4C066 /* golden_platform_view_multiple_iPhone SE_simulator.png */; };
|
||||
59A97FDA236B984300B4C066 /* golden_platform_view_multiple_background_foreground_iPhone SE_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 59A97FD9236B984300B4C066 /* golden_platform_view_multiple_background_foreground_iPhone SE_simulator.png */; };
|
||||
6402EBD124147BDA00987DCB /* UnobstructedPlatformViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6402EBD024147BDA00987DCB /* UnobstructedPlatformViewTests.m */; };
|
||||
6816DB9E231750ED00A51400 /* GoldenPlatformViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6816DB9D231750ED00A51400 /* GoldenPlatformViewTests.m */; };
|
||||
6816DBA12317573300A51400 /* GoldenImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 6816DBA02317573300A51400 /* GoldenImage.m */; };
|
||||
6816DBA42318358200A51400 /* PlatformViewGoldenTestManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6816DBA32318358200A51400 /* PlatformViewGoldenTestManager.m */; };
|
||||
6816DBAA2318696600A51400 /* golden_platform_view_clippath_iPhone SE_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 6816DBA52318696600A51400 /* golden_platform_view_clippath_iPhone SE_simulator.png */; };
|
||||
6816DBAB2318696600A51400 /* golden_platform_view_transform_iPhone SE_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 6816DBA62318696600A51400 /* golden_platform_view_transform_iPhone SE_simulator.png */; };
|
||||
6816DBAC2318696600A51400 /* golden_platform_view_opacity_iPhone SE_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 6816DBA72318696600A51400 /* golden_platform_view_opacity_iPhone SE_simulator.png */; };
|
||||
6816DBAD2318696600A51400 /* golden_platform_view_cliprect_iPhone SE_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 6816DBA82318696600A51400 /* golden_platform_view_cliprect_iPhone SE_simulator.png */; };
|
||||
6816DBAE2318696600A51400 /* golden_platform_view_cliprrect_iPhone SE_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 6816DBA92318696600A51400 /* golden_platform_view_cliprrect_iPhone SE_simulator.png */; };
|
||||
6816DBA42318358200A51400 /* GoldenTestManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6816DBA32318358200A51400 /* GoldenTestManager.m */; };
|
||||
68A5B63423EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 68A5B63323EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m */; };
|
||||
68D4017D2564859300ECD91A /* ContinuousTexture.m in Sources */ = {isa = PBXBuildFile; fileRef = 68D4017C2564859300ECD91A /* ContinuousTexture.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
@ -115,6 +110,7 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
0A02E8F624EFAD27002D54E5 /* BogusFontTextTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BogusFontTextTest.m; sourceTree = "<group>"; };
|
||||
0A42BFB32447E179007E212E /* TextSemanticsFocusTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TextSemanticsFocusTest.m; sourceTree = "<group>"; };
|
||||
0A42BFB52447E19F007E212E /* TextSemanticsFocusTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TextSemanticsFocusTest.h; sourceTree = "<group>"; };
|
||||
0A57B3BB2323C4BD00DD9521 /* ScreenBeforeFlutter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ScreenBeforeFlutter.h; sourceTree = "<group>"; };
|
||||
@ -123,6 +119,7 @@
|
||||
0A57B3C02323C74D00DD9521 /* FlutterEngine+ScenariosTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FlutterEngine+ScenariosTest.h"; sourceTree = "<group>"; };
|
||||
0A57B3C12323D2D700DD9521 /* AppLifecycleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppLifecycleTests.m; sourceTree = "<group>"; };
|
||||
0A97D7BF24BA937000050525 /* FlutterViewControllerInitialRouteTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FlutterViewControllerInitialRouteTest.m; sourceTree = "<group>"; };
|
||||
0AC83145256E534E00DAE6BE /* golden_bogus_font_text_iPhone 8_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_bogus_font_text_iPhone 8_simulator.png"; sourceTree = "<group>"; };
|
||||
0D14A3FD239743190013D873 /* golden_platform_view_rotate_iPhone SE_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_platform_view_rotate_iPhone SE_simulator.png"; sourceTree = "<group>"; };
|
||||
0D8470A2240F0B1F0030B565 /* StatusBarTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StatusBarTest.h; sourceTree = "<group>"; };
|
||||
0D8470A3240F0B1F0030B565 /* StatusBarTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StatusBarTest.m; sourceTree = "<group>"; };
|
||||
@ -144,7 +141,6 @@
|
||||
248D76F022E388380012F0C1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
248FDFC322FE7CD0009CC7CD /* FlutterEngineTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FlutterEngineTest.m; sourceTree = "<group>"; };
|
||||
24D47D1A230C79840069DD5E /* golden_platform_view_D211AP.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = golden_platform_view_D211AP.png; sourceTree = "<group>"; };
|
||||
24D47D1C230CA2700069DD5E /* golden_platform_view_iPhone SE_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_platform_view_iPhone SE_simulator.png"; sourceTree = "<group>"; };
|
||||
24D47D1E230CA4480069DD5E /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
|
||||
24F1FB87230B4579005ACE7C /* TextPlatformView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TextPlatformView.m; sourceTree = "<group>"; };
|
||||
24F1FB88230B4579005ACE7C /* TextPlatformView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextPlatformView.h; sourceTree = "<group>"; };
|
||||
@ -158,20 +154,14 @@
|
||||
3DE09E9123C010BD006C9851 /* golden_platform_view_transform_iPhone 8_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_platform_view_transform_iPhone 8_simulator.png"; sourceTree = "<group>"; };
|
||||
3DE09E9223C010BD006C9851 /* golden_platform_view_cliprect_iPhone 8_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_platform_view_cliprect_iPhone 8_simulator.png"; sourceTree = "<group>"; };
|
||||
4F06F1B124731F66000AF246 /* LocalizationInitializationTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocalizationInitializationTest.m; sourceTree = "<group>"; };
|
||||
59A97FD7236A49D300B4C066 /* golden_platform_view_multiple_iPhone SE_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_platform_view_multiple_iPhone SE_simulator.png"; sourceTree = "<group>"; };
|
||||
59A97FD9236B984300B4C066 /* golden_platform_view_multiple_background_foreground_iPhone SE_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_platform_view_multiple_background_foreground_iPhone SE_simulator.png"; sourceTree = "<group>"; };
|
||||
6402EBD024147BDA00987DCB /* UnobstructedPlatformViewTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UnobstructedPlatformViewTests.m; sourceTree = "<group>"; };
|
||||
6816DB9C231750ED00A51400 /* GoldenPlatformViewTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GoldenPlatformViewTests.h; sourceTree = "<group>"; };
|
||||
6816DB9D231750ED00A51400 /* GoldenPlatformViewTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GoldenPlatformViewTests.m; sourceTree = "<group>"; };
|
||||
6816DB9F2317573300A51400 /* GoldenImage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GoldenImage.h; sourceTree = "<group>"; };
|
||||
6816DBA02317573300A51400 /* GoldenImage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GoldenImage.m; sourceTree = "<group>"; };
|
||||
6816DBA22318358200A51400 /* PlatformViewGoldenTestManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlatformViewGoldenTestManager.h; sourceTree = "<group>"; };
|
||||
6816DBA32318358200A51400 /* PlatformViewGoldenTestManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PlatformViewGoldenTestManager.m; sourceTree = "<group>"; };
|
||||
6816DBA52318696600A51400 /* golden_platform_view_clippath_iPhone SE_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_platform_view_clippath_iPhone SE_simulator.png"; sourceTree = "<group>"; };
|
||||
6816DBA62318696600A51400 /* golden_platform_view_transform_iPhone SE_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_platform_view_transform_iPhone SE_simulator.png"; sourceTree = "<group>"; };
|
||||
6816DBA72318696600A51400 /* golden_platform_view_opacity_iPhone SE_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_platform_view_opacity_iPhone SE_simulator.png"; sourceTree = "<group>"; };
|
||||
6816DBA82318696600A51400 /* golden_platform_view_cliprect_iPhone SE_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_platform_view_cliprect_iPhone SE_simulator.png"; sourceTree = "<group>"; };
|
||||
6816DBA92318696600A51400 /* golden_platform_view_cliprrect_iPhone SE_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_platform_view_cliprrect_iPhone SE_simulator.png"; sourceTree = "<group>"; };
|
||||
6816DBA22318358200A51400 /* GoldenTestManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GoldenTestManager.h; sourceTree = "<group>"; };
|
||||
6816DBA32318358200A51400 /* GoldenTestManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GoldenTestManager.m; sourceTree = "<group>"; };
|
||||
68A5B63323EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PlatformViewGestureRecognizerTests.m; sourceTree = "<group>"; };
|
||||
68D4017B2564859300ECD91A /* ContinuousTexture.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContinuousTexture.h; sourceTree = "<group>"; };
|
||||
68D4017C2564859300ECD91A /* ContinuousTexture.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ContinuousTexture.m; sourceTree = "<group>"; };
|
||||
@ -264,6 +254,7 @@
|
||||
children = (
|
||||
4F06F1B124731F66000AF246 /* LocalizationInitializationTest.m */,
|
||||
6402EBD024147BDA00987DCB /* UnobstructedPlatformViewTests.m */,
|
||||
0AC83145256E534E00DAE6BE /* golden_bogus_font_text_iPhone 8_simulator.png */,
|
||||
0D14A3FD239743190013D873 /* golden_platform_view_rotate_iPhone SE_simulator.png */,
|
||||
3DE09E8B23C010BC006C9851 /* golden_platform_view_clippath_iPhone 8_simulator.png */,
|
||||
3DE09E9223C010BD006C9851 /* golden_platform_view_cliprect_iPhone 8_simulator.png */,
|
||||
@ -275,24 +266,18 @@
|
||||
3DE09E8E23C010BD006C9851 /* golden_platform_view_rotate_iPhone 8_simulator.png */,
|
||||
3DE09E9123C010BD006C9851 /* golden_platform_view_transform_iPhone 8_simulator.png */,
|
||||
59A97FD9236B984300B4C066 /* golden_platform_view_multiple_background_foreground_iPhone SE_simulator.png */,
|
||||
59A97FD7236A49D300B4C066 /* golden_platform_view_multiple_iPhone SE_simulator.png */,
|
||||
244EA6CF230DBE8900B2D26E /* golden_platform_view_D21AP.png */,
|
||||
24D47D1C230CA2700069DD5E /* golden_platform_view_iPhone SE_simulator.png */,
|
||||
24D47D1A230C79840069DD5E /* golden_platform_view_D211AP.png */,
|
||||
6816DBA52318696600A51400 /* golden_platform_view_clippath_iPhone SE_simulator.png */,
|
||||
6816DBA82318696600A51400 /* golden_platform_view_cliprect_iPhone SE_simulator.png */,
|
||||
6816DBA92318696600A51400 /* golden_platform_view_cliprrect_iPhone SE_simulator.png */,
|
||||
6816DBA72318696600A51400 /* golden_platform_view_opacity_iPhone SE_simulator.png */,
|
||||
6816DBA62318696600A51400 /* golden_platform_view_transform_iPhone SE_simulator.png */,
|
||||
248D76EE22E388380012F0C1 /* PlatformViewUITests.m */,
|
||||
0A02E8F624EFAD27002D54E5 /* BogusFontTextTest.m */,
|
||||
248D76F022E388380012F0C1 /* Info.plist */,
|
||||
24D47D1E230CA4480069DD5E /* README.md */,
|
||||
6816DB9C231750ED00A51400 /* GoldenPlatformViewTests.h */,
|
||||
6816DB9D231750ED00A51400 /* GoldenPlatformViewTests.m */,
|
||||
6816DB9F2317573300A51400 /* GoldenImage.h */,
|
||||
6816DBA02317573300A51400 /* GoldenImage.m */,
|
||||
6816DBA22318358200A51400 /* PlatformViewGoldenTestManager.h */,
|
||||
6816DBA32318358200A51400 /* PlatformViewGoldenTestManager.m */,
|
||||
6816DBA22318358200A51400 /* GoldenTestManager.h */,
|
||||
6816DBA32318358200A51400 /* GoldenTestManager.m */,
|
||||
68A5B63323EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m */,
|
||||
0D8470A2240F0B1F0030B565 /* StatusBarTest.h */,
|
||||
0D8470A3240F0B1F0030B565 /* StatusBarTest.m */,
|
||||
@ -436,25 +421,19 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
6816DBAE2318696600A51400 /* golden_platform_view_cliprrect_iPhone SE_simulator.png in Resources */,
|
||||
3DEF491623C3BE6500184216 /* golden_platform_view_multiple_background_foreground_iPhone 8_simulator.png in Resources */,
|
||||
3DEF491323C3BE6500184216 /* golden_platform_view_cliprect_iPhone 8_simulator.png in Resources */,
|
||||
3DEF491523C3BE6500184216 /* golden_platform_view_iPhone 8_simulator.png in Resources */,
|
||||
0D14A3FE239743190013D873 /* golden_platform_view_rotate_iPhone SE_simulator.png in Resources */,
|
||||
6816DBAB2318696600A51400 /* golden_platform_view_transform_iPhone SE_simulator.png in Resources */,
|
||||
3DEF491823C3BE6500184216 /* golden_platform_view_opacity_iPhone 8_simulator.png in Resources */,
|
||||
0AC83146256E534E00DAE6BE /* golden_bogus_font_text_iPhone 8_simulator.png in Resources */,
|
||||
3DEF491723C3BE6500184216 /* golden_platform_view_multiple_iPhone 8_simulator.png in Resources */,
|
||||
3DEF491223C3BE6500184216 /* golden_platform_view_clippath_iPhone 8_simulator.png in Resources */,
|
||||
3DEF491423C3BE6500184216 /* golden_platform_view_cliprrect_iPhone 8_simulator.png in Resources */,
|
||||
59A97FDA236B984300B4C066 /* golden_platform_view_multiple_background_foreground_iPhone SE_simulator.png in Resources */,
|
||||
6816DBAA2318696600A51400 /* golden_platform_view_clippath_iPhone SE_simulator.png in Resources */,
|
||||
6816DBAD2318696600A51400 /* golden_platform_view_cliprect_iPhone SE_simulator.png in Resources */,
|
||||
3DEF491923C3BE6500184216 /* golden_platform_view_rotate_iPhone 8_simulator.png in Resources */,
|
||||
24D47D1B230C79840069DD5E /* golden_platform_view_D211AP.png in Resources */,
|
||||
59A97FD8236A49D300B4C066 /* golden_platform_view_multiple_iPhone SE_simulator.png in Resources */,
|
||||
24D47D1D230CA2700069DD5E /* golden_platform_view_iPhone SE_simulator.png in Resources */,
|
||||
244EA6D0230DBE8900B2D26E /* golden_platform_view_D21AP.png in Resources */,
|
||||
6816DBAC2318696600A51400 /* golden_platform_view_opacity_iPhone SE_simulator.png in Resources */,
|
||||
3DEF491A23C3BE6500184216 /* golden_platform_view_transform_iPhone 8_simulator.png in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@ -493,8 +472,9 @@
|
||||
6402EBD124147BDA00987DCB /* UnobstructedPlatformViewTests.m in Sources */,
|
||||
68A5B63423EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m in Sources */,
|
||||
6816DBA12317573300A51400 /* GoldenImage.m in Sources */,
|
||||
0A02E8F724EFAD27002D54E5 /* BogusFontTextTest.m in Sources */,
|
||||
6816DB9E231750ED00A51400 /* GoldenPlatformViewTests.m in Sources */,
|
||||
6816DBA42318358200A51400 /* PlatformViewGoldenTestManager.m in Sources */,
|
||||
6816DBA42318358200A51400 /* GoldenTestManager.m in Sources */,
|
||||
248D76EF22E388380012F0C1 /* PlatformViewUITests.m in Sources */,
|
||||
0D8470A4240F0B1F0030B565 /* StatusBarTest.m in Sources */,
|
||||
246A6611252E693A00EAB0F3 /* RenderingSelectionTest.m in Sources */,
|
||||
|
||||
@ -28,15 +28,6 @@
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
systemAttachmentLifetime = "keepNever">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "248D76C622E388370012F0C1"
|
||||
BuildableName = "Scenarios.app"
|
||||
BlueprintName = "Scenarios"
|
||||
ReferencedContainer = "container:Scenarios.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO"
|
||||
@ -87,6 +78,10 @@
|
||||
argument = "--screen-before-flutter"
|
||||
isEnabled = "NO">
|
||||
</CommandLineArgument>
|
||||
<CommandLineArgument
|
||||
argument = "--bogus-font-text"
|
||||
isEnabled = "NO">
|
||||
</CommandLineArgument>
|
||||
<CommandLineArgument
|
||||
argument = "--text-semantics-focus"
|
||||
isEnabled = "NO">
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
self.window.tintColor = UIColor.systemPinkColor;
|
||||
}
|
||||
NSDictionary<NSString*, NSString*>* launchArgsMap = @{
|
||||
// The Platform view golden test args should match `PlatformViewGoldenTestManager`.
|
||||
// The golden test args should match `GoldenTestManager`.
|
||||
@"--locale-initialization" : @"locale_initialization",
|
||||
@"--platform-view" : @"platform_view",
|
||||
@"--platform-view-no-overlay-intersection" : @"platform_view_no_overlay_intersection",
|
||||
@ -53,7 +53,8 @@
|
||||
@"--tap-status-bar" : @"tap_status_bar",
|
||||
@"--text-semantics-focus" : @"text_semantics_focus",
|
||||
@"--animated-color-square" : @"animated_color_square",
|
||||
@"--platform-view-with-continuous-texture" : @"platform_view_with_continuous_texture"
|
||||
@"--platform-view-with-continuous-texture" : @"platform_view_with_continuous_texture",
|
||||
@"--bogus-font-text" : @"bogus_font_text"
|
||||
};
|
||||
__block NSString* flutterViewControllerTestName = nil;
|
||||
[launchArgsMap
|
||||
@ -104,16 +105,18 @@
|
||||
codec:[FlutterJSONMethodCodec sharedInstance]];
|
||||
[channel invokeMethod:@"set_scenario" arguments:@{@"name" : scenarioIdentifier}];
|
||||
}];
|
||||
// Can be used to synchronize timing in the test for a signal from Dart.
|
||||
[engine.binaryMessenger
|
||||
setMessageHandlerOnChannel:@"touches_scenario"
|
||||
setMessageHandlerOnChannel:@"display_data"
|
||||
binaryMessageHandler:^(NSData* _Nullable message, FlutterBinaryReply _Nonnull reply) {
|
||||
NSDictionary* dict = [NSJSONSerialization JSONObjectWithData:message
|
||||
options:0
|
||||
error:nil];
|
||||
UITextField* text = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, 300, 100)];
|
||||
text.text = dict[@"change"];
|
||||
UITextField* text = [[UITextField alloc] initWithFrame:CGRectMake(0, 400, 300, 100)];
|
||||
text.text = dict[@"data"];
|
||||
[flutterViewController.view addSubview:text];
|
||||
}];
|
||||
|
||||
TextPlatformViewFactory* textPlatformViewFactory =
|
||||
[[TextPlatformViewFactory alloc] initWithMessenger:engine.binaryMessenger];
|
||||
NSObject<FlutterPluginRegistrar>* registrar =
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
// Copyright 2013 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>
|
||||
#import "GoldenTestManager.h"
|
||||
|
||||
FLUTTER_ASSERT_ARC
|
||||
|
||||
@interface BogusFontTextTest : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation BogusFontTextTest
|
||||
|
||||
- (void)testFontRenderingWhenSuppliedWithBogusFont {
|
||||
self.continueAfterFailure = NO;
|
||||
|
||||
XCUIApplication* application = [[XCUIApplication alloc] init];
|
||||
application.launchArguments = @[ @"--bogus-font-text" ];
|
||||
[application launch];
|
||||
|
||||
XCUIElement* addTextField = application.textFields[@"ready"];
|
||||
XCTAssertTrue([addTextField waitForExistenceWithTimeout:30]);
|
||||
|
||||
GoldenTestManager* manager = [[GoldenTestManager alloc] initWithLaunchArg:@"--bogus-font-text"];
|
||||
[manager checkGoldenForTest:self];
|
||||
}
|
||||
|
||||
@end
|
||||
@ -3,7 +3,7 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "PlatformViewGoldenTestManager.h"
|
||||
#import "GoldenTestManager.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@ -12,20 +12,19 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
// A new PlatformView golden tests can subclass this and override the `-initiWithInvocation:`
|
||||
// method, which then retun the `-initWithManager:invocation:`
|
||||
//
|
||||
// Then in any test method, call `checkGolden` to perform the golden test.
|
||||
// Then in any test method, call `checkPlatformViewGolden` to perform the golden test.
|
||||
//
|
||||
// This base class doesn't run any test case on its own.
|
||||
@interface GoldenPlatformViewTests : XCTestCase
|
||||
|
||||
@property(nonatomic, strong) XCUIApplication* application;
|
||||
|
||||
// Initialize with a `PlatformViewGoldenTestManager`.
|
||||
- (instancetype)initWithManager:(PlatformViewGoldenTestManager*)manager
|
||||
invocation:(NSInvocation*)invocation;
|
||||
// Initialize with a `GoldenTestManager`.
|
||||
- (instancetype)initWithManager:(GoldenTestManager*)manager invocation:(NSInvocation*)invocation;
|
||||
|
||||
// Take a sceenshot of the test app and check it has the same pixels with goldenImage inside the
|
||||
// `PlatformViewGoldenTestManager`.
|
||||
- (void)checkGolden;
|
||||
// `GoldenTestManager`.
|
||||
- (void)checkPlatformViewGolden;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@ -5,8 +5,7 @@
|
||||
#import "GoldenPlatformViewTests.h"
|
||||
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#import "PlatformViewGoldenTestManager.h"
|
||||
#import "GoldenTestManager.h"
|
||||
|
||||
static const NSInteger kSecondsToWaitForPlatformView = 30;
|
||||
|
||||
@ -14,14 +13,13 @@ static const NSInteger kSecondsToWaitForPlatformView = 30;
|
||||
|
||||
@property(nonatomic, copy) NSString* goldenName;
|
||||
|
||||
@property(nonatomic, strong) PlatformViewGoldenTestManager* manager;
|
||||
@property(nonatomic, strong) GoldenTestManager* manager;
|
||||
|
||||
@end
|
||||
|
||||
@implementation GoldenPlatformViewTests
|
||||
|
||||
- (instancetype)initWithManager:(PlatformViewGoldenTestManager*)manager
|
||||
invocation:(NSInvocation*)invocation {
|
||||
- (instancetype)initWithManager:(GoldenTestManager*)manager invocation:(NSInvocation*)invocation {
|
||||
self = [super initWithInvocation:invocation];
|
||||
_manager = manager;
|
||||
return self;
|
||||
@ -37,7 +35,7 @@ static const NSInteger kSecondsToWaitForPlatformView = 30;
|
||||
}
|
||||
|
||||
// Note: don't prefix with "test" or GoldenPlatformViewTests will run instead of the subclasses.
|
||||
- (void)checkGolden {
|
||||
- (void)checkPlatformViewGolden {
|
||||
XCUIElement* element = self.application.textViews.firstMatch;
|
||||
BOOL exists = [element waitForExistenceWithTimeout:kSecondsToWaitForPlatformView];
|
||||
if (!exists) {
|
||||
@ -47,29 +45,6 @@ static const NSInteger kSecondsToWaitForPlatformView = 30;
|
||||
@(kSecondsToWaitForPlatformView));
|
||||
}
|
||||
|
||||
GoldenImage* golden = self.manager.goldenImage;
|
||||
|
||||
XCUIScreenshot* screenshot = [[XCUIScreen mainScreen] screenshot];
|
||||
if (!golden.image) {
|
||||
XCTAttachment* attachment = [XCTAttachment attachmentWithScreenshot:screenshot];
|
||||
attachment.name = @"new_golden";
|
||||
attachment.lifetime = XCTAttachmentLifetimeKeepAlways;
|
||||
[self addAttachment:attachment];
|
||||
XCTFail(@"This test will fail - no golden named %@ found. Follow the steps in the "
|
||||
@"README to add a new golden.",
|
||||
golden.goldenName);
|
||||
}
|
||||
|
||||
if (![golden compareGoldenToImage:screenshot.image]) {
|
||||
XCTAttachment* screenshotAttachment;
|
||||
screenshotAttachment = [XCTAttachment attachmentWithImage:screenshot.image];
|
||||
screenshotAttachment.name = golden.goldenName;
|
||||
screenshotAttachment.lifetime = XCTAttachmentLifetimeKeepAlways;
|
||||
[self addAttachment:screenshotAttachment];
|
||||
|
||||
XCTFail(@"Goldens to not match. Follow the steps in the "
|
||||
@"README to update golden named %@ if needed.",
|
||||
golden.goldenName);
|
||||
}
|
||||
[self.manager checkGoldenForTest:self];
|
||||
}
|
||||
@end
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "GoldenImage.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@ -14,7 +14,7 @@ extern NSDictionary* launchArgsMap;
|
||||
//
|
||||
// It creates the correct `identifer` based on the `launchArg`.
|
||||
// It also generates the correct GoldenImage based on the `identifier`.
|
||||
@interface PlatformViewGoldenTestManager : NSObject
|
||||
@interface GoldenTestManager : NSObject
|
||||
|
||||
@property(readonly, strong, nonatomic) GoldenImage* goldenImage;
|
||||
@property(readonly, copy, nonatomic) NSString* identifier;
|
||||
@ -25,6 +25,10 @@ extern NSDictionary* launchArgsMap;
|
||||
// Crahes if the launchArg is not mapped in `Appdelegate.launchArgsMap`.
|
||||
- (instancetype)initWithLaunchArg:(NSString*)launchArg;
|
||||
|
||||
// Take a sceenshot of the test app and check it has the same pixels with
|
||||
// goldenImage inside the `GoldenTestManager`.
|
||||
- (void)checkGoldenForTest:(XCTestCase*)test;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -2,17 +2,16 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import "PlatformViewGoldenTestManager.h"
|
||||
|
||||
#import "GoldenTestManager.h"
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
@interface PlatformViewGoldenTestManager ()
|
||||
@interface GoldenTestManager ()
|
||||
|
||||
@property(readwrite, strong, nonatomic) GoldenImage* goldenImage;
|
||||
|
||||
@end
|
||||
|
||||
@implementation PlatformViewGoldenTestManager
|
||||
@implementation GoldenTestManager
|
||||
|
||||
NSDictionary* launchArgsMap;
|
||||
|
||||
@ -34,6 +33,7 @@ NSDictionary* launchArgsMap;
|
||||
@"--platform-view-transform" : @"platform_view_transform",
|
||||
@"--platform-view-opacity" : @"platform_view_opacity",
|
||||
@"--platform-view-rotate" : @"platform_view_rotate",
|
||||
@"--bogus-font-text" : @"bogus_font_text",
|
||||
};
|
||||
});
|
||||
_identifier = launchArgsMap[launchArg];
|
||||
@ -44,4 +44,32 @@ NSDictionary* launchArgsMap;
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)checkGoldenForTest:(XCTestCase*)test {
|
||||
XCUIScreenshot* screenshot = [[XCUIScreen mainScreen] screenshot];
|
||||
if (!_goldenImage.image) {
|
||||
XCTAttachment* attachment = [XCTAttachment attachmentWithScreenshot:screenshot];
|
||||
attachment.name = [_goldenImage.goldenName stringByAppendingString:@"_new"];
|
||||
attachment.lifetime = XCTAttachmentLifetimeKeepAlways;
|
||||
[test addAttachment:attachment];
|
||||
// Instead of XCTFail because that definition changed between Xcode 11 and 12 whereas this impl
|
||||
// is stable.
|
||||
_XCTPrimitiveFail(test,
|
||||
@"This test will fail - no golden named %@ found. "
|
||||
@"Follow the steps in the README to add a new golden.",
|
||||
_goldenImage.goldenName);
|
||||
}
|
||||
|
||||
if (![_goldenImage compareGoldenToImage:screenshot.image]) {
|
||||
XCTAttachment* screenshotAttachment = [XCTAttachment attachmentWithImage:screenshot.image];
|
||||
screenshotAttachment.name = [_goldenImage.goldenName stringByAppendingString:@"_actual"];
|
||||
screenshotAttachment.lifetime = XCTAttachmentLifetimeKeepAlways;
|
||||
[test addAttachment:screenshotAttachment];
|
||||
|
||||
_XCTPrimitiveFail(test,
|
||||
@"Goldens do not match. Follow the steps in the "
|
||||
@"README to update golden named %@ if needed.",
|
||||
_goldenImage.goldenName);
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@ -13,13 +13,12 @@ static const NSInteger kSecondsToWaitForPlatformView = 30;
|
||||
@implementation PlatformViewUITests
|
||||
|
||||
- (instancetype)initWithInvocation:(NSInvocation*)invocation {
|
||||
PlatformViewGoldenTestManager* manager =
|
||||
[[PlatformViewGoldenTestManager alloc] initWithLaunchArg:@"--platform-view"];
|
||||
GoldenTestManager* manager = [[GoldenTestManager alloc] initWithLaunchArg:@"--platform-view"];
|
||||
return [super initWithManager:manager invocation:invocation];
|
||||
}
|
||||
|
||||
- (void)testPlatformView {
|
||||
[self checkGolden];
|
||||
[self checkPlatformViewGolden];
|
||||
}
|
||||
|
||||
@end
|
||||
@ -31,13 +30,13 @@ static const NSInteger kSecondsToWaitForPlatformView = 30;
|
||||
@implementation MultiplePlatformViewsTest
|
||||
|
||||
- (instancetype)initWithInvocation:(NSInvocation*)invocation {
|
||||
PlatformViewGoldenTestManager* manager =
|
||||
[[PlatformViewGoldenTestManager alloc] initWithLaunchArg:@"--platform-view-multiple"];
|
||||
GoldenTestManager* manager =
|
||||
[[GoldenTestManager alloc] initWithLaunchArg:@"--platform-view-multiple"];
|
||||
return [super initWithManager:manager invocation:invocation];
|
||||
}
|
||||
|
||||
- (void)testPlatformView {
|
||||
[self checkGolden];
|
||||
[self checkPlatformViewGolden];
|
||||
}
|
||||
|
||||
@end
|
||||
@ -49,7 +48,7 @@ static const NSInteger kSecondsToWaitForPlatformView = 30;
|
||||
@implementation MultiplePlatformViewsBackgroundForegroundTest
|
||||
|
||||
- (instancetype)initWithInvocation:(NSInvocation*)invocation {
|
||||
PlatformViewGoldenTestManager* manager = [[PlatformViewGoldenTestManager alloc]
|
||||
GoldenTestManager* manager = [[GoldenTestManager alloc]
|
||||
initWithLaunchArg:@"--platform-view-multiple-background-foreground"];
|
||||
return [super initWithManager:manager invocation:invocation];
|
||||
}
|
||||
@ -57,7 +56,7 @@ static const NSInteger kSecondsToWaitForPlatformView = 30;
|
||||
- (void)testPlatformView {
|
||||
[[XCUIDevice sharedDevice] pressButton:XCUIDeviceButtonHome];
|
||||
[self.application activate];
|
||||
[self checkGolden];
|
||||
[self checkPlatformViewGolden];
|
||||
}
|
||||
|
||||
@end
|
||||
@ -70,13 +69,13 @@ static const NSInteger kSecondsToWaitForPlatformView = 30;
|
||||
@implementation PlatformViewMutationClipRectTests
|
||||
|
||||
- (instancetype)initWithInvocation:(NSInvocation*)invocation {
|
||||
PlatformViewGoldenTestManager* manager =
|
||||
[[PlatformViewGoldenTestManager alloc] initWithLaunchArg:@"--platform-view-cliprect"];
|
||||
GoldenTestManager* manager =
|
||||
[[GoldenTestManager alloc] initWithLaunchArg:@"--platform-view-cliprect"];
|
||||
return [super initWithManager:manager invocation:invocation];
|
||||
}
|
||||
|
||||
- (void)testPlatformView {
|
||||
[self checkGolden];
|
||||
[self checkPlatformViewGolden];
|
||||
}
|
||||
|
||||
@end
|
||||
@ -88,13 +87,13 @@ static const NSInteger kSecondsToWaitForPlatformView = 30;
|
||||
@implementation PlatformViewMutationClipRRectTests
|
||||
|
||||
- (instancetype)initWithInvocation:(NSInvocation*)invocation {
|
||||
PlatformViewGoldenTestManager* manager =
|
||||
[[PlatformViewGoldenTestManager alloc] initWithLaunchArg:@"--platform-view-cliprrect"];
|
||||
GoldenTestManager* manager =
|
||||
[[GoldenTestManager alloc] initWithLaunchArg:@"--platform-view-cliprrect"];
|
||||
return [super initWithManager:manager invocation:invocation];
|
||||
}
|
||||
|
||||
- (void)testPlatformView {
|
||||
[self checkGolden];
|
||||
[self checkPlatformViewGolden];
|
||||
}
|
||||
|
||||
@end
|
||||
@ -106,13 +105,13 @@ static const NSInteger kSecondsToWaitForPlatformView = 30;
|
||||
@implementation PlatformViewMutationClipPathTests
|
||||
|
||||
- (instancetype)initWithInvocation:(NSInvocation*)invocation {
|
||||
PlatformViewGoldenTestManager* manager =
|
||||
[[PlatformViewGoldenTestManager alloc] initWithLaunchArg:@"--platform-view-clippath"];
|
||||
GoldenTestManager* manager =
|
||||
[[GoldenTestManager alloc] initWithLaunchArg:@"--platform-view-clippath"];
|
||||
return [super initWithManager:manager invocation:invocation];
|
||||
}
|
||||
|
||||
- (void)testPlatformView {
|
||||
[self checkGolden];
|
||||
[self checkPlatformViewGolden];
|
||||
}
|
||||
|
||||
@end
|
||||
@ -124,13 +123,13 @@ static const NSInteger kSecondsToWaitForPlatformView = 30;
|
||||
@implementation PlatformViewMutationTransformTests
|
||||
|
||||
- (instancetype)initWithInvocation:(NSInvocation*)invocation {
|
||||
PlatformViewGoldenTestManager* manager =
|
||||
[[PlatformViewGoldenTestManager alloc] initWithLaunchArg:@"--platform-view-transform"];
|
||||
GoldenTestManager* manager =
|
||||
[[GoldenTestManager alloc] initWithLaunchArg:@"--platform-view-transform"];
|
||||
return [super initWithManager:manager invocation:invocation];
|
||||
}
|
||||
|
||||
- (void)testPlatformView {
|
||||
[self checkGolden];
|
||||
[self checkPlatformViewGolden];
|
||||
}
|
||||
|
||||
@end
|
||||
@ -142,13 +141,13 @@ static const NSInteger kSecondsToWaitForPlatformView = 30;
|
||||
@implementation PlatformViewMutationOpacityTests
|
||||
|
||||
- (instancetype)initWithInvocation:(NSInvocation*)invocation {
|
||||
PlatformViewGoldenTestManager* manager =
|
||||
[[PlatformViewGoldenTestManager alloc] initWithLaunchArg:@"--platform-view-opacity"];
|
||||
GoldenTestManager* manager =
|
||||
[[GoldenTestManager alloc] initWithLaunchArg:@"--platform-view-opacity"];
|
||||
return [super initWithManager:manager invocation:invocation];
|
||||
}
|
||||
|
||||
- (void)testPlatformView {
|
||||
[self checkGolden];
|
||||
[self checkPlatformViewGolden];
|
||||
}
|
||||
|
||||
@end
|
||||
@ -158,8 +157,8 @@ static const NSInteger kSecondsToWaitForPlatformView = 30;
|
||||
|
||||
@implementation PlatformViewRotation
|
||||
- (instancetype)initWithInvocation:(NSInvocation*)invocation {
|
||||
PlatformViewGoldenTestManager* manager =
|
||||
[[PlatformViewGoldenTestManager alloc] initWithLaunchArg:@"--platform-view-rotate"];
|
||||
GoldenTestManager* manager =
|
||||
[[GoldenTestManager alloc] initWithLaunchArg:@"--platform-view-rotate"];
|
||||
return [super initWithManager:manager invocation:invocation];
|
||||
}
|
||||
|
||||
@ -170,7 +169,7 @@ static const NSInteger kSecondsToWaitForPlatformView = 30;
|
||||
|
||||
- (void)testPlatformView {
|
||||
XCUIDevice.sharedDevice.orientation = UIDeviceOrientationLandscapeLeft;
|
||||
[self checkGolden];
|
||||
[self checkPlatformViewGolden];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
# PlatformView UI Tests
|
||||
# Golden UI Tests
|
||||
|
||||
This folder contains a test for platform views. It renders a platform view
|
||||
and does a screen shot comparison against a known good configuration.
|
||||
This folder contains golden image tests. It renders UI (for instance, a platform
|
||||
view) and does a screen shot comparison against a known good configuration.
|
||||
|
||||
The screen shots are named `golden_platform_view_MODEL`, with `_simulator`
|
||||
The screen shots are named `golden_[scenario name]_[MODEL]`, with `_simulator`
|
||||
appended for simulators. The model numbers for physical devices correspond
|
||||
to the `hw.model` sys call, and will represent the model numbers. Simulator
|
||||
names are taken from the environment.
|
||||
|
||||
New devices require running the test on the device, gathering the attachment
|
||||
and verifying it manually, and then adding an appropriately named file to
|
||||
this folder.
|
||||
from the test result and verifying it manually. Then adding an appropriately
|
||||
named file to this folder.
|
||||
|
||||
If the test is attempted on a new device, the log will contain a message
|
||||
indicating the file name it expected to find. The test will continue and fail,
|
||||
|
||||
|
After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 27 KiB |
64
testing/scenario_app/lib/src/bogus_font_text.dart
Normal file
@ -0,0 +1,64 @@
|
||||
// Copyright 2013 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.
|
||||
|
||||
// @dart = 2.6
|
||||
import 'dart:ui';
|
||||
|
||||
import 'channel_util.dart';
|
||||
import 'scenario.dart';
|
||||
|
||||
/// Tries to draw some text in a bogus font. Should end up drawing in the
|
||||
/// system default font.
|
||||
class BogusFontText extends Scenario {
|
||||
/// Creates the BogusFontText scenario.
|
||||
///
|
||||
/// The [dispatcher] parameter must not be null.
|
||||
BogusFontText(PlatformDispatcher dispatcher)
|
||||
: assert(dispatcher != null),
|
||||
super(dispatcher);
|
||||
|
||||
// Semi-arbitrary.
|
||||
double _screenWidth = 700;
|
||||
|
||||
@override
|
||||
void onBeginFrame(Duration duration) {
|
||||
final SceneBuilder builder = SceneBuilder();
|
||||
final PictureRecorder recorder = PictureRecorder();
|
||||
final Canvas canvas = Canvas(recorder);
|
||||
|
||||
final ParagraphBuilder paragraphBuilder =
|
||||
ParagraphBuilder(ParagraphStyle(fontFamily: "some font that doesn't exist"))
|
||||
..pushStyle(TextStyle(fontSize: 80))
|
||||
..addText('One more thing...')
|
||||
..pop();
|
||||
final Paragraph paragraph = paragraphBuilder.build();
|
||||
|
||||
paragraph.layout(ParagraphConstraints(width: _screenWidth));
|
||||
|
||||
canvas.drawParagraph(paragraph, const Offset(50, 80));
|
||||
final Picture picture = recorder.endRecording();
|
||||
|
||||
builder.addPicture(
|
||||
Offset.zero,
|
||||
picture,
|
||||
willChangeHint: true,
|
||||
);
|
||||
final Scene scene = builder.build();
|
||||
window.render(scene);
|
||||
scene.dispose();
|
||||
|
||||
sendJsonMessage(
|
||||
dispatcher: dispatcher,
|
||||
channel: 'display_data',
|
||||
json: <String, dynamic>{
|
||||
'data': 'ready',
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void onDrawFrame() {
|
||||
// Just draw once since the content never changes.
|
||||
}
|
||||
}
|
||||
@ -17,16 +17,30 @@ void sendJsonMethodCall({
|
||||
@required String method,
|
||||
dynamic arguments,
|
||||
PlatformMessageResponseCallback callback,
|
||||
}) {
|
||||
sendJsonMessage(
|
||||
dispatcher: dispatcher,
|
||||
channel: channel,
|
||||
json: <String, dynamic>{
|
||||
'method': method,
|
||||
'args': arguments,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// Send a JSON message over a channel.
|
||||
void sendJsonMessage({
|
||||
@required PlatformDispatcher dispatcher,
|
||||
@required String channel,
|
||||
@required Map<String, dynamic> json,
|
||||
PlatformMessageResponseCallback callback,
|
||||
}) {
|
||||
dispatcher.sendPlatformMessage(
|
||||
channel,
|
||||
// This recreates a combination of OptionalMethodChannel, JSONMethodCodec,
|
||||
// and _DefaultBinaryMessenger in the framework.
|
||||
utf8.encoder.convert(
|
||||
const JsonCodec().encode(<String, dynamic>{
|
||||
'method': method,
|
||||
'args': arguments,
|
||||
})
|
||||
const JsonCodec().encode(json)
|
||||
).buffer.asByteData(),
|
||||
callback,
|
||||
);
|
||||
|
||||
@ -5,8 +5,7 @@
|
||||
// @dart = 2.6
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:scenario_app/src/channel_util.dart';
|
||||
|
||||
import 'channel_util.dart';
|
||||
import 'scenario.dart';
|
||||
|
||||
/// A blank page that just sends back to the platform what the set initial
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'animated_color_square.dart';
|
||||
import 'bogus_font_text.dart';
|
||||
import 'initial_route_reply.dart';
|
||||
import 'locale_initialization.dart';
|
||||
import 'platform_view.dart';
|
||||
@ -44,6 +45,7 @@ Map<String, ScenarioFactory> _scenarios = <String, ScenarioFactory>{
|
||||
'text_semantics_focus': () => SendTextFocusSemantics(PlatformDispatcher.instance),
|
||||
'initial_route_reply': () => InitialRouteReply(PlatformDispatcher.instance),
|
||||
'platform_view_with_continuous_texture': () => PlatformViewWithContinuousTexture(PlatformDispatcher.instance, 'Platform View', id: _viewId++),
|
||||
'bogus_font_text': () => BogusFontText(PlatformDispatcher.instance),
|
||||
};
|
||||
|
||||
Map<String, dynamic> _currentScenarioParams = <String, dynamic>{};
|
||||
|
||||
@ -4,9 +4,9 @@
|
||||
|
||||
// @dart = 2.6
|
||||
|
||||
import 'dart:convert';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'channel_util.dart';
|
||||
import 'scenario.dart';
|
||||
|
||||
/// A scenario that sends back messages when touches are received.
|
||||
@ -16,15 +16,12 @@ class TouchesScenario extends Scenario {
|
||||
|
||||
@override
|
||||
void onPointerDataPacket(PointerDataPacket packet) {
|
||||
window.sendPlatformMessage(
|
||||
'touches_scenario',
|
||||
utf8.encoder
|
||||
.convert(const JsonCodec().encode(<String, dynamic>{
|
||||
'change': packet.data[0].change.toString(),
|
||||
}))
|
||||
.buffer
|
||||
.asByteData(),
|
||||
null,
|
||||
sendJsonMessage(
|
||||
dispatcher: dispatcher,
|
||||
channel: 'display_data',
|
||||
json: <String, dynamic>{
|
||||
'data': packet.data[0].change.toString(),
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||