Flutter Engine
The Flutter Engine
DarwinSystemFontTests.m
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#import <Flutter/Flutter.h>
6#import <XCTest/XCTest.h>
8
9@interface DarwinSystemFontTests : XCTestCase
10
11@end
12
13@implementation DarwinSystemFontTests
14
15- (void)testFontRendering {
16 self.continueAfterFailure = NO;
17
18 XCUIApplication* application = [[XCUIApplication alloc] init];
19 application.launchArguments = @[ @"--darwin-system-font" ];
20 [application launch];
21
22 XCUIElement* addTextField = application.textFields[@"ready"];
23 XCTAssertTrue([addTextField waitForExistenceWithTimeout:30]);
24
26 [[GoldenTestManager alloc] initWithLaunchArg:@"--darwin-system-font"];
27 [manager checkGoldenForTest:self rmesThreshold:kDefaultRmseThreshold];
28}
29
30@end
void checkGoldenForTest:rmesThreshold:(XCTestCase *test,[rmesThreshold] double rmesThreshold)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font manager
Definition: switches.h:218