forked from illinois-dres-aitg/atta-msaa-iaccessible2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
atta_ia2.py
50 lines (41 loc) · 1.46 KB
/
atta_ia2.py
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env python27
#
# ia2_atta
#
# Accessible Technology Test Adapter for MSAA+IAccessible2
# Tests MSAA+IAccessible2 (server-side) implementations via MSAA+IAccessible2 (client-side)
#
# Developed by Jon Gunderson, Bei Zhang and Naijing Zhang
# Copyright (c) 2017 University of Illinois
# Based on the ATTAs developed by Joanmarie Diggs (@joanmarie)
#
# For license information, see:
# https://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html
# import argparse
import re
import sys
import threading
import signal
from win_atta_base import Atta
from win_atta_base import get_cmdline_options
import pyia2
from pyia2.utils import IA2Lib
from pyia2.utils import AccessibleDocument
class IAccessible2Atta(Atta):
"""Accessible Technology Test Adapter to test IAccessible2 support."""
def __init__(self, host, port, ansi_formatting, name="ATTA for IA2", version="0.5", api="IAccessible2"):
"""Initializes this ATTA."""
super(IAccessible2Atta, self).__init__(host, port, name, version, api, Atta.LOG_INFO)
get_cmdline_options()
# Function moved to win_atta_base
if __name__ == "__main__":
print("Starting ATTA for IAccessible2 Interfaces")
ia2_atta = IAccessible2Atta("localhost", 4119, False)
if not ia2_atta.is_enabled():
print("ia2_atta is not enabled.")
sys.exit(1)
ia2_atta.start(ia2_atta)
pyia2.Registry.start()
print("Shutting down...")
ia2_atta.shutdown(ia2_atta, signal.SIGTERM)
sys.exit(1)