+int UtcDaliAccessibilityManagerSetAndGetFocusIndicatorWithFocusedActor(void)
+{
+ ToolkitTestApplication application;
+
+ tet_infoline(" UtcDaliAccessibilityManagerSetAndGetFocusIndicatorWithFocusedActor");
+
+ AccessibilityManager manager = AccessibilityManager::Get();
+ DALI_TEST_CHECK(manager);
+
+ Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+ Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+ accAdaptor.HandleActionEnableEvent();
+
+ Actor defaultFocusIndicatorActor = manager.GetFocusIndicatorActor();
+ DALI_TEST_CHECK(defaultFocusIndicatorActor);
+
+ Actor focusedActor = Actor::New();
+ application.GetScene().Add( focusedActor );
+
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS( focusedActor.GetChildCount(), 0u, TEST_LOCATION );
+
+ manager.SetFocusOrder( focusedActor, 1 );
+ manager.SetCurrentFocusActor( focusedActor );
+
+ DALI_TEST_EQUALS( focusedActor.GetChildCount(), 1u, TEST_LOCATION );
+ DALI_TEST_CHECK( focusedActor.GetChildAt(0) == defaultFocusIndicatorActor );
+
+ Actor newFocusIndicatorActor = Actor::New();
+ manager.SetFocusIndicatorActor( newFocusIndicatorActor );
+ DALI_TEST_CHECK(manager.GetFocusIndicatorActor() == newFocusIndicatorActor);
+ DALI_TEST_EQUALS( focusedActor.GetChildCount(), 1u, TEST_LOCATION );
+ DALI_TEST_CHECK( focusedActor.GetChildAt(0) == newFocusIndicatorActor );
+
+ // Disable Accessibility
+ Test::AccessibilityAdaptor::SetEnabled( accAdaptor, false );
+ accAdaptor.HandleActionEnableEvent();
+
+ DALI_TEST_EQUALS( focusedActor.GetChildCount(), 0u, TEST_LOCATION );
+
+ END_TEST;
+}
+