+++ /dev/null
-#include <string.h>
-#include <getopt.h>
-#include <stdlib.h>
-#include <test-harness.h>
-#include "tct-dali-toolkit-accessibility-core.h"
-
-int main(int argc, char * const argv[])
-{
- int result = TestHarness::EXIT_STATUS_BAD_ARGUMENT;
-
- const char* optString = "sf";
- bool optRerunFailed(true);
- bool optRunSerially(false);
-
- int nextOpt = 0;
- do
- {
- nextOpt = getopt( argc, argv, optString );
- switch(nextOpt)
- {
- case 'f':
- optRerunFailed = false;
- break;
- case 's':
- optRunSerially = true;
- break;
- case '?':
- TestHarness::Usage(argv[0]);
- exit(TestHarness::EXIT_STATUS_BAD_ARGUMENT);
- break;
- }
- } while( nextOpt != -1 );
-
- if( optind == argc ) // no testcase name in argument list
- {
- if( optRunSerially )
- {
- result = TestHarness::RunAll( argv[0], tc_array );
- }
- else
- {
- result = TestHarness::RunAllInParallel( argv[0], tc_array, optRerunFailed );
- }
- }
- else
- {
- // optind is index of next argument - interpret as testcase name
- result = TestHarness::FindAndRunTestCase(tc_array, argv[optind]);
- }
- return result;
-}
# List of test case sources (Only these get parsed for test cases)
SET(TC_SOURCES
utc-Dali-AddOns.cpp
+ utc-Dali-Accessibility-Accessible.cpp
+ utc-Dali-Accessibility-Controls.cpp
+ utc-Dali-Accessibility-Controls-BridgeUp.cpp
+ utc-Dali-Accessibility-Text.cpp
+ utc-Dali-Accessibility-Value.cpp
utc-Dali-BidirectionalSupport.cpp
utc-Dali-ColorConversion.cpp
utc-Dali-Control-internal.cpp
dali-toolkit-test-utils/toolkit-text-utils.cpp
dali-toolkit-test-utils/dummy-visual.cpp
dali-toolkit-test-utils/test-addon-manager.cpp
+ dali-toolkit-test-utils/accessibility-test-utils.cpp
)
PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
-#include <automated-tests/src/dali-toolkit-accessibility/dali-toolkit-accessibility-test-utils.h>
+#include <automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/accessibility-test-utils.h>
#include <dali-toolkit-test-suite-utils.h>
namespace Dali {
return false;
}
}
-}
\ No newline at end of file
+}
#include <dali-toolkit/dali-toolkit.h>
#include <dali/devel-api/adaptor-framework/accessibility.h>
+#include <dali/devel-api/adaptor-framework/accessibility-impl.h>
void utc_dali_toolkit_accessibility_accessible_startup(void)
{
ToolkitTestApplication application;
auto check_box_button = Toolkit::CheckBoxButton::New();
- check_box_button.SetLabelText( "button" );
+ //check_box_button.SetLabelText( "button" );
+ check_box_button.SetProperty(Toolkit::Button::Property::LABEL, "button");
auto q = Dali::Accessibility::Accessible::Get( check_box_button );
DALI_TEST_CHECK( q );
DALI_TEST_EQUALS( q->GetName(), "button", TEST_LOCATION );
#include <dali-toolkit-test-suite-utils.h>
-#include <automated-tests/src/dali-toolkit-accessibility/dali-toolkit-accessibility-test-utils.h>
+#include <automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/accessibility-test-utils.h>
#include <dali-toolkit/dali-toolkit.h>
#include <dali/devel-api/adaptor-framework/accessibility.h>
+#include <dali/devel-api/adaptor-framework/accessibility-impl.h>
+#include <dali-toolkit/devel-api/controls/control-devel.h>
#include <dali-toolkit/devel-api/controls/text-controls/text-selection-popup.h>
#include <dali/devel-api/actors/actor-devel.h>
+#include <dali/devel-api/common/stage.h>
#include <cstdlib>
using namespace Dali::Toolkit;
-using DBusWrapper = Dali::Accessibility::DBusWrapper;
+//using DBusWrapper = Dali::Accessibility::DBusWrapper; // FIXME
+
+namespace Dali::Accessibility::TestDBusWrapper { struct error {}; } // FIXME
void utc_dali_accessibility_controls_bridge_up_startup(void)
{
{
test_return_value = TET_PASS;
//DBusWrapper::Install({}) is a de-install
- DBusWrapper::Install({});
+ //DBusWrapper::Install({}); // FIXME
}
namespace Dali {
DALI_TEST_EQUALS( "Accessibility_Name" , q->GetName(), TEST_LOCATION );
DALI_TEST_EQUALS( control.GetProperty( DevelControl::Property::ACCESSIBILITY_NAME ).Get< std::string >() , "Accessibility_Name", TEST_LOCATION );
- control.AccessibilityGetNameSignal().Connect( [] (std::string &accessibility_name) {
+ DevelControl::AccessibilityGetNameSignal(control).Connect( [] (std::string &accessibility_name) {
accessibility_name = "Accessibility_Name_With_Callback"; } );
DALI_TEST_EQUALS( "Accessibility_Name_With_Callback" , q->GetName(), TEST_LOCATION );
DALI_TEST_EQUALS( "" , q->GetDescription(), TEST_LOCATION );
- control.SetProperty( Control::Property::ACCESSIBILITY_DESCRIPTION, "Accessibility_Description" );
+ control.SetProperty( DevelControl::Property::ACCESSIBILITY_DESCRIPTION, "Accessibility_Description" );
DALI_TEST_EQUALS( "Accessibility_Description" , q->GetDescription(), TEST_LOCATION );
- auto property = control.GetProperty( Control::Property::ACCESSIBILITY_DESCRIPTION ).Get<std::string>();
+ auto property = control.GetProperty( DevelControl::Property::ACCESSIBILITY_DESCRIPTION ).Get<std::string>();
DALI_TEST_EQUALS( "Accessibility_Description", property, TEST_LOCATION );
- control.AccessibilityGetDescriptionSignal().Connect( [] (std::string &accessibility_description) {
+ DevelControl::AccessibilityGetDescriptionSignal(control).Connect( [] (std::string &accessibility_description) {
accessibility_description = "Accessibility_Description_With_Callback"; } );
DALI_TEST_EQUALS( "Accessibility_Description_With_Callback" , q->GetDescription(), TEST_LOCATION );
auto role_unknown = Dali::Accessibility::Role::UNKNOWN;
auto role_pushbutton = Dali::Accessibility::Role::PUSH_BUTTON;
- DALI_TEST_EQUALS( role_unknown,control.GetProperty( Control::Property::ACCESSIBILITY_ROLE ).Get< Dali::Accessibility::Role >(), TEST_LOCATION );
+ DALI_TEST_EQUALS( role_unknown,control.GetProperty( DevelControl::Property::ACCESSIBILITY_ROLE ).Get< Dali::Accessibility::Role >(), TEST_LOCATION );
auto q = Dali::Accessibility::Accessible::Get( control );
DALI_TEST_EQUALS( role_unknown , q->GetRole(), TEST_LOCATION);
DALI_TEST_EQUALS( "unknown" , TestGetRoleName( q->GetAddress() ), TEST_LOCATION );
DALI_TEST_EQUALS( "unknown" , TestGetLocalizedRoleName( q->GetAddress() ), TEST_LOCATION );
- control.SetProperty( Control::Property::ACCESSIBILITY_ROLE, role_pushbutton );
+ control.SetProperty( DevelControl::Property::ACCESSIBILITY_ROLE, role_pushbutton );
DALI_TEST_EQUALS( static_cast< uint32_t >( role_pushbutton ), TestGetRole( q->GetAddress() ), TEST_LOCATION );
DALI_TEST_EQUALS( "push button" ,TestGetRoleName( q->GetAddress() ), TEST_LOCATION );
Dali::Accessibility::TestEnableSC( true );
auto states_by_bridge = Dali::Accessibility::States { TestGetStates( q->GetAddress() )};
- auto states = control.GetAccessibilityStates();
+ auto states = DevelControl::GetAccessibilityStates(control);
DALI_TEST_CHECK( states_by_bridge == states );
Dali::Accessibility::TestEnableSC( false );
{
ToolkitTestApplication application;
auto control = TextSelectionPopup::New( NULL );
- auto states = control.GetAccessibilityStates();
+ auto states = DevelControl::GetAccessibilityStates(control);
DALI_TEST_CHECK( states[ Dali::Accessibility::State::MODAL ] );
ToolkitTestApplication application;
auto control = Control::New();
- auto noneset = control.GetProperty( Control::Property::ACCESSIBILITY_HIGHLIGHTABLE );
+ auto noneset = control.GetProperty( DevelControl::Property::ACCESSIBILITY_HIGHLIGHTABLE );
DALI_TEST_EQUALS( Property::NONE, noneset.GetType(), TEST_LOCATION );
auto q = Dali::Accessibility::Accessible::Get( control );
auto states_by_bridge = Dali::Accessibility::States { TestGetStates( q->GetAddress() )};
DALI_TEST_CHECK( states_by_bridge[ Dali::Accessibility::State::HIGHLIGHTABLE ] );
- control.SetProperty( Control::Property::ACCESSIBILITY_HIGHLIGHTABLE, true );
- DALI_TEST_EQUALS( Property::BOOLEAN, control.GetProperty( Control::Property::ACCESSIBILITY_HIGHLIGHTABLE ).GetType(), TEST_LOCATION );
- DALI_TEST_EQUALS( true, control.GetProperty( Control::Property::ACCESSIBILITY_HIGHLIGHTABLE ).Get< bool >(), TEST_LOCATION );
+ control.SetProperty( DevelControl::Property::ACCESSIBILITY_HIGHLIGHTABLE, true );
+ DALI_TEST_EQUALS( Property::BOOLEAN, control.GetProperty( DevelControl::Property::ACCESSIBILITY_HIGHLIGHTABLE ).GetType(), TEST_LOCATION );
+ DALI_TEST_EQUALS( true, control.GetProperty( DevelControl::Property::ACCESSIBILITY_HIGHLIGHTABLE ).Get< bool >(), TEST_LOCATION );
states_by_bridge = Dali::Accessibility::States { TestGetStates( q->GetAddress() )};
DALI_TEST_CHECK( states_by_bridge[ Dali::Accessibility::State::HIGHLIGHTABLE ] );
- control.SetProperty( Control::Property::ACCESSIBILITY_HIGHLIGHTABLE, false );
- DALI_TEST_EQUALS( Property::BOOLEAN, control.GetProperty( Control::Property::ACCESSIBILITY_HIGHLIGHTABLE ).GetType(), TEST_LOCATION );
- DALI_TEST_EQUALS( false, control.GetProperty( Control::Property::ACCESSIBILITY_HIGHLIGHTABLE ).Get< bool >(), TEST_LOCATION );
+ control.SetProperty( DevelControl::Property::ACCESSIBILITY_HIGHLIGHTABLE, false );
+ DALI_TEST_EQUALS( Property::BOOLEAN, control.GetProperty( DevelControl::Property::ACCESSIBILITY_HIGHLIGHTABLE ).GetType(), TEST_LOCATION );
+ DALI_TEST_EQUALS( false, control.GetProperty( DevelControl::Property::ACCESSIBILITY_HIGHLIGHTABLE ).Get< bool >(), TEST_LOCATION );
states_by_bridge = Dali::Accessibility::States { TestGetStates( q->GetAddress() )};
DALI_TEST_CHECK( !states_by_bridge[ Dali::Accessibility::State::HIGHLIGHTABLE ] );
DALI_TEST_CHECK( !states_by_bridge_a[ Dali::Accessibility::State::HIGHLIGHTED ] );
DALI_TEST_CHECK( !states_by_bridge_b[ Dali::Accessibility::State::HIGHLIGHTED ] );
- DALI_TEST_EQUALS( true, controla.GrabAccessibilityHighlight(), TEST_LOCATION );
+ DALI_TEST_EQUALS( true, DevelControl::GrabAccessibilityHighlight(controla), TEST_LOCATION );
states_by_bridge_a = Dali::Accessibility::States { TestGetStates( a->GetAddress() )};
states_by_bridge_b = Dali::Accessibility::States { TestGetStates( b->GetAddress() )};
DALI_TEST_CHECK( states_by_bridge_a[ Dali::Accessibility::State::HIGHLIGHTED ] );
DALI_TEST_CHECK( !states_by_bridge_b[ Dali::Accessibility::State::HIGHLIGHTED ] );
- DALI_TEST_EQUALS( true, controlb.GrabAccessibilityHighlight(), TEST_LOCATION );
- DALI_TEST_EQUALS( true, controlb.GrabAccessibilityHighlight(), TEST_LOCATION );
+ DALI_TEST_EQUALS( true, DevelControl::GrabAccessibilityHighlight(controlb), TEST_LOCATION );
+ DALI_TEST_EQUALS( true, DevelControl::GrabAccessibilityHighlight(controlb), TEST_LOCATION );
states_by_bridge_a = Dali::Accessibility::States { TestGetStates( a->GetAddress() )};
states_by_bridge_b = Dali::Accessibility::States { TestGetStates( b->GetAddress() )};
DALI_TEST_CHECK( !states_by_bridge_a[ Dali::Accessibility::State::HIGHLIGHTED ] );
DALI_TEST_CHECK( states_by_bridge_b[ Dali::Accessibility::State::HIGHLIGHTED ] );
- DALI_TEST_EQUALS( false, controla.ClearAccessibilityHighlight(), TEST_LOCATION );
+ DALI_TEST_EQUALS( false, DevelControl::ClearAccessibilityHighlight(controla), TEST_LOCATION );
states_by_bridge_a = Dali::Accessibility::States { TestGetStates( a->GetAddress() )};
states_by_bridge_b = Dali::Accessibility::States { TestGetStates( b->GetAddress() )};
DALI_TEST_CHECK( !states_by_bridge_a[ Dali::Accessibility::State::HIGHLIGHTED ] );
DALI_TEST_CHECK( states_by_bridge_b[ Dali::Accessibility::State::HIGHLIGHTED ] );
- DALI_TEST_EQUALS( true, controlb.ClearAccessibilityHighlight(), TEST_LOCATION );
+ DALI_TEST_EQUALS( true, DevelControl::ClearAccessibilityHighlight(controlb), TEST_LOCATION );
states_by_bridge_a = Dali::Accessibility::States { TestGetStates( a->GetAddress() )};
states_by_bridge_b = Dali::Accessibility::States { TestGetStates( b->GetAddress() )};
std::string value;
- auto attributes = check_box_button.GetProperty( Toolkit::Control::Property::ACCESSIBILITY_ATTRIBUTES );
+ auto attributes = check_box_button.GetProperty( Toolkit::DevelControl::Property::ACCESSIBILITY_ATTRIBUTES );
auto attributes_map = attributes.GetMap();
auto position = attributes_map->Find( "access_key1" );
DALI_TEST_CHECK( !position );
- check_box_button.AppendAccessibilityAttribute( "access_key1", "access_value1" );
- attributes = check_box_button.GetProperty( Toolkit::Control::Property::ACCESSIBILITY_ATTRIBUTES );
+ DevelControl::AppendAccessibilityAttribute( check_box_button, "access_key1", "access_value1" );
+ attributes = check_box_button.GetProperty( Toolkit::DevelControl::Property::ACCESSIBILITY_ATTRIBUTES );
attributes_map = attributes.GetMap();
DALI_TEST_EQUALS( (attributes_map->Find( "access_key1" ))->Get<std::string>(), "access_value1", TEST_LOCATION );
- check_box_button.AppendAccessibilityAttribute( "access_key2", "access_value2_a" );
- attributes = check_box_button.GetProperty( Toolkit::Control::Property::ACCESSIBILITY_ATTRIBUTES );
+ DevelControl::AppendAccessibilityAttribute( check_box_button, "access_key2", "access_value2_a" );
+ attributes = check_box_button.GetProperty( Toolkit::DevelControl::Property::ACCESSIBILITY_ATTRIBUTES );
attributes_map = attributes.GetMap();
DALI_TEST_EQUALS( (attributes_map->Find( "access_key1" ))->Get<std::string>(), "access_value1", TEST_LOCATION );
DALI_TEST_EQUALS( (attributes_map->Find( "access_key2" ))->Get<std::string>(), "access_value2_a", TEST_LOCATION );
- check_box_button.AppendAccessibilityAttribute( "access_key2", "access_value2_b" );
- attributes = check_box_button.GetProperty( Toolkit::Control::Property::ACCESSIBILITY_ATTRIBUTES );
+ DevelControl::AppendAccessibilityAttribute( check_box_button, "access_key2", "access_value2_b" );
+ attributes = check_box_button.GetProperty( Toolkit::DevelControl::Property::ACCESSIBILITY_ATTRIBUTES );
attributes_map = attributes.GetMap();
DALI_TEST_EQUALS( (attributes_map->Find( "access_key2" ))->Get<std::string>(), "access_value2_b", TEST_LOCATION );
- check_box_button.RemoveAccessibilityAttribute( "access_key2" );
- attributes = check_box_button.GetProperty( Toolkit::Control::Property::ACCESSIBILITY_ATTRIBUTES );
+ DevelControl::RemoveAccessibilityAttribute( check_box_button, "access_key2" );
+ attributes = check_box_button.GetProperty( Toolkit::DevelControl::Property::ACCESSIBILITY_ATTRIBUTES );
attributes_map = attributes.GetMap();
// In case when we are removing one of attributes the property is setting for NONE type.
for (auto it : attribute_map_bridge)
DALI_TEST_EQUALS( (attributes_map->Find( it.first ))->Get<std::string>(), it.second, TEST_LOCATION );
- check_box_button.ClearAccessibilityAttributes();
- attributes = check_box_button.GetProperty( Toolkit::Control::Property::ACCESSIBILITY_ATTRIBUTES );
+ DevelControl::ClearAccessibilityAttributes(check_box_button);
+ attributes = check_box_button.GetProperty( Toolkit::DevelControl::Property::ACCESSIBILITY_ATTRIBUTES );
attributes_map = attributes.GetMap();
position = attributes_map->Find( "access_key1" );
ToolkitTestApplication application;
auto control = Control::New();
- auto reading_info_type = control.GetAccessibilityReadingInfoType();
- reading_info_type[Dali::Accessibility::ReadingInfoType::Description] = true;
- reading_info_type[Dali::Accessibility::ReadingInfoType::State] = true;
- reading_info_type[Dali::Accessibility::ReadingInfoType::Name] = true;
- reading_info_type[Dali::Accessibility::ReadingInfoType::Role] = true;
+ auto reading_info_type = DevelControl::GetAccessibilityReadingInfoType(control);
+ reading_info_type[Dali::Accessibility::ReadingInfoType::DESCRIPTION] = true;
+ reading_info_type[Dali::Accessibility::ReadingInfoType::STATE] = true;
+ reading_info_type[Dali::Accessibility::ReadingInfoType::NAME] = true;
+ reading_info_type[Dali::Accessibility::ReadingInfoType::ROLE] = true;
- control.SetAccessibilityReadingInfoType(reading_info_type);
+ DevelControl::SetAccessibilityReadingInfoType(control, reading_info_type);
- auto q = control.GetProperty( Toolkit::Control::Property::ACCESSIBILITY_ATTRIBUTES );
+ auto q = control.GetProperty( Toolkit::DevelControl::Property::ACCESSIBILITY_ATTRIBUTES );
auto z = q.GetMap();
DALI_TEST_EQUALS( (z->Find( "reading_info_type" ))->Get<std::string>(), "name|role|description|state", TEST_LOCATION );
- reading_info_type = control.GetAccessibilityReadingInfoType();
+ reading_info_type = DevelControl::GetAccessibilityReadingInfoType(control);
for ( auto i = 0u; i < 4; ++i)
DALI_TEST_CHECK ( reading_info_type[ static_cast< Dali::Accessibility::ReadingInfoType >( i ) ]);
Dali::Accessibility::TestEnableSC( true );
auto accessible = Dali::Accessibility::Accessible::Get( control );
- auto gesture_one = Dali::Accessibility::GestureInfo { Dali::Accessibility::Gesture::OneFingerFlickLeft, 600, 100, 500, 500, Dali::Accessibility::GestureState::Begin, 1000 };
- auto gesture_two = Dali::Accessibility::GestureInfo { Dali::Accessibility::Gesture::OneFingerFlickRight, 600, 100, 500, 500, Dali::Accessibility::GestureState::Begin, 1000 };
+ auto gesture_one = Dali::Accessibility::GestureInfo { Dali::Accessibility::Gesture::ONE_FINGER_FLICK_LEFT, 600, 100, 500, 500, Dali::Accessibility::GestureState::BEGIN, 1000 };
+ auto gesture_two = Dali::Accessibility::GestureInfo { Dali::Accessibility::Gesture::ONE_FINGER_FLICK_RIGHT, 600, 100, 500, 500, Dali::Accessibility::GestureState::BEGIN, 1000 };
DALI_TEST_CHECK( !accessible->DoGesture( gesture_one ) );
- DALI_TEST_CHECK( !TestDoGesture( accessible->GetAddress(), Dali::Accessibility::Gesture::OneFingerFlickLeft, 600, 100, 500, 500, Dali::Accessibility::GestureState::Begin, 1000 ) );
+ DALI_TEST_CHECK( !TestDoGesture( accessible->GetAddress(), Dali::Accessibility::Gesture::ONE_FINGER_FLICK_LEFT, 600, 100, 500, 500, Dali::Accessibility::GestureState::BEGIN, 1000 ) );
- control.AccessibilityDoGestureSignal().Connect( [] ( std::pair< Dali::Accessibility::GestureInfo, bool > &gesture ) {
- if ( gesture.first.type == Dali::Accessibility::Gesture::OneFingerFlickLeft )
+ DevelControl::AccessibilityDoGestureSignal(control).Connect( [] ( std::pair< Dali::Accessibility::GestureInfo, bool > &gesture ) {
+ if ( gesture.first.type == Dali::Accessibility::Gesture::ONE_FINGER_FLICK_LEFT )
gesture.second = true;
else
gesture.second = false;
} );
DALI_TEST_CHECK( accessible->DoGesture( gesture_one ) );
- DALI_TEST_CHECK( TestDoGesture( accessible->GetAddress(), Dali::Accessibility::Gesture::OneFingerFlickLeft, 600, 100, 500, 500, Dali::Accessibility::GestureState::Begin, 1000 ) );
+ DALI_TEST_CHECK( TestDoGesture( accessible->GetAddress(), Dali::Accessibility::Gesture::ONE_FINGER_FLICK_LEFT, 600, 100, 500, 500, Dali::Accessibility::GestureState::BEGIN, 1000 ) );
DALI_TEST_CHECK( !accessible->DoGesture( gesture_two ) );
- DALI_TEST_CHECK( !TestDoGesture( accessible->GetAddress(), Dali::Accessibility::Gesture::OneFingerFlickRight, 600, 100, 500, 500, Dali::Accessibility::GestureState::Begin, 1000 ) );
+ DALI_TEST_CHECK( !TestDoGesture( accessible->GetAddress(), Dali::Accessibility::Gesture::ONE_FINGER_FLICK_RIGHT, 600, 100, 500, 500, Dali::Accessibility::GestureState::BEGIN, 1000 ) );
Dali::Accessibility::TestEnableSC( false );
ToolkitTestApplication application;
Dali::Accessibility::TestEnableSC( true );
- auto rel = Accessibility::RelationType::FlowsTo;
+ auto rel = Accessibility::RelationType::FLOWS_TO;
auto number = static_cast< size_t >( rel );
auto control = Control::New();
auto destination1 = Control::New();
auto destination2 = Control::New();
- control.AppendAccessibilityRelation( destination1, rel );
- auto relations = control.GetAccessibilityRelations();
+ DevelControl::AppendAccessibilityRelation( control, destination1, rel );
+ auto relations = DevelControl::GetAccessibilityRelations(control);
DALI_TEST_CHECK( relations[ number ].size() == 1 );
- control.AppendAccessibilityRelation( destination2, rel );
- relations = control.GetAccessibilityRelations();
+ DevelControl::AppendAccessibilityRelation( control, destination2, rel );
+ relations = DevelControl::GetAccessibilityRelations(control);
DALI_TEST_CHECK( relations[ number ].size() == 2 );
auto accessible = Dali::Accessibility::Accessible::Get( control );
DALI_TEST_CHECK( relationset[0].targets[0] == std::get<1>( relationset_bridge[0] )[0] || relationset[0].targets[1] == std::get<1>( relationset_bridge[0] )[0] );
DALI_TEST_CHECK( relationset[0].targets[0] == std::get<1>( relationset_bridge[0] )[1] || relationset[0].targets[1] == std::get<1>( relationset_bridge[0] )[1] );
- control.RemoveAccessibilityRelation(destination2,rel);
- relations = control.GetAccessibilityRelations();
+ DevelControl::RemoveAccessibilityRelation(control,destination2,rel);
+ relations = DevelControl::GetAccessibilityRelations(control);
DALI_TEST_CHECK( relations[ number ].size() == 1 );
- control.ClearAccessibilityRelations();
- relations = control.GetAccessibilityRelations();
+ DevelControl::ClearAccessibilityRelations(control);
+ relations = DevelControl::GetAccessibilityRelations(control);
DALI_TEST_CHECK( relations[ number ].size() == 0 );
Dali::Accessibility::TestEnableSC( false );
auto accessible_obj = Dali::Accessibility::Accessible::Get( control );
auto accessible_component = dynamic_cast<Dali::Accessibility::Component*>(accessible_obj);
DALI_TEST_CHECK( accessible_component );
- DALI_TEST_EQUALS( Dali::Accessibility::ComponentLayer::Window, accessible_component -> GetLayer(), TEST_LOCATION );
- DALI_TEST_EQUALS( Dali::Accessibility::ComponentLayer::Window, TestGetLayer( accessible_component -> GetAddress() ), TEST_LOCATION );
+ DALI_TEST_EQUALS( Dali::Accessibility::ComponentLayer::WINDOW, accessible_component -> GetLayer(), TEST_LOCATION );
+ DALI_TEST_EQUALS( Dali::Accessibility::ComponentLayer::WINDOW, TestGetLayer( accessible_component -> GetAddress() ), TEST_LOCATION );
Dali::Accessibility::TestEnableSC( false );
Stage::GetCurrent().Add( controla );
Stage::GetCurrent().Add( controlb );
- controla.SetKeyboardFocusable( true );
- controlb.SetKeyboardFocusable( true );
+ controla.SetProperty(Actor::Property::KEYBOARD_FOCUSABLE, true);
+ controlb.SetProperty(Actor::Property::KEYBOARD_FOCUSABLE, true);
auto a = Dali::Accessibility::Accessible::Get( controla );
auto b = Dali::Accessibility::Accessible::Get( controlb );
auto control = Control::New();
Stage::GetCurrent().GetRootLayer().Add( control );
- control.SetPosition(Vector3(10,10,100));
- control.SetSize( Vector2( 10, 10 ) );
+ control.SetProperty(Actor::Property::POSITION, Vector3(10, 10, 100));
+ control.SetProperty(Actor::Property::SIZE, Vector2(10, 10));
application.SendNotification();
application.Render( 1 );
auto a = Dali::Accessibility::Accessible::Get( control );
auto a_component = dynamic_cast<Dali::Accessibility::Component*>( a );
- auto extents = a_component->GetExtents(Dali::Accessibility::CoordType::Screen);
- DALI_TEST_EQUALS( extents.position.x, 5, TEST_LOCATION );
- DALI_TEST_EQUALS( extents.position.y, 5, TEST_LOCATION );
- DALI_TEST_EQUALS( extents.size.height, 10, TEST_LOCATION );
- DALI_TEST_EQUALS( extents.size.width, 10, TEST_LOCATION );
+ auto extents = a_component->GetExtents(Dali::Accessibility::CoordType::SCREEN);
+ DALI_TEST_EQUALS( extents.x, 5.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( extents.y, 5.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( extents.height, 10.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( extents.width, 10.0f, TEST_LOCATION );
auto bridge_extents = TestGetExtents( a_component -> GetAddress() );
DALI_TEST_EQUALS( std::get< 0 >( bridge_extents ), 5, TEST_LOCATION );
application.SendNotification();
application.Render( 1 );
- extents = a_component->GetExtents(Dali::Accessibility::CoordType::Screen);
- DALI_TEST_EQUALS( extents.position.x, 10, TEST_LOCATION );
- DALI_TEST_EQUALS( extents.position.y, 10, TEST_LOCATION );
- DALI_TEST_EQUALS( extents.size.height, 10, TEST_LOCATION );
- DALI_TEST_EQUALS( extents.size.width, 10, TEST_LOCATION );
+ extents = a_component->GetExtents(Dali::Accessibility::CoordType::SCREEN);
+ DALI_TEST_EQUALS( extents.x, 10.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( extents.y, 10.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( extents.height, 10.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( extents.width, 10.0f, TEST_LOCATION );
bridge_extents = TestGetExtents( a_component -> GetAddress() );
DALI_TEST_EQUALS( std::get< 0 >( bridge_extents ), 10, TEST_LOCATION );
DALI_TEST_CHECK( b -> DoAction( actions[4] ) );
DALI_TEST_CHECK( b -> DoAction( actions[4] ) );
- control.AccessibilityReadingSkippedSignal().Connect( [] () {
+ DevelControl::AccessibilityReadingSkippedSignal(control).Connect( [] () {
actions_done[ 1 ] = true;
} );
- control.AccessibilityReadingCancelledSignal().Connect( [] () {
+ DevelControl::AccessibilityReadingCancelledSignal(control).Connect( [] () {
actions_done[ 2 ] = true;
} );
- control.AccessibilityReadingStoppedSignal().Connect( [] () {
+ DevelControl::AccessibilityReadingStoppedSignal(control).Connect( [] () {
actions_done[ 3 ] = true;
} );
- control.AccessibilityActivateSignal().Connect( [] () {
+ DevelControl::AccessibilityActivateSignal(control).Connect( [] () {
actions_done[ 0 ] = true;
} );
#include <dali-toolkit-test-suite-utils.h>
-#include <automated-tests/src/dali-toolkit-accessibility/dali-toolkit-accessibility-test-utils.h>
+#include <automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/accessibility-test-utils.h>
#include <dali-toolkit/dali-toolkit.h>
+#include <dali-toolkit/devel-api/controls/control-devel.h>
+#include <dali-toolkit/devel-api/controls/table-view/table-view.h>
+#include <dali/devel-api/adaptor-framework/accessibility-impl.h>
+
using namespace Dali::Toolkit;
-using DBusWrapper = Dali::Accessibility::DBusWrapper;
+//using DBusWrapper = Dali::Accessibility::DBusWrapper; // FIXME
void utc_dali_accessibility_controls_startup(void)
{
{
test_return_value = TET_PASS;
//DBusWrapper::Install({}) is a de-install
- DBusWrapper::Install({});
+ //DBusWrapper::Install({}); // FIXME
}
int UtcDaliControlPropertyAccessibilityTranslationDomain(void)
auto control = Control::New();
- auto accessibility_translation_domain = Control::Property::ACCESSIBILITY_TRANSLATION_DOMAIN;
+ auto accessibility_translation_domain = DevelControl::Property::ACCESSIBILITY_TRANSLATION_DOMAIN;
DALI_TEST_EQUALS( Property::NONE , control.GetProperty( accessibility_translation_domain ).GetType(), TEST_LOCATION );
control.SetProperty( accessibility_translation_domain, "translation_domain_test_1" );
auto controla = Control::New();
auto controlb = Control::New();
- DALI_TEST_EQUALS( false, controla.GrabAccessibilityHighlight(), TEST_LOCATION );
- DALI_TEST_EQUALS( false, controlb.GrabAccessibilityHighlight(), TEST_LOCATION );
- DALI_TEST_EQUALS( false, controla.ClearAccessibilityHighlight(), TEST_LOCATION );
- DALI_TEST_EQUALS( false, controlb.ClearAccessibilityHighlight(), TEST_LOCATION );
+ DALI_TEST_EQUALS( false, DevelControl::GrabAccessibilityHighlight(controla), TEST_LOCATION );
+ DALI_TEST_EQUALS( false, DevelControl::GrabAccessibilityHighlight(controlb), TEST_LOCATION );
+ DALI_TEST_EQUALS( false, DevelControl::ClearAccessibilityHighlight(controla), TEST_LOCATION );
+ DALI_TEST_EQUALS( false, DevelControl::ClearAccessibilityHighlight(controlb), TEST_LOCATION );
END_TEST;
}
auto accessible = Dali::Accessibility::Accessible::Get( toolbar );
DALI_TEST_CHECK( accessible );
- DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::ToolBar, TEST_LOCATION );
+ DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::TOOL_BAR, TEST_LOCATION );
END_TEST;
}
auto accessible = Dali::Accessibility::Accessible::Get( pushbutton );
DALI_TEST_CHECK( accessible );
- DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::PushButton, TEST_LOCATION );
+ DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::PUSH_BUTTON, TEST_LOCATION );
END_TEST;
}
Dali::Accessibility::TestEnableSC( true );
auto states = accessible->GetStates();
- DALI_TEST_EQUALS( static_cast< unsigned int >( states[ Accessibility::State::Pressed ] ), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( static_cast< unsigned int >( states[ Accessibility::State::PRESSED ] ), false, TEST_LOCATION );
// auto button = dynamic_cast<Dali::Toolkit::Button* >( accessible ) ;
pushbutton.SetProperty( Toolkit::Button::Property::TOGGLABLE, true );
pushbutton.SetProperty( Toolkit::Button::Property::SELECTED, true );
states = accessible->GetStates();
- DALI_TEST_EQUALS( static_cast< unsigned int >( states[ Accessibility::State::Pressed ] ), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( static_cast< unsigned int >( states[ Accessibility::State::PRESSED ] ), true, TEST_LOCATION );
Dali::Accessibility::TestEnableSC( false );
auto accessible = Dali::Accessibility::Accessible::Get( togglebutton );
DALI_TEST_CHECK( accessible );
- DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::ToggleButton, TEST_LOCATION );
+ DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::TOGGLE_BUTTON, TEST_LOCATION );
END_TEST;
}
auto accessible = Dali::Accessibility::Accessible::Get( textselectionpopup );
DALI_TEST_CHECK( accessible );
- DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::Dialog, TEST_LOCATION );
+ DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::DIALOG, TEST_LOCATION );
END_TEST;
}
auto accessible = Dali::Accessibility::Accessible::Get( alignment );
DALI_TEST_CHECK( accessible );
- DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::Filler, TEST_LOCATION );
+ DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::FILLER, TEST_LOCATION );
END_TEST;
}
auto states = accessible->GetStates();
DALI_TEST_CHECK( states );
- DALI_TEST_EQUALS( static_cast< unsigned int >( states[ Accessibility::State::Checked ] ), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( static_cast< unsigned int >( states[ Accessibility::State::CHECKED ] ), false, TEST_LOCATION );
radiobutton.SetProperty( Toolkit::RadioButton::Property::SELECTED, true );
states = accessible->GetStates();
DALI_TEST_CHECK( states );
- DALI_TEST_EQUALS( static_cast< unsigned int >( states[ Accessibility::State::Checked ] ), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( static_cast< unsigned int >( states[ Accessibility::State::CHECKED ] ), true, TEST_LOCATION );
Dali::Accessibility::TestEnableSC( false );
auto accessible = Dali::Accessibility::Accessible::Get( flexcontainer );
DALI_TEST_CHECK( accessible );
- DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::Filler, TEST_LOCATION );
+ DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::FILLER, TEST_LOCATION );
END_TEST;
}
Dali::Accessibility::TestEnableSC( true );
auto states = accessible->GetStates();
- DALI_TEST_EQUALS( static_cast< unsigned int >( states[ Accessibility::State::Checked ] ), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( static_cast< unsigned int >( states[ Accessibility::State::CHECKED ] ), false, TEST_LOCATION );
checkboxbutton.SetProperty( Toolkit::CheckBoxButton::Property::SELECTED, true );
states = accessible->GetStates();
- DALI_TEST_EQUALS( static_cast< unsigned int >( states[ Accessibility::State::Checked ] ), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( static_cast< unsigned int >( states[ Accessibility::State::CHECKED ] ), true, TEST_LOCATION );
Dali::Accessibility::TestEnableSC( false );
auto accessible = Dali::Accessibility::Accessible::Get( textselectiontoolbar );
DALI_TEST_CHECK( accessible );
- DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::ToolBar, TEST_LOCATION );
+ DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::TOOL_BAR, TEST_LOCATION );
END_TEST;
}
auto accessible = Dali::Accessibility::Accessible::Get( model3dview );
DALI_TEST_CHECK( accessible );
- DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::Image, TEST_LOCATION );
+ DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::IMAGE, TEST_LOCATION );
END_TEST;
}
auto accessible = Dali::Accessibility::Accessible::Get( effectsview );
DALI_TEST_CHECK( accessible );
- DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::Filler, TEST_LOCATION );
+ DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::FILLER, TEST_LOCATION );
END_TEST;
}
auto accessible = Dali::Accessibility::Accessible::Get( superblurview );
DALI_TEST_CHECK( accessible );
- DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::Filler, TEST_LOCATION );
+ DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::FILLER, TEST_LOCATION );
END_TEST;
}
auto accessible = Dali::Accessibility::Accessible::Get( imageview );
DALI_TEST_CHECK( accessible );
- DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::Image, TEST_LOCATION );
+ DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::IMAGE, TEST_LOCATION );
END_TEST;
}
auto accessible = Dali::Accessibility::Accessible::Get( pageturnlandscapeview );
DALI_TEST_CHECK( accessible );
- DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::PageTabList, TEST_LOCATION );
+ DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::PAGE_TAB_LIST, TEST_LOCATION );
END_TEST;
}
auto accessible = Dali::Accessibility::Accessible::Get( gaussianblurview );
DALI_TEST_CHECK( accessible );
- DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::Filler, TEST_LOCATION );
+ DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::FILLER, TEST_LOCATION );
END_TEST;
}
auto accessible = Dali::Accessibility::Accessible::Get( shadowview );
DALI_TEST_CHECK( accessible );
- DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::Filler, TEST_LOCATION );
+ DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::FILLER, TEST_LOCATION );
END_TEST;
}
auto accessible = Dali::Accessibility::Accessible::Get( scrollview );
DALI_TEST_CHECK( accessible );
- DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::ScrollPane, TEST_LOCATION );
+ DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::SCROLL_PANE, TEST_LOCATION );
END_TEST;
}
auto accessible = Dali::Accessibility::Accessible::Get( magnifier );
DALI_TEST_CHECK( accessible );
- DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::Filler, TEST_LOCATION );
+ DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::FILLER, TEST_LOCATION );
END_TEST;
}
auto accessible = Dali::Accessibility::Accessible::Get( tableview );
DALI_TEST_CHECK( accessible );
- DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::Table, TEST_LOCATION );
+ DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::TABLE, TEST_LOCATION );
END_TEST;
}
auto accessible = Dali::Accessibility::Accessible::Get( bloomview );
DALI_TEST_CHECK( accessible );
- DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::Animation, TEST_LOCATION );
+ DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::ANIMATION, TEST_LOCATION );
END_TEST;
}
auto textfield = TextField::New();
DALI_TEST_CHECK( textfield );
- textfield.SetName( "test" );
- DALI_TEST_EQUALS( textfield.GetName(), "test", TEST_LOCATION );
+ textfield.SetProperty(Actor::Property::NAME, "test" );
+ DALI_TEST_EQUALS( textfield.GetProperty<std::string>(Actor::Property::NAME), "test", TEST_LOCATION );
auto accessible = Dali::Accessibility::Accessible::Get( textfield );
DALI_TEST_CHECK( accessible );
DALI_TEST_EQUALS( accessible->GetName(), "", TEST_LOCATION );
- DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::Entry, TEST_LOCATION );
+ DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::ENTRY, TEST_LOCATION );
auto states = accessible->GetStates();
- DALI_TEST_EQUALS( static_cast< unsigned int >( states[ Accessibility::State::Editable ] ), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( static_cast< unsigned int >( states[ Accessibility::State::EDITABLE ] ), true, TEST_LOCATION );
Dali::Accessibility::TestEnableSC( true );
auto texteditor = TextEditor::New();
DALI_TEST_CHECK( texteditor );
- texteditor.SetName( "test" );
- DALI_TEST_EQUALS( texteditor.GetName(), "test", TEST_LOCATION );
+ texteditor.SetProperty(Actor::Property::NAME, "test" );
+ DALI_TEST_EQUALS( texteditor.GetProperty<std::string>(Actor::Property::NAME), "test", TEST_LOCATION );
auto accessible = Dali::Accessibility::Accessible::Get( texteditor );
DALI_TEST_CHECK( accessible );
DALI_TEST_EQUALS( accessible->GetName(), "", TEST_LOCATION );
- DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::Entry, TEST_LOCATION );
+ DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::ENTRY, TEST_LOCATION );
auto states = accessible->GetStates();
- DALI_TEST_EQUALS( static_cast< unsigned int >( states[ Accessibility::State::Editable ] ), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( static_cast< unsigned int >( states[ Accessibility::State::EDITABLE ] ), true, TEST_LOCATION );
Dali::Accessibility::TestEnableSC( true );
auto textlabel = TextLabel::New();
DALI_TEST_CHECK( textlabel );
- textlabel.SetName( "test" );
- DALI_TEST_EQUALS( textlabel.GetName(), "test", TEST_LOCATION );
+ textlabel.SetProperty(Actor::Property::NAME, "test" );
+ DALI_TEST_EQUALS( textlabel.GetProperty<std::string>(Actor::Property::NAME), "test", TEST_LOCATION );
auto accessible = Dali::Accessibility::Accessible::Get( textlabel );
DALI_TEST_CHECK( accessible );
DALI_TEST_EQUALS( accessible->GetName(), "", TEST_LOCATION );
- DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::Label, TEST_LOCATION );
+ DALI_TEST_EQUALS( accessible->GetRole(), Accessibility::Role::LABEL, TEST_LOCATION );
Dali::Accessibility::TestEnableSC( true );
DALI_TEST_EQUALS( accessible->GetRole(), Dali::Accessibility::Role::VIDEO, TEST_LOCATION );
END_TEST;
-}
\ No newline at end of file
+}
ToolkitTestApplication application;
auto editor = Dali::Toolkit::TextEditor::New();
- DALI_TEST_EQUALS( editor.GetName(), "", TEST_LOCATION );
- editor.SetName("editor");
- DALI_TEST_EQUALS( editor.GetName(), "editor", TEST_LOCATION );
+ DALI_TEST_EQUALS( editor.GetProperty<std::string>(Actor::Property::NAME), "", TEST_LOCATION );
+ editor.SetProperty(Actor::Property::NAME, "editor");
+ DALI_TEST_EQUALS( editor.GetProperty<std::string>(Actor::Property::NAME), "editor", TEST_LOCATION );
END_TEST;
}
DALI_TEST_CHECK( x );
if( x )
{
- auto range = x->GetTextAtOffset( 0, Dali::Accessibility::TextBoundary::Line );
+ auto range = x->GetTextAtOffset( 0, Dali::Accessibility::TextBoundary::LINE );
DALI_TEST_EQUALS( range.content, "", TEST_LOCATION );
DALI_TEST_EQUALS( range.startOffset, 0, TEST_LOCATION );
DALI_TEST_EQUALS( range.endOffset, 0, TEST_LOCATION );
editor.SetProperty( Toolkit::TextEditor::Property::TEXT, "text editor test sentence" );
- range = x->GetTextAtOffset( 5, Dali::Accessibility::TextBoundary::Character );
+ range = x->GetTextAtOffset( 5, Dali::Accessibility::TextBoundary::CHARACTER );
DALI_TEST_EQUALS( range.content, "e", TEST_LOCATION );
DALI_TEST_EQUALS( range.startOffset, 5, TEST_LOCATION );
DALI_TEST_EQUALS( range.endOffset, 6, TEST_LOCATION );
editor.SetProperty( Toolkit::TextEditor::Property::TEXT, "text \n\n\n\n\n\n editor \n\n test sentence" );
- range = x->GetTextAtOffset( 3, Dali::Accessibility::TextBoundary::Word );
+ range = x->GetTextAtOffset( 3, Dali::Accessibility::TextBoundary::WORD );
DALI_TEST_EQUALS( range.content, "sentence", TEST_LOCATION );
DALI_TEST_EQUALS( range.startOffset, 28, TEST_LOCATION );
DALI_TEST_EQUALS( range.endOffset, 36, TEST_LOCATION );
editor.SetProperty( Toolkit::TextEditor::Property::TEXT, "text \n\n\n\n\n\n editor \n\n test sentence" );
- range = x->GetTextAtOffset( 4, Dali::Accessibility::TextBoundary::Word );
+ range = x->GetTextAtOffset( 4, Dali::Accessibility::TextBoundary::WORD );
DALI_TEST_EQUALS( range.content, "", TEST_LOCATION );
DALI_TEST_EQUALS( range.startOffset, 0, TEST_LOCATION );
DALI_TEST_EQUALS( range.endOffset, 0, TEST_LOCATION );
editor.SetProperty( Toolkit::TextEditor::Property::TEXT, "text \n\n\n\n\n\n editor \n\n test sentence" );
- range = x->GetTextAtOffset( 0, Dali::Accessibility::TextBoundary::Line );
+ range = x->GetTextAtOffset( 0, Dali::Accessibility::TextBoundary::LINE );
DALI_TEST_EQUALS( range.content, "text \n", TEST_LOCATION );
DALI_TEST_EQUALS( range.startOffset, 0, TEST_LOCATION );
DALI_TEST_EQUALS( range.endOffset, 9, TEST_LOCATION );
editor.SetProperty( Toolkit::TextEditor::Property::TEXT, "text \n\n\n\n\n\n editor \n\n test sentence" );
- range = x->GetTextAtOffset( 6, Dali::Accessibility::TextBoundary::Line );
+ range = x->GetTextAtOffset( 6, Dali::Accessibility::TextBoundary::LINE );
DALI_TEST_EQUALS( range.content, " editor \n", TEST_LOCATION );
DALI_TEST_EQUALS( range.startOffset, 14, TEST_LOCATION );
DALI_TEST_EQUALS( range.endOffset, 24, TEST_LOCATION );
editor.SetProperty( Toolkit::TextEditor::Property::TEXT, "text \n\n\n\n\n\n editor \n\n test sentence" );
- range = x->GetTextAtOffset( 8, Dali::Accessibility::TextBoundary::Line );
+ range = x->GetTextAtOffset( 8, Dali::Accessibility::TextBoundary::LINE );
DALI_TEST_EQUALS( range.content, " test sentence", TEST_LOCATION );
DALI_TEST_EQUALS( range.startOffset, 25, TEST_LOCATION );
DALI_TEST_EQUALS( range.endOffset, 39, TEST_LOCATION );
ToolkitTestApplication application;
auto field = Toolkit::TextField::New();
- DALI_TEST_EQUALS( field.GetName(), "", TEST_LOCATION );
- field.SetName("field");
- DALI_TEST_EQUALS( field.GetName(), "field", TEST_LOCATION );
+ DALI_TEST_EQUALS( field.GetProperty<std::string>(Actor::Property::NAME), "", TEST_LOCATION );
+ field.SetProperty(Actor::Property::NAME, "field");
+ DALI_TEST_EQUALS( field.GetProperty<std::string>(Actor::Property::NAME), "field", TEST_LOCATION );
END_TEST;
}
DALI_TEST_CHECK( x );
if( x )
{
- auto range = x->GetTextAtOffset( 0, Dali::Accessibility::TextBoundary::Line );
+ auto range = x->GetTextAtOffset( 0, Dali::Accessibility::TextBoundary::LINE );
DALI_TEST_EQUALS( range.content, "", TEST_LOCATION );
DALI_TEST_EQUALS( range.startOffset, 0, TEST_LOCATION );
DALI_TEST_EQUALS( range.endOffset, 0, TEST_LOCATION );
field.SetProperty( Toolkit::TextField::Property::TEXT, "text editor test sentence" );
- range = x->GetTextAtOffset( 5, Dali::Accessibility::TextBoundary::Character );
+ range = x->GetTextAtOffset( 5, Dali::Accessibility::TextBoundary::CHARACTER );
DALI_TEST_EQUALS( range.content, "e", TEST_LOCATION );
DALI_TEST_EQUALS( range.startOffset, 5, TEST_LOCATION );
DALI_TEST_EQUALS( range.endOffset, 6, TEST_LOCATION );
field.SetProperty( Toolkit::TextField::Property::TEXT, "text \n\n\n\n\n\n editor \n\n test sentence" );
- range = x->GetTextAtOffset( 3, Dali::Accessibility::TextBoundary::Word );
+ range = x->GetTextAtOffset( 3, Dali::Accessibility::TextBoundary::WORD );
DALI_TEST_EQUALS( range.content, "sentence", TEST_LOCATION );
DALI_TEST_EQUALS( range.startOffset, 28, TEST_LOCATION );
DALI_TEST_EQUALS( range.endOffset, 36, TEST_LOCATION );
field.SetProperty( Toolkit::TextField::Property::TEXT, "text \n\n\n\n\n\n editor \n\n test sentence" );
- range = x->GetTextAtOffset( 4, Dali::Accessibility::TextBoundary::Word );
+ range = x->GetTextAtOffset( 4, Dali::Accessibility::TextBoundary::WORD );
DALI_TEST_EQUALS( range.content, "", TEST_LOCATION );
DALI_TEST_EQUALS( range.startOffset, 0, TEST_LOCATION );
DALI_TEST_EQUALS( range.endOffset, 0, TEST_LOCATION );
field.SetProperty( Toolkit::TextField::Property::TEXT, "text \n\n\n\n\n\n editor \n\n test sentence" );
- range = x->GetTextAtOffset( 0, Dali::Accessibility::TextBoundary::Line );
+ range = x->GetTextAtOffset( 0, Dali::Accessibility::TextBoundary::LINE );
DALI_TEST_EQUALS( range.content, "text \n", TEST_LOCATION );
DALI_TEST_EQUALS( range.startOffset, 0, TEST_LOCATION );
DALI_TEST_EQUALS( range.endOffset, 9, TEST_LOCATION );
field.SetProperty( Toolkit::TextField::Property::TEXT, "text \n\n\n\n\n\n editor \n\n test sentence" );
- range = x->GetTextAtOffset( 6, Dali::Accessibility::TextBoundary::Line );
+ range = x->GetTextAtOffset( 6, Dali::Accessibility::TextBoundary::LINE );
DALI_TEST_EQUALS( range.content, " editor \n", TEST_LOCATION );
DALI_TEST_EQUALS( range.startOffset, 14, TEST_LOCATION );
DALI_TEST_EQUALS( range.endOffset, 24, TEST_LOCATION );
field.SetProperty( Toolkit::TextField::Property::TEXT, "text \n\n\n\n\n\n editor \n\n test sentence" );
- range = x->GetTextAtOffset( 8, Dali::Accessibility::TextBoundary::Line );
+ range = x->GetTextAtOffset( 8, Dali::Accessibility::TextBoundary::LINE );
DALI_TEST_EQUALS( range.content, " test sentence", TEST_LOCATION );
DALI_TEST_EQUALS( range.startOffset, 25, TEST_LOCATION );
DALI_TEST_EQUALS( range.endOffset, 39, TEST_LOCATION );
ToolkitTestApplication application;
auto label = Toolkit::TextLabel::New();
- DALI_TEST_EQUALS( label.GetName(), "", TEST_LOCATION );
- label.SetName("label");
- DALI_TEST_EQUALS( label.GetName(), "label", TEST_LOCATION );
+ DALI_TEST_EQUALS( label.GetProperty<std::string>(Actor::Property::NAME), "", TEST_LOCATION );
+ label.SetProperty(Actor::Property::NAME, "label");
+ DALI_TEST_EQUALS( label.GetProperty<std::string>(Actor::Property::NAME), "label", TEST_LOCATION );
END_TEST;
}
DALI_TEST_CHECK( x );
if( x )
{
- auto range = x->GetTextAtOffset( 0, Dali::Accessibility::TextBoundary::Line );
+ auto range = x->GetTextAtOffset( 0, Dali::Accessibility::TextBoundary::LINE );
DALI_TEST_EQUALS( range.content, "", TEST_LOCATION );
DALI_TEST_EQUALS( range.startOffset, 0, TEST_LOCATION );
DALI_TEST_EQUALS( range.endOffset, 0, TEST_LOCATION );
label.SetProperty( Toolkit::TextLabel::Property::TEXT, "text editor test sentence" );
- range = x->GetTextAtOffset( 5, Dali::Accessibility::TextBoundary::Character );
+ range = x->GetTextAtOffset( 5, Dali::Accessibility::TextBoundary::CHARACTER );
DALI_TEST_EQUALS( range.content, "e", TEST_LOCATION );
DALI_TEST_EQUALS( range.startOffset, 5, TEST_LOCATION );
DALI_TEST_EQUALS( range.endOffset, 6, TEST_LOCATION );
label.SetProperty( Toolkit::TextLabel::Property::TEXT, "text \n\n\n\n\n\n editor \n\n test sentence" );
- range = x->GetTextAtOffset( 3, Dali::Accessibility::TextBoundary::Word );
+ range = x->GetTextAtOffset( 3, Dali::Accessibility::TextBoundary::WORD );
DALI_TEST_EQUALS( range.content, "sentence", TEST_LOCATION );
DALI_TEST_EQUALS( range.startOffset, 28, TEST_LOCATION );
DALI_TEST_EQUALS( range.endOffset, 36, TEST_LOCATION );
label.SetProperty( Toolkit::TextLabel::Property::TEXT, "text \n\n\n\n\n\n editor \n\n test sentence" );
- range = x->GetTextAtOffset( 4, Dali::Accessibility::TextBoundary::Word );
+ range = x->GetTextAtOffset( 4, Dali::Accessibility::TextBoundary::WORD );
DALI_TEST_EQUALS( range.content, "", TEST_LOCATION );
DALI_TEST_EQUALS( range.startOffset, 0, TEST_LOCATION );
DALI_TEST_EQUALS( range.endOffset, 0, TEST_LOCATION );
label.SetProperty( Toolkit::TextLabel::Property::TEXT, "text \n\n\n\n\n\n editor \n\n test sentence" );
- range = x->GetTextAtOffset( 0, Dali::Accessibility::TextBoundary::Line );
+ range = x->GetTextAtOffset( 0, Dali::Accessibility::TextBoundary::LINE );
DALI_TEST_EQUALS( range.content, "text \n", TEST_LOCATION );
DALI_TEST_EQUALS( range.startOffset, 0, TEST_LOCATION );
DALI_TEST_EQUALS( range.endOffset, 9, TEST_LOCATION );
label.SetProperty( Toolkit::TextLabel::Property::TEXT, "text \n\n\n\n\n\n editor \n\n test sentence" );
- range = x->GetTextAtOffset( 6, Dali::Accessibility::TextBoundary::Line );
+ range = x->GetTextAtOffset( 6, Dali::Accessibility::TextBoundary::LINE );
DALI_TEST_EQUALS( range.content, " editor \n", TEST_LOCATION );
DALI_TEST_EQUALS( range.startOffset, 14, TEST_LOCATION );
DALI_TEST_EQUALS( range.endOffset, 24, TEST_LOCATION );
label.SetProperty( Toolkit::TextLabel::Property::TEXT, "text \n\n\n\n\n\n editor \n\n test sentence" );
- range = x->GetTextAtOffset( 8, Dali::Accessibility::TextBoundary::Line );
+ range = x->GetTextAtOffset( 8, Dali::Accessibility::TextBoundary::LINE );
DALI_TEST_EQUALS( range.content, " test sentence", TEST_LOCATION );
DALI_TEST_EQUALS( range.startOffset, 25, TEST_LOCATION );
DALI_TEST_EQUALS( range.endOffset, 39, TEST_LOCATION );
#include <dali-toolkit-test-suite-utils.h>
#include <dali.h>
+#include <dali/devel-api/common/stage.h>
#include <dali-toolkit/dali-toolkit.h>
#include <dali/devel-api/adaptor-framework/accessibility.h>
+#include <dali/devel-api/adaptor-framework/accessibility-impl.h>
+
+#include <dali-toolkit/devel-api/controls/scroll-bar/scroll-bar.h>
using namespace Dali::Accessibility;