+
+int UtcDaliAccessibilityCheckHighlight(void)
+{
+ ToolkitTestApplication application;
+ Dali::Accessibility::TestEnableSC( true );
+ Dali::Accessibility::TestResetMoveOutedCalled();
+
+ // Make precondition two children exist in parent area
+ PushButton parentButton = PushButton::New();
+ parentButton.SetProperty(Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX);
+ parentButton.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+ parentButton.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
+ parentButton.SetProperty(Actor::Property::POSITION, Dali::Vector2(0.0f, 0.0f));
+ parentButton.SetProperty(Actor::Property::SIZE, Dali::Vector2(100.0f, 200.0f));
+ application.GetScene().Add( parentButton );
+
+ PushButton buttonA = PushButton::New();
+ buttonA.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+ buttonA.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
+ buttonA.SetProperty(Actor::Property::POSITION, Dali::Vector2(0.0f, 0.0f));
+ buttonA.SetProperty(Actor::Property::SIZE, Dali::Vector2(100.0f, 100.0f));
+ parentButton.Add(buttonA);
+
+ PushButton buttonB = PushButton::New();
+ buttonB.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+ buttonB.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
+ buttonB.SetProperty(Actor::Property::POSITION, Dali::Vector2(0.0f, 100.0f));
+ buttonB.SetProperty(Actor::Property::SIZE, Dali::Vector2(100.0f, 100.0f));
+ parentButton.Add(buttonB);
+ Wait(application);
+
+ // Set highlight to first child (A) to enable movement tracking
+ auto* accessible = dynamic_cast<DevelControl::ControlAccessible*>(Dali::Accessibility::Accessible::Get(buttonA));
+ DALI_TEST_CHECK(accessible);
+ accessible->GrabHighlight();
+ Wait(application);
+
+ // Move first child (A) out of parent area through the parent's area top edge - single move outed event expected for A object and OUTGOING_TOP_LEFT direction
+ buttonA.SetProperty(Actor::Property::POSITION, Dali::Vector2(0.0f, -200.0f));
+ Wait(application);
+ // Need one more notificaiton to get correct updated position
+ application.SendNotification();
+ DALI_TEST_EQUALS( true, Dali::Accessibility::TestGetMoveOutedCalled(), TEST_LOCATION );
+
+ // Reset verdict data
+ Dali::Accessibility::TestResetMoveOutedCalled();
+
+ // Move first child (A) outside of parent area (both start and end position are outside of parent area) - no move outed event expected for A object
+ buttonA.SetProperty( Dali::Actor::Property::POSITION, Dali::Vector2(0.0f, -300.0f) );
+ Wait(application);
+ // Need one more notificaiton to get correct updated position
+ application.SendNotification();
+ DALI_TEST_EQUALS( false, Dali::Accessibility::TestGetMoveOutedCalled(), TEST_LOCATION );
+
+ // Reset verdict data
+ Dali::Accessibility::TestResetMoveOutedCalled();
+
+ // Set highlight to second child (B) to enable movement tracking
+ accessible = dynamic_cast<DevelControl::ControlAccessible*>(Dali::Accessibility::Accessible::Get(buttonB));
+ DALI_TEST_CHECK(accessible);
+ accessible->GrabHighlight();
+ Wait(application);
+
+ // Move second child (B) inside of parent area (both start and end position are inside of parent area) - no move outed event expected for B object
+ // B: (0,100) --> (0, 50)
+ buttonB.SetProperty( Dali::Actor::Property::POSITION, Dali::Vector2(0.0f, 50.0f) );
+ Wait(application);
+ // Need one more notificaiton to get correct updated position
+ application.SendNotification();
+ DALI_TEST_EQUALS( false, Dali::Accessibility::TestGetMoveOutedCalled(), TEST_LOCATION );
+
+ // Reset verdict data
+ Dali::Accessibility::TestResetMoveOutedCalled();
+
+ // Move second child (B) out of parent area through the parent's area right edge - single move outed event expected for B object and OUTGOING_BOTTOM_RIGHT direction
+ buttonB.SetProperty(Actor::Property::POSITION, Dali::Vector2(300.0f, 100.0f));
+ Wait(application);
+ // Need one more notificaiton to get correct updated position
+ application.SendNotification();
+ DALI_TEST_EQUALS( true, Dali::Accessibility::TestGetMoveOutedCalled(), TEST_LOCATION );
+
+ // Reset verdict data
+ Dali::Accessibility::TestResetMoveOutedCalled();
+
+ // Move second child (B) back into parent area (start position is outside but end position is inside of parent area) - no move outed event expected for B object
+ // B: (300,100) --> (0, 100)
+ buttonB.SetProperty( Dali::Actor::Property::POSITION, Dali::Vector2(0.0f, 100.0f) );
+ Wait(application);
+ // Need one more seding notificaiton to get correct updated position
+ application.SendNotification();
+ DALI_TEST_EQUALS( false, Dali::Accessibility::TestGetMoveOutedCalled(), TEST_LOCATION );
+
+ // Reset verdict data
+ Dali::Accessibility::TestResetMoveOutedCalled();
+
+ // Disable movement tracking on B by giving highlight to A
+ accessible = dynamic_cast<DevelControl::ControlAccessible*>(Dali::Accessibility::Accessible::Get(buttonA));
+ DALI_TEST_CHECK(accessible);
+ accessible->GrabHighlight();
+ Wait(application);
+
+ // Move B (untracked) out of parent area through the parent's area right edge - no move outed event expected for B object
+ // B: (0,100) --> (300, 100)
+ buttonB.SetProperty( Dali::Actor::Property::POSITION, Dali::Vector2(300.0f, 100.0f) );
+ Wait(application);
+ // Need one more seding notificaiton to get correct updated position
+ application.SendNotification();
+ DALI_TEST_EQUALS( false, Dali::Accessibility::TestGetMoveOutedCalled(), TEST_LOCATION );
+
+ Dali::Accessibility::TestEnableSC( false );
+ END_TEST;
+}
+
+int UtcDaliWebViewAccessible(void)
+{
+ ToolkitTestApplication application;
+
+ auto webView = Dali::Toolkit::WebView::New();
+ auto webViewAccessible = Dali::Accessibility::Accessible::Get(webView);
+
+ DALI_TEST_CHECK(webViewAccessible);
+
+ auto children = webViewAccessible->GetChildren();
+
+ DALI_TEST_CHECK(children.empty());
+
+ Dali::Accessibility::TestEnableSC(true);
+
+ children = webViewAccessible->GetChildren();
+
+ DALI_TEST_EQUALS(children.size(), 1u, TEST_LOCATION);
+
+ auto* child = children[0];
+
+ DALI_TEST_CHECK(child);
+ DALI_TEST_CHECK(child->IsProxy());
+ DALI_TEST_EQUALS(child->GetParent(), webViewAccessible, TEST_LOCATION);
+
+ auto address = child->GetAddress();
+
+ DALI_TEST_CHECK(address);
+ DALI_TEST_NOT_EQUALS(address.GetBus(), webViewAccessible->GetAddress().GetBus(), 0.0f, TEST_LOCATION);
+
+ Dali::Accessibility::TestEnableSC(false);
+
+ children = webViewAccessible->GetChildren();
+
+ DALI_TEST_CHECK(children.empty());
+
+ END_TEST;
+}