+
+int UtcDaliToolkitFlexContainerRTLSupportP(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitFlexContainerRTLSupportP");
+ FlexContainer flexContainer = FlexContainer::New();
+ DALI_TEST_CHECK( flexContainer );
+
+ Actor actor0 = Actor::New();
+
+ application.GetScene().Add( actor0 );
+ actor0.Add( flexContainer );
+
+ // Create two actors and add them to the container
+ Actor actor1 = Actor::New();
+ Actor actor2 = Actor::New();
+ DALI_TEST_CHECK( actor1 );
+ DALI_TEST_CHECK( actor2 );
+
+ flexContainer.Add(actor1);
+ flexContainer.Add(actor2);
+
+ // Check flex direction property.
+ flexContainer.SetProperty( FlexContainer::Property::FLEX_DIRECTION, "row" );
+ DALI_TEST_EQUALS( (FlexContainer::FlexDirection)flexContainer.GetProperty<int>( FlexContainer::Property::FLEX_DIRECTION ), FlexContainer::ROW, TEST_LOCATION );
+
+ // Check content direction property.
+ DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::INHERIT, TEST_LOCATION );
+
+ actor0.SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION, Dali::LayoutDirection::RIGHT_TO_LEFT );
+ DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::RTL, TEST_LOCATION );
+
+ actor0.SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION, Dali::LayoutDirection::LEFT_TO_RIGHT );
+ DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::LTR, TEST_LOCATION );
+
+ flexContainer.SetProperty( FlexContainer::Property::CONTENT_DIRECTION, "RTL" );
+ DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::RTL, TEST_LOCATION );
+
+ flexContainer.SetProperty( FlexContainer::Property::CONTENT_DIRECTION, "LTR" );
+ DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::LTR, TEST_LOCATION );
+
+ actor0.SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION, Dali::LayoutDirection::RIGHT_TO_LEFT );
+ DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::LTR, TEST_LOCATION );
+
+ flexContainer.SetProperty( FlexContainer::Property::CONTENT_DIRECTION, "inherit" );
+ DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::RTL, TEST_LOCATION );
+
+ actor0.SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION, Dali::LayoutDirection::LEFT_TO_RIGHT );
+ DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::LTR, TEST_LOCATION );
+
+ flexContainer.SetProperty( FlexContainer::Property::CONTENT_DIRECTION, "inherit" );
+ DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::LTR, TEST_LOCATION );
+
+ flexContainer.SetProperty( FlexContainer::Property::CONTENT_DIRECTION, "LTR" );
+ application.SendNotification();
+ application.Render();
+
+ flexContainer.SetProperty( FlexContainer::Property::CONTENT_DIRECTION, "RTL" );
+ application.SendNotification();
+ application.Render();
+
+ END_TEST;
+}