Page MenuHomePhabricator

efl_access: Add attribute_del API, Add test cases for all access_object_attribute* APIs
ClosedPublic

Authored by shilpasingh on Mar 18 2019, 8:04 AM.

Details

Summary

Add attribute_del API, currently there is no provision to delete a particular attribute(key-value pair)
from the attribute list of a widget.
Add test cases for efl_access_attribute_append, efl_access_attributes_get, efl_access_attribute_del and efl_access_attributes_clear API

Test Plan

Query the attributes using atspi_accessible_get_attributes in atspi_client, the above attribute
should not be returned.

Signed-Off By: Shilpa Singh <shilpa.singh@samsung.com>

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
shilpasingh created this revision.Mar 18 2019, 8:04 AM
shilpasingh requested review of this revision.Mar 18 2019, 8:04 AM
kimcinoo added inline comments.Mar 18 2019, 2:58 PM
src/lib/elementary/efl_access_object.c
252

We do not need to set pd->attr_list to NULL if user deletes the last attribute?

bu5hm4n requested changes to this revision.Mar 19 2019, 11:03 AM
bu5hm4n added a subscriber: bu5hm4n.

This API lacks a bit of a usecase for me, and additionally a test would be good. Without this i cannot see the intend or reason for this patch ... :|

This revision now requires changes to proceed.Mar 19 2019, 11:03 AM

Added check for attr_list

@bu5hm4n
Please refer below patches, this API is continuation to existing access APIs
https://phab.enlightenment.org/D5524
https://phab.enlightenment.org/D5510

For accessibility case, actual testing is done from atspi-client, the above APIs can be tested
using atspi_accessible_get_attributes API from atspi-client. We do not have such client samples currently
in efl opensource. We do have it in product case where we are able to test all above cases.

Currently unable to add test code as we do not have any atspi-client to test.

Use case is as given below:
In screen-reading of widget, we can control a widget screen-reading behavior to major extent by using additional attributes.
for e.g. In spinner case whether wrap is set or not can be set as an additional attribute, this will be queried from atspi-client side and
based on which we enable looping/disable looping.

src/lib/elementary/efl_access_object.c
252

when there are no elements left in pd->attr_list, its set to NULL by eina_list_remove_list API itself

kimcinoo accepted this revision.Mar 20 2019, 12:33 AM
kimcinoo added inline comments.
src/lib/elementary/efl_access_object.c
252

Ah, it is set by "return_l = remove_list->next" in eina_list_remove_list. Then OK. Thank you.

I would like to merge this soon. The test case could be added by separated patch set (@bu5hm4n)

@shilpasingh is it not possible to add test case to efl/src/tests/elementary/efl_ui_test_atspi.c ?

I would like to merge this soon. The test case could be added by separated patch set (@bu5hm4n)

Don't get me wrong, but history has proven that this does not happen in a lot of cases, i would like to have that in one patch.

I would be indeed happy just with a little testcase that adds a attribute removes a non-existing key and then removes the key that is added, and then checks the count. Nothing big, but something which can be ran automatically, so some refactoring or so do *not* breakthis accidently :)

Added test cases for all access attribute APIs

I would like to merge this soon. The test case could be added by separated patch set (@bu5hm4n)

Don't get me wrong, but history has proven that this does not happen in a lot of cases, i would like to have that in one patch.

I would be indeed happy just with a little testcase that adds a attribute removes a non-existing key and then removes the key that is added, and then checks the count. Nothing big, but something which can be ran automatically, so some refactoring or so do *not* breakthis accidently :)

-> Added Test cases for all attributes APIs

@shilpasingh is it not possible to add test case to efl/src/tests/elementary/efl_ui_test_atspi.c ?

-> yes I missed, I have added, please check. All test cases are passing

shilpasingh retitled this revision from efl_access: Add attribute_del API to efl_access: Add attribute_del API, Add test cases for all access_object_attribute* APIs.Mar 20 2019, 4:05 AM
shilpasingh edited the summary of this revision. (Show Details)
shilpasingh edited the summary of this revision. (Show Details)

warning fixes

bu5hm4n accepted this revision.Mar 20 2019, 7:28 AM

Wonderfull :)

This revision is now accepted and ready to land.Mar 20 2019, 7:28 AM
Closed by commit rEFLe80169a844aa: efl_access: Add attribute_del API, Add test cases for all… (authored by shilpasingh, committed by Marcel Hollerbach <mail@marcel-hollerbach.de>). · Explain WhyMar 20 2019, 7:29 AM
This revision was automatically updated to reflect the committed changes.