Flutter Engine
The Flutter Engine
Instance Methods | List of all members
FlutterViewTest Class Reference
Inheritance diagram for FlutterViewTest:

Instance Methods

(void) - testFlutterViewEnableSemanticsWhenIsAccessibilityElementIsCalled [implementation]
 
(void) - testFlutterViewBackgroundColorIsNotNil [implementation]
 
(void) - testIgnoreWideColorWithoutImpeller [implementation]
 
(void) - testLayerScalesMatchScreenAfterLayoutSubviews [implementation]
 

Detailed Description

Definition at line 41 of file FlutterViewTest.mm.

Method Documentation

◆ testFlutterViewBackgroundColorIsNotNil

- (void) testFlutterViewBackgroundColorIsNotNil
implementation

Definition at line 13 of file FlutterViewTest.mm.

54 {
55 FakeDelegate* delegate = [[FakeDelegate alloc] init];
56 FlutterView* view = [[FlutterView alloc] initWithDelegate:delegate opaque:NO enableWideGamut:NO];
57 XCTAssertNotNil(view.backgroundColor);
58}

◆ testFlutterViewEnableSemanticsWhenIsAccessibilityElementIsCalled

- (void) testFlutterViewEnableSemanticsWhenIsAccessibilityElementIsCalled
implementation

Definition at line 13 of file FlutterViewTest.mm.

46 {
47 FakeDelegate* delegate = [[FakeDelegate alloc] init];
48 FlutterView* view = [[FlutterView alloc] initWithDelegate:delegate opaque:NO enableWideGamut:NO];
49 delegate.callbackCalled = NO;
50 XCTAssertFalse(view.isAccessibilityElement);
51 XCTAssertTrue(delegate.callbackCalled);
52}
BOOL isAccessibilityElement()
Definition: FlutterView.mm:222

◆ testIgnoreWideColorWithoutImpeller

- (void) testIgnoreWideColorWithoutImpeller
implementation

Definition at line 13 of file FlutterViewTest.mm.

60 {
61 FakeDelegate* delegate = [[FakeDelegate alloc] init];
62 delegate.isUsingImpeller = NO;
63 FlutterView* view = [[FlutterView alloc] initWithDelegate:delegate opaque:NO enableWideGamut:YES];
64 [view layoutSubviews];
65 XCTAssertTrue([view.layer isKindOfClass:NSClassFromString(@"CAMetalLayer")]);
66 CAMetalLayer* layer = (CAMetalLayer*)view.layer;
67 XCTAssertEqual(layer.pixelFormat, MTLPixelFormatBGRA8Unorm);
68}
void layoutSubviews()
Definition: FlutterView.mm:100

◆ testLayerScalesMatchScreenAfterLayoutSubviews

- (void) testLayerScalesMatchScreenAfterLayoutSubviews
implementation

Definition at line 13 of file FlutterViewTest.mm.

70 {
71 FakeDelegate* delegate = [[FakeDelegate alloc] init];
72 FlutterView* view = [[FlutterView alloc] initWithDelegate:delegate opaque:NO enableWideGamut:NO];
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);
81}
UIScreen * screen()
Definition: FlutterView.mm:34

The documentation for this class was generated from the following file: