class ComponentContextForTest
Defined at line 22 of file ../../src/sys/fuzzing/common/testing/component-context.h
This class is a wrapper around |sys::ComponentContext| that provides some additional common
behaviors, such as making an |async::Loop| and scheduling a primary task on an |async::Executor|.
Public Methods
ComponentContextPtr Create ()
Creates a component context. Unlike the the base class, this method does not consumes any
startup handles. Instead, use |PutChannel| to add handles in order to serve FIDL protocols.
Defined at line 12 of file ../../src/sys/fuzzing/common/testing/component-context.cc
void ~ComponentContextForTest ()
Defined at line 24 of file ../../src/sys/fuzzing/common/testing/component-context.h
ComponentContextPtr Create (ExecutorPtr executor)
Like |Create|, but does not have a loop and does not own its |executor|. This can be useful for
tests that provide an executor using a test loop dispatcher.
Defined at line 25 of file ../../src/sys/fuzzing/common/testing/component-context.cc
void PutChannel (uint32_t arg, zx::channel )
Adds a channel as if it had been passed as the |PA_HND(PA_USER0, arg)| startup handle.
Defined at line 36 of file ../../src/sys/fuzzing/common/testing/component-context.cc
zx::channel TakeChannel (uint32_t arg)
If |PutChannel| was called with the given |arg|, returns that channel; otherwise, returns an
invalid channel.
Defined at line 42 of file ../../src/sys/fuzzing/common/testing/component-context.cc
zx_status_t Run ()
These use the test loop, if set. Otherwise, they dispatch to the base class.
Defined at line 52 of file ../../src/sys/fuzzing/common/testing/component-context.cc
zx_status_t RunUntilIdle ()
Defined at line 54 of file ../../src/sys/fuzzing/common/testing/component-context.cc