projects
/
platform
/
core
/
uifw
/
at-spi2-atk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2008-05-16 Mark Doffman <mark.doffman@codethink.co.uk>
[platform/core/uifw/at-spi2-atk.git]
/
tests
/
testClient.py
diff --git
a/tests/testClient.py
b/tests/testClient.py
index
e9c1ea0
..
ebf53c8
100644
(file)
--- a/
tests/testClient.py
+++ b/
tests/testClient.py
@@
-5,7
+5,7
@@
from dbus.mainloop.glib import DBusGMainLoop
from xml.dom import minidom
from xml.dom import minidom
-from
AccessibleTreeCache import AccessibleTreeCache, AccessibleObjectProxy
+from
accessible_cache import AccessibleCache
DBusGMainLoop(set_as_default=True)
DBusGMainLoop(set_as_default=True)
@@
-13,7
+13,10
@@
def createNode(accessible, parentRef, parentElement):
e = minidom.Element("accessible")
e.attributes["reference"] = accessible.path
e = minidom.Element("accessible")
e.attributes["reference"] = accessible.path
- e.attributes["parent"] = accessible.parent
+ try:
+ e.attributes["parent"] = accessible.parent.path
+ except:
+ pass
e.attributes["name"] = accessible.name
e.attributes["role"] = str(int(accessible.role))
e.attributes["description"] = accessible.description
e.attributes["name"] = accessible.name
e.attributes["role"] = str(int(accessible.role))
e.attributes["description"] = accessible.description
@@
-23,8
+26,8
@@
def createNode(accessible, parentRef, parentElement):
itf.attributes["name"] = i
e.appendChild(itf)
itf.attributes["name"] = i
e.appendChild(itf)
- for
c in accessible.getChildren(
):
- createNode(
c
, accessible.path, e)
+ for
i in range(0, accessible.numChildren
):
+ createNode(
accessible.getChild(i)
, accessible.path, e)
parentElement.appendChild(e)
parentElement.appendChild(e)
@@
-34,7
+37,7
@@
def main(argv):
loop = gobject.MainLoop()
loop = gobject.MainLoop()
- cache = Accessible
Tree
Cache(bus, 'test.atspi.tree', '/org/freedesktop/atspi/tree')
+ cache = AccessibleCache(bus, 'test.atspi.tree', '/org/freedesktop/atspi/tree')
root = cache.getRootAccessible()
doc = minidom.Document()
root = cache.getRootAccessible()
doc = minidom.Document()