5 #import <XCTest/XCTest.h>
20 - (instancetype)init {
26 - (
flutter::Rasterizer::Screenshot)takeScreenshot:(
flutter::Rasterizer::ScreenshotType)type
27 asBase64Encoded:(BOOL)base64Encode {
31 - (std::shared_ptr<flutter::FlutterPlatformViewsController>&)platformViewsController {
35 - (void)flutterViewAccessibilityDidCall {
36 _callbackCalled = YES;
46 - (void)testFlutterViewEnableSemanticsWhenIsAccessibilityElementIsCalled {
50 XCTAssertFalse(view.isAccessibilityElement);
54 - (void)testFlutterViewBackgroundColorIsNotNil {
57 XCTAssertNotNil(view.backgroundColor);
60 - (void)testIgnoreWideColorWithoutImpeller {
64 [view layoutSubviews];
65 XCTAssertTrue([view.layer isKindOfClass:NSClassFromString(
@"CAMetalLayer")]);
66 CAMetalLayer* layer = (CAMetalLayer*)view.layer;
67 XCTAssertEqual(layer.pixelFormat, MTLPixelFormatBGRA8Unorm);
70 - (void)testLayerScalesMatchScreenAfterLayoutSubviews {
73 view.layer.contentsScale = CGFloat(-99.0);
74 view.layer.rasterizationScale = CGFloat(-99.0);
75 UIScreen* screen = [view
screen];
76 XCTAssertNotEqual(view.layer.contentsScale, screen.scale);
77 XCTAssertNotEqual(view.layer.rasterizationScale, screen.scale);
78 [view layoutSubviews];
79 XCTAssertEqual(view.layer.contentsScale, screen.scale);
80 XCTAssertEqual(view.layer.rasterizationScale, screen.scale);