Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter_runner_test::MockSemanticsManager Class Reference

#include <flutter_runner_fakes.h>

Inheritance diagram for flutter_runner_test::MockSemanticsManager:

Public Member Functions

 MockSemanticsManager ()
 
void RegisterViewForSemantics (fuchsia::ui::views::ViewRef view_ref, fuchsia::accessibility::semantics::SemanticListenerHandle handle, fidl::InterfaceRequest< fuchsia::accessibility::semantics::SemanticTree > semantic_tree) override
 
fidl::InterfaceRequestHandler< SemanticsManager > GetHandler (async_dispatcher_t *dispatcher)
 
bool RegisterViewCalled ()
 
void ResetTree ()
 
void UpdateSemanticNodes (std::vector< fuchsia::accessibility::semantics::Node > nodes) override
 
void DeleteSemanticNodes (std::vector< uint32_t > node_ids) override
 
const std::vector< uint32_t > & LastDeletedNodeIds () const
 
int DeleteCount () const
 
bool DeleteOverflowed () const
 
int UpdateCount () const
 
bool UpdateOverflowed () const
 
bool ShouldHoldCommitResponse () const
 
void SetShouldHoldCommitResponse (bool value)
 
void InvokeCommitCallback ()
 
int CommitCount () const
 
const std::vector< fuchsia::accessibility::semantics::Node > & LastUpdatedNodes () const
 
void CommitUpdates (CommitUpdatesCallback callback) override
 
void SendSemanticEvent (fuchsia::accessibility::semantics::SemanticEvent semantic_event, SendSemanticEventCallback callback) override
 
std::vector< fuchsia::accessibility::semantics::SemanticEvent > & GetLastEvents ()
 

Detailed Description

Definition at line 13 of file flutter_runner_fakes.h.

Constructor & Destructor Documentation

◆ MockSemanticsManager()

flutter_runner_test::MockSemanticsManager::MockSemanticsManager ( )
inline

Definition at line 17 of file flutter_runner_fakes.h.

17: tree_binding_(this) {}

Member Function Documentation

◆ CommitCount()

int flutter_runner_test::MockSemanticsManager::CommitCount ( ) const
inline

Definition at line 93 of file flutter_runner_fakes.h.

93{ return commit_count_; }

◆ CommitUpdates()

void flutter_runner_test::MockSemanticsManager::CommitUpdates ( CommitUpdatesCallback  callback)
inlineoverride

Definition at line 100 of file flutter_runner_fakes.h.

100 {
101 commit_count_++;
102 if (should_hold_commit_response_) {
103 commit_callback_ = std::move(callback);
104 return;
105 }
106 callback();
107 }
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback

◆ DeleteCount()

int flutter_runner_test::MockSemanticsManager::DeleteCount ( ) const
inline

Definition at line 75 of file flutter_runner_fakes.h.

75{ return delete_count_; }

◆ DeleteOverflowed()

bool flutter_runner_test::MockSemanticsManager::DeleteOverflowed ( ) const
inline

Definition at line 76 of file flutter_runner_fakes.h.

76{ return delete_overflowed_; }

◆ DeleteSemanticNodes()

void flutter_runner_test::MockSemanticsManager::DeleteSemanticNodes ( std::vector< uint32_t >  node_ids)
inlineoverride

Definition at line 60 of file flutter_runner_fakes.h.

60 {
61 delete_count_++;
62 if (!delete_overflowed_) {
63 size_t size =
64 sizeof(node_ids) +
66 delete_overflowed_ = size > ZX_CHANNEL_MAX_MSG_BYTES;
67 }
68 last_deleted_node_ids_ = std::move(node_ids);
69 }
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 Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259

◆ GetHandler()

fidl::InterfaceRequestHandler< SemanticsManager > flutter_runner_test::MockSemanticsManager::GetHandler ( async_dispatcher_t *  dispatcher)
inline

Definition at line 29 of file flutter_runner_fakes.h.

30 {
31 return bindings_.GetHandler(this, dispatcher);
32 }

◆ GetLastEvents()

std::vector< fuchsia::accessibility::semantics::SemanticEvent > & flutter_runner_test::MockSemanticsManager::GetLastEvents ( )
inline

Definition at line 117 of file flutter_runner_fakes.h.

