Modify some tests to work correctly on iOS 15. (flutter/engine#32124)

This commit is contained in:
Jackson Gardner
2022-03-18 15:50:07 -07:00
committed by GitHub
parent 4ff4d27b23
commit 95426bd119
2 changed files with 8 additions and 2 deletions

View File

@@ -41,8 +41,9 @@ void testMain() {
expect(isIdentityFloat32ListTransform(rotation2d), isFalse);
});
test('canonicalizes font families correctly on iOS', () {
test('canonicalizes font families correctly on iOS (not 15)', () {
debugOperatingSystemOverride = OperatingSystem.iOs;
debugIsIOS15 = false;
expect(
canonicalizeFontFamily('sans-serif'),
@@ -58,6 +59,7 @@ void testMain() {
);
debugOperatingSystemOverride = null;
debugIsIOS15 = null;
});
test('does not use -apple-system on iOS 15', () {

View File

@@ -26,7 +26,11 @@ Future<void> testMain() async {
setUp(() {
if (operatingSystem == OperatingSystem.macOs ||
operatingSystem == OperatingSystem.iOs) {
fallback = '-apple-system, BlinkMacSystemFont';
if (isIOS15) {
fallback = 'BlinkMacSystemFont';
} else {
fallback = '-apple-system, BlinkMacSystemFont';
}
} else {
fallback = 'Arial';
}