File: test_root_component.py

package info (click to toggle)
at-spi2-core 2.57.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,140 kB
  • sloc: ansic: 44,803; xml: 1,480; python: 387; sh: 239; makefile: 28; javascript: 13
file content (35 lines) | stat: -rw-r--r-- 1,458 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import pytest
import dbus

COMPONENT_IFACE = 'org.a11y.atspi.Component'

COORD_TYPE_WINDOW = 1
LAYER_WIDGET = 3

def test_contains(registry_root, session_manager):
    assert registry_root.Contains(0, 0, COORD_TYPE_WINDOW, dbus_interface=COMPONENT_IFACE) == False

def test_get_accessible_at_point(registry_root, session_manager):
    (name, path) = registry_root.GetAccessibleAtPoint(0, 0, COORD_TYPE_WINDOW, dbus_interface=COMPONENT_IFACE)
    assert path == '/org/a11y/atspi/null'

def test_get_extents(registry_root, session_manager):
    assert registry_root.GetExtents(COORD_TYPE_WINDOW, dbus_interface=COMPONENT_IFACE) == (0, 0, 1024, 768)

def test_get_position(registry_root, session_manager):
    assert registry_root.GetPosition(COORD_TYPE_WINDOW, dbus_interface=COMPONENT_IFACE) == (0, 0)

def test_get_size(registry_root, session_manager):
    assert registry_root.GetSize(dbus_interface=COMPONENT_IFACE) == (1024, 768)

def test_get_layer(registry_root, session_manager):
    assert registry_root.GetLayer(dbus_interface=COMPONENT_IFACE) == LAYER_WIDGET

def test_get_mdi_z_order(registry_root, session_manager):
    assert registry_root.GetMDIZOrder(dbus_interface=COMPONENT_IFACE) == 0

def test_grab_focus(registry_root, session_manager):
    assert registry_root.GrabFocus(dbus_interface=COMPONENT_IFACE) == False

def test_get_alpha(registry_root, session_manager):
    assert registry_root.GetAlpha(dbus_interface=COMPONENT_IFACE) == 1.0