117 {
118 return last_events_;
119 }

◆ InvokeCommitCallback()

void flutter_runner_test::MockSemanticsManager::InvokeCommitCallback ( )
inline

Definition at line 87 of file flutter_runner_fakes.h.

87 {
88 if (commit_callback_) {
89 commit_callback_();
90 }
91 }

◆ LastDeletedNodeIds()

const std::vector< uint32_t > & flutter_runner_test::MockSemanticsManager::LastDeletedNodeIds ( ) const
inline

Definition at line 71 of file flutter_runner_fakes.h.

71 {
72 return last_deleted_node_ids_;
73 }

◆ LastUpdatedNodes()

const std::vector< fuchsia::accessibility::semantics::Node > & flutter_runner_test::MockSemanticsManager::LastUpdatedNodes ( ) const
inline

Definition at line 95 of file flutter_runner_fakes.h.

96 {
97 return last_updated_nodes_;
98 }

◆ RegisterViewCalled()

bool flutter_runner_test::MockSemanticsManager::RegisterViewCalled ( )
inline

Definition at line 34 of file flutter_runner_fakes.h.

34{ return has_view_ref_; }

◆ RegisterViewForSemantics()

void flutter_runner_test::MockSemanticsManager::RegisterViewForSemantics ( fuchsia::ui::views::ViewRef  view_ref,
fuchsia::accessibility::semantics::SemanticListenerHandle  handle,
fidl::InterfaceRequest< fuchsia::accessibility::semantics::SemanticTree >  semantic_tree 
)
inlineoverride

Definition at line 20 of file flutter_runner_fakes.h.

24 {
25 tree_binding_.Bind(std::move(semantic_tree));
26 has_view_ref_ = true;
27 }

◆ ResetTree()

void flutter_runner_test::MockSemanticsManager::ResetTree ( )
inline

Definition at line 36 of file flutter_runner_fakes.h.

36 {
37 update_count_ = 0;
38 delete_count_ = 0;
39 commit_count_ = 0;
40 last_updated_nodes_.clear();
41 last_deleted_node_ids_.clear();
42 delete_overflowed_ = false;
43 update_overflowed_ = false;
44 }

◆ SendSemanticEvent()

void flutter_runner_test::MockSemanticsManager::SendSemanticEvent ( fuchsia::accessibility::semantics::SemanticEvent  semantic_event,
SendSemanticEventCallback  callback 
)
inlineoverride

Definition at line 109 of file flutter_runner_fakes.h.

111 {
112 last_events_.emplace_back(std::move(semantic_event));
113 callback();
114 }

◆ SetShouldHoldCommitResponse()

void flutter_runner_test::MockSemanticsManager::SetShouldHoldCommitResponse ( bool  value)
inline

Definition at line 83 of file flutter_runner_fakes.h.

83 {
84 should_hold_commit_response_ = value;
85 }
uint8_t value

◆ ShouldHoldCommitResponse()

bool flutter_runner_test::MockSemanticsManager::ShouldHoldCommitResponse ( ) const
inline

Definition at line 81 of file flutter_runner_fakes.h.

81{ return should_hold_commit_response_; }

◆ UpdateCount()

int flutter_runner_test::MockSemanticsManager::UpdateCount ( ) const
inline

Definition at line 78 of file flutter_runner_fakes.h.

78{ return update_count_; }

◆ UpdateOverflowed()

bool flutter_runner_test::MockSemanticsManager::UpdateOverflowed ( ) const
inline

Definition at line 79 of file flutter_runner_fakes.h.

79{ return update_overflowed_; }

◆ UpdateSemanticNodes()

void flutter_runner_test::MockSemanticsManager::UpdateSemanticNodes ( std::vector< fuchsia::accessibility::semantics::Node >  nodes)
inlineoverride

Definition at line 46 of file flutter_runner_fakes.h.

47 {
48 update_count_++;
49 if (!update_overflowed_) {
50 size_t size = 0;
51 for (const auto& node : nodes) {
52 size += sizeof(node);
53 size += sizeof(node.attributes().label().size());
54 }
55 update_overflowed_ = size > ZX_CHANNEL_MAX_MSG_BYTES;
56 }
57 last_updated_nodes_ = std::move(nodes);
58 }

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