From: Mark Doffman Date: Mon, 18 Aug 2008 16:21:31 +0000 (+0100) Subject: 2008-08-18 Mark Doffman X-Git-Tag: AT_SPI2_CORE_0_1_3~149 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8fb9b40f6c2f082e7ce9aacaf69082b9d794ea17;p=platform%2Fupstream%2Fat-spi2-core.git 2008-08-18 Mark Doffman * configure.ac Add tests/data folder * tests/ Rename the accessible test app and the associated data *.xml --- diff --git a/configure.ac b/configure.ac index f50d584..371c33f 100644 --- a/configure.ac +++ b/configure.ac @@ -191,6 +191,7 @@ AC_CONFIG_FILES([Makefile login-helper/Makefile tests/dummyatk/Makefile tests/cspi/Makefile + tests/data/Makefile tests/pyatspi/Makefile tests/pyatspi/pasytest/Makefile tests/apps/Makefile diff --git a/tests/Makefile.am b/tests/Makefile.am index 4a6d94f..239fd4b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = dummyatk apps cspi pyatspi +SUBDIRS = dummyatk apps data cspi pyatspi #TESTS=testrunner.py TESTS_ENVIRONMENT = PYTHONPATH=$(abs_top_srcdir)/python \ diff --git a/tests/apps/Makefile.am b/tests/apps/Makefile.am index 9d13218..c058f82 100644 --- a/tests/apps/Makefile.am +++ b/tests/apps/Makefile.am @@ -1,5 +1,5 @@ check_PROGRAMS = test-application -check_LTLIBRARIES = libnoopapp.la libobjectapp.la libcomponentapp.la +check_LTLIBRARIES = libnoopapp.la libaccessibleapp.la libcomponentapp.la test_application_CFLAGS = $(DBUS_GLIB_CFLAGS) \ $(ATK_CFLAGS) \ @@ -22,10 +22,10 @@ libnoopapp_la_LDFLAGS = $(TEST_APP_LDFLAGS) libnoopapp_la_LIBADD = $(TEST_APP_LIBADD) libnoopapp_la_SOURCES = noop-app.c -libobjectapp_la_CFLAGS = $(TEST_APP_CFLAGS) $(LIB_XML_CFLAGS) -libobjectapp_la_LDFLAGS = $(TEST_APP_LDFLAGS) -libobjectapp_la_LIBADD = $(TEST_APP_LIBADD) $(LIB_XML_LIBS) -libobjectapp_la_SOURCES = object-app.c atk-object-xml-loader.c atk-object-xml-loader.h +libaccessibleapp_la_CFLAGS = $(TEST_APP_CFLAGS) $(LIB_XML_CFLAGS) +libaccessibleapp_la_LDFLAGS = $(TEST_APP_LDFLAGS) +libaccessibleapp_la_LIBADD = $(TEST_APP_LIBADD) $(LIB_XML_LIBS) +libaccessibleapp_la_SOURCES = accessible-app.c atk-object-xml-loader.c atk-object-xml-loader.h libcomponentapp_la_CFLAGS = $(TEST_APP_CFLAGS) libcomponentapp_la_LDFLAGS = $(TEST_APP_LDFLAGS) diff --git a/tests/apps/object-app.c b/tests/apps/accessible-app.c similarity index 93% rename from tests/apps/object-app.c rename to tests/apps/accessible-app.c index 35f1cab..408759b 100644 --- a/tests/apps/object-app.c +++ b/tests/apps/accessible-app.c @@ -8,7 +8,7 @@ static gchar *tdata_path = NULL; static AtkObject *root_accessible; -#define OBJECT_TEST_1 "object-test-stage1.xml" +#define OBJECT_TEST_1 "accessible-test.xml" G_MODULE_EXPORT void test_init (gchar *path) diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am new file mode 100644 index 0000000..b06736b --- /dev/null +++ b/tests/data/Makefile.am @@ -0,0 +1,3 @@ +EXTRA_DIST = \ + accessible-test.xml\ + accessible-test-results.xml diff --git a/tests/data/object-test-stage1-results.xml b/tests/data/accessible-test-results.xml similarity index 100% rename from tests/data/object-test-stage1-results.xml rename to tests/data/accessible-test-results.xml diff --git a/tests/data/object-test-stage1.xml b/tests/data/accessible-test.xml similarity index 100% rename from tests/data/object-test-stage1.xml rename to tests/data/accessible-test.xml diff --git a/tests/pyatspi/accessibletest.py b/tests/pyatspi/accessibletest.py index a504cca..bd95ba6 100644 --- a/tests/pyatspi/accessibletest.py +++ b/tests/pyatspi/accessibletest.py @@ -98,7 +98,9 @@ class AccessibleTest(_PasyTest): def test_getAttributes(self, test): - pass + root = self._cache.root + #TODO The AttributeSet test needs expanding. Check attributes are passed correctly. + attr = root.getAttributes() def test_parent(self, test): root = self._cache.root @@ -131,7 +133,9 @@ class AccessibleTest(_PasyTest): "Expected LocalizedRoleName - \"%s\". Recieved - \"%s\"" % (ans, res,)) def test_getRelationSet(self, test): - pass + root = self._cache.root + # Complete test of Relation interface is separate + rset = root.getRelationSet() def test_getRole(self, test): root = self._cache.root @@ -192,7 +196,7 @@ class AccessibleTest(_PasyTest): answer = doc.toprettyxml() correct = os.path.join(os.environ["TEST_DATA_DIRECTORY"], - "object-test-stage1-results.xml") + "accessible-test-results.xml") file = open(correct) cstring = file.read()