Documentation
¶
Overview ¶
Package atspitest runs real at-spi2-core for a test and reads the accessible tree the way an assistive technology does: the bus launcher brings up the accessibility bus on a private session bus, the registry daemon serves the desktop, and the test walks the applications under it over the accessibility bus.
Index ¶
Constants ¶
const LibexecEnv = "ATSPI_LIBEXEC"
LibexecEnv names the environment variable that points at at-spi2-core's libexec directory, where at-spi-bus-launcher and at-spi2-registryd live off PATH.
const SchemaDirEnv = "ATSPI_GSETTINGS_SCHEMA_DIR"
SchemaDirEnv names the environment variable that points at the compiled GSettings schemas holding org.gnome.desktop.interface: the bus launcher keeps the accessibility switch in its toolkit-accessibility key, and without the schema IsEnabled reads false whatever was set.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Accessible ¶
type Accessible struct {
Bus string
Path dbus.ObjectPath
// contains filtered or unexported fields
}
Accessible is one object on the accessibility bus.
func (Accessible) Children ¶
func (a Accessible) Children() ([]Accessible, error)
Children are the accessible's children in order.
func (Accessible) Name ¶
func (a Accessible) Name() (string, error)
Name is the accessible's name, as a screen reader speaks it.
func (Accessible) Names ¶
func (a Accessible) Names() ([]string, error)
Names walks the tree under a, a first, depth first in child order, and lists every name read.
func (Accessible) Object ¶
func (a Accessible) Object() dbus.BusObject
Object is the accessible's D-Bus object, for the interfaces this package does not read.
type Core ¶
type Core struct {
// Session is the private session bus the test now runs on:
// DBUS_SESSION_BUS_ADDRESS names it, so an application started
// after Start discovers the accessibility bus through it.
Session *dbustest.Bus
// AT is the assistive technology's connection to the
// accessibility bus.
AT *dbus.Conn
}
Core is real at-spi2-core serving one test.
func Start ¶
Start brings up at-spi-bus-launcher on a private session bus and at-spi2-registryd on the accessibility bus it starts, and waits until the registry owns its name; everything stops at cleanup, and a daemon left behind fails the test. Without LibexecEnv the test skips.
func (*Core) Application ¶
func (c *Core) Application(t *testing.T, toolkit string) Accessible
Application waits until exactly one application whose toolkit is toolkit sits under the desktop and returns its root.
func (*Core) Desktop ¶
func (c *Core) Desktop() Accessible
Desktop is the registry's desktop, the root every application embeds under.