+}
+
+int UtcDaliLayoutingNesting_LeafSizeChange(void)
+{
+ /*
+ Root
+ |
+ Control (LayoutingRequired)
+ |
+ Control (LinearLayout Horizontal) (WRAP_CONTENT)
+ | |
+ TextLabel
+ */
+
+ ToolkitTestApplication application;
+ tet_infoline("UtcDaliLayoutingNesting_LeafSizeChange - Nesting a TextLabel within a layout that is parented to a control");
+ tet_infoline("Then change the TextLabels size and test the parent resized to wrap the new size");
+
+ auto rootControl = Control::New();
+ SetupRootLayoutControl( rootControl );
+
+ auto control = Control::New();
+ DevelControl::SetLayoutingRequired( control, true );
+ control.SetName( "control" );
+
+ auto hbox = Control::New();
+ auto hboxLayout = LinearLayout::New();
+ hboxLayout.SetOrientation( LinearLayout::Orientation::HORIZONTAL );
+ DevelControl::SetLayout( hbox, hboxLayout );
+ hbox.SetName( "hBox" );
+ hbox.SetProperty( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION, ChildLayoutData::WRAP_CONTENT );
+ hbox.SetProperty( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION, ChildLayoutData::WRAP_CONTENT );
+
+ control.Add( hbox );
+
+ TextLabel textLabel = CreateTextLabel("SmallText" );
+
+ hbox.Add( textLabel );
+
+ rootControl.Add( control );
+
+ // Ensure layouting happens
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS( hbox.GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 260.0f, 64.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( textLabel.GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 260.0f, 64.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+
+ tet_infoline("Changing to longer text");
+ textLabel.SetProperty( TextLabel::Property::TEXT, "muchlongerText" );
+
+ // Ensure layouting happens
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS( hbox.GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 432.0f, 64.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( textLabel.GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 432.0f, 64.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+
+ END_TEST;