Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
flutter::testing::MockAccessibilityBridge Class Reference

#include <SemanticsObjectTestMocks.h>

Inheritance diagram for flutter::testing::MockAccessibilityBridge:
flutter::AccessibilityBridgeIos

Public Member Functions

 MockAccessibilityBridge ()
 
bool isVoiceOverRunning () const override
 
UIView * view () const override
 
UIView< UITextInput > * textInputView () override
 
void DispatchSemanticsAction (int32_t id, SemanticsAction action) override
 
void DispatchSemanticsAction (int32_t id, SemanticsAction action, fml::MallocMapping args) override
 
void AccessibilityObjectDidBecomeFocused (int32_t id) override
 
void AccessibilityObjectDidLoseFocus (int32_t id) override
 
std::shared_ptr< FlutterPlatformViewsControllerGetPlatformViewsController () const override
 
- Public Member Functions inherited from flutter::AccessibilityBridgeIos
virtual ~AccessibilityBridgeIos ()=default
 
virtual UIView * view () const =0
 
virtual bool isVoiceOverRunning () const =0
 
virtual UIView< UITextInput > * textInputView ()=0
 
virtual void DispatchSemanticsAction (int32_t id, flutter::SemanticsAction action)=0
 
virtual void DispatchSemanticsAction (int32_t id, flutter::SemanticsAction action, fml::MallocMapping args)=0
 
virtual void AccessibilityObjectDidBecomeFocused (int32_t id)=0
 
virtual void AccessibilityObjectDidLoseFocus (int32_t id)=0
 
virtual std::shared_ptr< FlutterPlatformViewsControllerGetPlatformViewsController () const =0
 

Public Attributes

std::vector< SemanticsActionObservationobservations
 
bool isVoiceOverRunningValue
 

Detailed Description

Definition at line 24 of file SemanticsObjectTestMocks.h.

Constructor & Destructor Documentation

◆ MockAccessibilityBridge()

flutter::testing::MockAccessibilityBridge::MockAccessibilityBridge ( )
inline

Definition at line 26 of file SemanticsObjectTestMocks.h.

26 : observations({}) {
27 view_ = [[UIView alloc] initWithFrame:kScreenSize];
28 window_ = [[UIWindow alloc] initWithFrame:kScreenSize];
29 [window_ addSubview:view_];
30 }
const CGRect kScreenSize
std::vector< SemanticsActionObservation > observations
instancetype initWithFrame

Member Function Documentation

◆ AccessibilityObjectDidBecomeFocused()

void flutter::testing::MockAccessibilityBridge::AccessibilityObjectDidBecomeFocused ( int32_t  id)
inlineoverridevirtual

A callback that is called when a SemanticObject receives focus.

The input id is the uid of the newly focused SemanticObject.

Implements flutter::AccessibilityBridgeIos.

Definition at line 44 of file SemanticsObjectTestMocks.h.

44{}

◆ AccessibilityObjectDidLoseFocus()

void flutter::testing::MockAccessibilityBridge::AccessibilityObjectDidLoseFocus ( int32_t  id)
inlineoverridevirtual

A callback that is called when a SemanticObject loses focus

The input id is the uid of the newly focused SemanticObject.

Implements flutter::AccessibilityBridgeIos.

Definition at line 45 of file SemanticsObjectTestMocks.h.

45{}

◆ DispatchSemanticsAction() [1/2]

void flutter::testing::MockAccessibilityBridge::DispatchSemanticsAction ( int32_t  id,
SemanticsAction  action 
)
inlineoverridevirtual

Implements flutter::AccessibilityBridgeIos.

Definition at line 34 of file SemanticsObjectTestMocks.h.

34 {
35 SemanticsActionObservation observation(id, action);
36 observations.push_back(observation);
37 }

◆ DispatchSemanticsAction() [2/2]

void flutter::testing::MockAccessibilityBridge::DispatchSemanticsAction ( int32_t  id,
SemanticsAction  action,
fml::MallocMapping  args 
)
inlineoverridevirtual

Implements flutter::AccessibilityBridgeIos.

Definition at line 38 of file SemanticsObjectTestMocks.h.

40 {
41 SemanticsActionObservation observation(id, action);
42 observations.push_back(observation);
43 }

◆ GetPlatformViewsController()

std::shared_ptr< FlutterPlatformViewsController > flutter::testing::MockAccessibilityBridge::GetPlatformViewsController ( ) const
inlineoverridevirtual

Implements flutter::AccessibilityBridgeIos.

Definition at line 46 of file SemanticsObjectTestMocks.h.

46 {
47 return nil;
48 }

◆ isVoiceOverRunning()

bool flutter::testing::MockAccessibilityBridge::isVoiceOverRunning ( ) const
inlineoverridevirtual

◆ textInputView()

UIView< UITextInput > * flutter::testing::MockAccessibilityBridge::textInputView ( )
inlineoverridevirtual

Implements flutter::AccessibilityBridgeIos.

Definition at line 33 of file SemanticsObjectTestMocks.h.

33{ return nil; }

◆ view()

UIView * flutter::testing::MockAccessibilityBridge::view ( ) const
inlineoverridevirtual

Implements flutter::AccessibilityBridgeIos.

Definition at line 32 of file SemanticsObjectTestMocks.h.

32{ return view_; }

Member Data Documentation

◆ isVoiceOverRunningValue

bool flutter::testing::MockAccessibilityBridge::isVoiceOverRunningValue

Definition at line 50 of file SemanticsObjectTestMocks.h.

◆ observations

std::vector<SemanticsActionObservation> flutter::testing::MockAccessibilityBridge::observations

Definition at line 49 of file SemanticsObjectTestMocks.h.


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