[3.0] Modify texture bind for OES_EGL_image_external
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-TypeRegistry.cpp
index a920c8b..d38de86 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -356,6 +356,16 @@ class MyTestCustomActor2 : public CustomActor
 {
 public:
 
+  struct Property
+  {
+    enum
+    {
+      P1=Dali::PROPERTY_REGISTRATION_START_INDEX,
+      P2
+    };
+  };
+
+
   MyTestCustomActor2()
   {
   }
@@ -404,6 +414,60 @@ private:
 
 static TypeRegistration customTypeInit( typeid(MyTestCustomActor2), typeid(Dali::CustomActor), CreateCustomInit, true );
 
+PropertyRegistration P1( customTypeInit, "propertyOne", MyTestCustomActor2::Property::P1, Property::INTEGER, &SetProperty, &GetProperty );
+PropertyRegistration P2( customTypeInit, "propertyTwo", MyTestCustomActor2::Property::P2, Property::STRING, &SetProperty, &GetProperty );
+
+
+class MyTestCustomActor3 : public CustomActor
+{
+public:
+  MyTestCustomActor3()
+  {
+  }
+
+  static MyTestCustomActor3 New()
+  {
+    return MyTestCustomActor3(); // takes ownership
+  }
+
+  virtual ~MyTestCustomActor3()
+  {
+  }
+
+  static MyTestCustomActor3 DownCast( BaseHandle handle )
+  {
+    MyTestCustomActor3 result;
+
+    CustomActor custom = Dali::CustomActor::DownCast( handle );
+    if ( custom )
+    {
+      CustomActorImpl& customImpl = custom.GetImplementation();
+
+      Impl::MyTestCustomActor* impl = dynamic_cast<Impl::MyTestCustomActor*>(&customImpl);
+
+      if (impl)
+      {
+        result = MyTestCustomActor3(customImpl.GetOwner());
+      }
+    }
+
+    return result;
+  }
+
+private:
+
+  MyTestCustomActor3(Internal::CustomActor* internal)
+  : CustomActor(internal)
+  {
+  }
+
+  MyTestCustomActor3( Impl::MyTestCustomActor& impl )
+  : CustomActor( impl )
+  {
+  }
+};
+
+static TypeRegistration customTypeBadInit( typeid(MyTestCustomActor3), typeid(Dali::CustomActor), NULL, false );
 
 BaseHandle CreateCustom(void)
 {
@@ -597,16 +661,6 @@ int UtcDaliTypeRegistryGetTypeInfoFromTypeNameP(void)
 
   TypeInfo type;
 
-  // image actor
-  type = registry.GetTypeInfo( "ImageActor" );
-  DALI_TEST_CHECK( type );
-  DALI_TEST_CHECK( type.GetCreator() );
-  DALI_TEST_CHECK( ImageActor::DownCast( type.GetCreator()() ) );
-  ImageActor ia = ImageActor::DownCast(type.CreateInstance());
-  DALI_TEST_CHECK( ia );
-  Stage::GetCurrent().Add( ia );
-  application.Render();
-
   // camera actor
   type = registry.GetTypeInfo( "CameraActor" );
   DALI_TEST_CHECK( type );
@@ -623,13 +677,6 @@ int UtcDaliTypeRegistryGetTypeInfoFromTypeNameP(void)
   an.Play();
   application.Render();
 
-  // shader effect
-  type = registry.GetTypeInfo( "ShaderEffect" );
-  DALI_TEST_CHECK( type );
-  ShaderEffect ef = ShaderEffect::DownCast(type.CreateInstance());
-  DALI_TEST_CHECK( ef );
-  application.Render();
-
   END_TEST;
 }
 
@@ -649,8 +696,8 @@ int UtcDaliTypeRegistryGetTypeInfoFromTypeNameN(void)
 
 int UtcDaliTypeRegistryGetTypeInfoFromTypeIdP(void)
 {
-  TypeInfo named_type = TypeRegistry::Get().GetTypeInfo( "ImageActor" );
-  TypeInfo typeinfo_type = TypeRegistry::Get().GetTypeInfo( typeid(Dali::ImageActor) );
+  TypeInfo named_type = TypeRegistry::Get().GetTypeInfo( "CameraActor" );
+  TypeInfo typeinfo_type = TypeRegistry::Get().GetTypeInfo( typeid(Dali::CameraActor) );
 
   DALI_TEST_CHECK( named_type );
   DALI_TEST_CHECK( typeinfo_type );
@@ -993,7 +1040,10 @@ int UtcDaliTypeRegistryPropertyRegistrationP(void)
   // Check property count of type-info is 1
   Property::IndexContainer indices;
   typeInfo.GetPropertyIndices( indices );
+
+  size_t typePropertyCount = typeInfo.GetPropertyCount();
   DALI_TEST_EQUALS( indices.Size(), 1u, TEST_LOCATION );
+  DALI_TEST_EQUALS( indices.Size(), typePropertyCount, TEST_LOCATION );
 
   // Ensure indices returned from actor and customActor differ by two
   Actor actor = Actor::New();
@@ -1047,6 +1097,7 @@ int UtcDaliTypeRegistryAnimatablePropertyRegistrationP(void)
   DALI_TEST_CHECK( handle );
   Actor customActor = Actor::DownCast( handle );
   DALI_TEST_CHECK( customActor );
+  Stage::GetCurrent().Add(customActor);
 
   unsigned int customPropertyCount( customActor.GetPropertyCount() );
 
@@ -1054,7 +1105,7 @@ int UtcDaliTypeRegistryAnimatablePropertyRegistrationP(void)
   std::string animatablePropertyName( "animatableProp1" );
   int animatablePropertyIndex( ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX );
   Property::Type animatablePropertyType( Property::FLOAT );
-  AnimatablePropertyRegistration animatableProperty1( customType1, animatablePropertyName, animatablePropertyIndex, animatablePropertyType );
+  AnimatablePropertyRegistration animatableProperty( customType1, animatablePropertyName, animatablePropertyIndex, animatablePropertyType );
 
   // Check property count after registration
   DALI_TEST_EQUALS( customPropertyCount + 1u, customActor.GetPropertyCount(), TEST_LOCATION );
@@ -1067,7 +1118,7 @@ int UtcDaliTypeRegistryAnimatablePropertyRegistrationP(void)
   application.Render();
 
   // Check the animatable property value
-  DALI_TEST_EQUALS( customActor.GetProperty< float >( animatablePropertyIndex ), 25.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( customActor.GetProperty< float >( animatablePropertyIndex ), 25.f, TEST_LOCATION );
 
   // Check the animatable property name
   DALI_TEST_EQUALS( customActor.GetPropertyName( animatablePropertyIndex ), animatablePropertyName, TEST_LOCATION );
@@ -1091,6 +1142,21 @@ int UtcDaliTypeRegistryAnimatablePropertyRegistrationP(void)
   unsigned int customActorIndices = indices.Size();
   DALI_TEST_EQUALS( actorIndices + 1u, customActorIndices, TEST_LOCATION ); // Custom property + registered property
 
+  // check that the property is animatable
+  Animation animation = Animation::New(0.2f);
+  animation.AnimateTo( Property( customActor, animatablePropertyIndex ), 15.f, AlphaFunction::LINEAR );
+  animation.Play();
+  // Render and notify, animation play for 0.05 seconds
+  application.SendNotification();
+  application.Render(50);
+  DALI_TEST_EQUALS( 0.25f, animation.GetCurrentProgress(), TEST_LOCATION );
+  DALI_TEST_EQUALS( customActor.GetProperty< float >( animatablePropertyIndex ), 22.5f, TEST_LOCATION );
+  // Render and notify, animation play for another 0.1 seconds
+  application.SendNotification();
+  application.Render(100);
+  DALI_TEST_EQUALS( 0.75f, animation.GetCurrentProgress(), TEST_LOCATION );
+  DALI_TEST_EQUALS( customActor.GetProperty< float >( animatablePropertyIndex ), 17.5f, TEST_LOCATION );
+
   END_TEST;
 }
 
@@ -1124,6 +1190,107 @@ int UtcDaliTypeRegistryAnimatablePropertyRegistrationN(void)
   END_TEST;
 }
 
+int UtcDaliTypeRegistryAnimatablePropertyRegistrationWithDefaultP(void)
+{
+  TestApplication application;
+  TypeRegistry typeRegistry = TypeRegistry::Get();
+
+  // Check property count before property registration
+  TypeInfo typeInfo = typeRegistry.GetTypeInfo( typeid(MyTestCustomActor) );
+  DALI_TEST_CHECK( typeInfo );
+  BaseHandle handle = typeInfo.CreateInstance();
+  DALI_TEST_CHECK( handle );
+  Actor customActor = Actor::DownCast( handle );
+  DALI_TEST_CHECK( customActor );
+  Stage::GetCurrent().Add(customActor);
+
+  unsigned int customPropertyCount( customActor.GetPropertyCount() );
+
+  // Register animatable property
+  std::string animatablePropertyName( "animatableProp1" );
+  int animatablePropertyIndex( ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX );
+  AnimatablePropertyRegistration animatableProperty1( customType1, animatablePropertyName, animatablePropertyIndex, 10.f );
+
+  // Check property count after registration
+  DALI_TEST_EQUALS( customPropertyCount + 1u, customActor.GetPropertyCount(), TEST_LOCATION );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Check the animatable property value
+  DALI_TEST_EQUALS( customActor.GetProperty< float >( animatablePropertyIndex ), 10.f, TEST_LOCATION );
+
+  // Check the animatable property name
+  DALI_TEST_EQUALS( customActor.GetPropertyName( animatablePropertyIndex ), animatablePropertyName, TEST_LOCATION );
+
+  // Check the animatable property index
+  DALI_TEST_EQUALS( customActor.GetPropertyIndex( animatablePropertyName ), animatablePropertyIndex, TEST_LOCATION );
+
+  // Check the animatable property type
+  DALI_TEST_EQUALS( customActor.GetPropertyType( animatablePropertyIndex ), Property::FLOAT, TEST_LOCATION );
+
+  // Check property count of type-info is 1
+  Property::IndexContainer indices;
+  typeInfo.GetPropertyIndices( indices );
+  DALI_TEST_EQUALS( indices.Size(), 1u, TEST_LOCATION );
+
+  // Ensure indices returned from actor and customActor differ by one
+  Actor actor = Actor::New();
+  actor.GetPropertyIndices( indices );
+  unsigned int actorIndices = indices.Size();
+  customActor.GetPropertyIndices( indices );
+  unsigned int customActorIndices = indices.Size();
+  DALI_TEST_EQUALS( actorIndices + 1u, customActorIndices, TEST_LOCATION ); // Custom property + registered property
+
+  // check that the property is animatable
+  Animation animation = Animation::New(0.2f);
+  animation.AnimateTo( Property( customActor, animatablePropertyIndex ), 20.f, AlphaFunction::LINEAR );
+  animation.Play();
+  // Render and notify, animation play for 0.05 seconds
+  application.SendNotification();
+  application.Render(50);
+  DALI_TEST_EQUALS( 0.25f, animation.GetCurrentProgress(), TEST_LOCATION );
+  DALI_TEST_EQUALS( customActor.GetProperty< float >( animatablePropertyIndex ), 12.5f, TEST_LOCATION );
+  // Render and notify, animation play for another 0.1 seconds
+  application.SendNotification();
+  application.Render(100);
+  DALI_TEST_EQUALS( 0.75f, animation.GetCurrentProgress(), TEST_LOCATION );
+  DALI_TEST_EQUALS( customActor.GetProperty< float >( animatablePropertyIndex ), 17.5f, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliTypeRegistryAnimatablePropertyRegistrationWithDefaultN(void)
+{
+  TestApplication application;
+  TypeRegistry typeRegistry = TypeRegistry::Get();
+
+  // Attempt to register an animatable property type out-of-bounds index (less than)
+  try
+  {
+    AnimatablePropertyRegistration property1( customType1, "animPropName",   ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX - 1, false );
+    tet_result( TET_FAIL );
+  }
+  catch ( DaliException& e )
+  {
+    DALI_TEST_ASSERT( e, "( index >= ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX ) && ( index <= ANIMATABLE_PROPERTY_REGISTRATION_MAX_INDEX )", TEST_LOCATION );
+  }
+
+  // Attempt to register an animatable property type out-of-bounds index (greater than)
+  try
+  {
+    AnimatablePropertyRegistration property1( customType1, "animPropName",   ANIMATABLE_PROPERTY_REGISTRATION_MAX_INDEX + 1, true );
+    tet_result( TET_FAIL );
+  }
+  catch ( DaliException& e )
+  {
+    DALI_TEST_ASSERT( e, "( index >= ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX ) && ( index <= ANIMATABLE_PROPERTY_REGISTRATION_MAX_INDEX )", TEST_LOCATION );
+  }
+
+  END_TEST;
+}
+
 int UtcDaliTypeRegistryAnimatablePropertyComponentRegistrationP(void)
 {
   TestApplication application;
@@ -1286,6 +1453,236 @@ int UtcDaliTypeRegistryAnimatablePropertyComponentRegistrationN(void)
   END_TEST;
 }
 
+int UtcDaliTypeRegistryChildPropertyRegistrationP(void)
+{
+  TestApplication application;
+  TypeRegistry typeRegistry = TypeRegistry::Get();
+
+  // Check property count before property registration
+  TypeInfo typeInfo = typeRegistry.GetTypeInfo( typeid(MyTestCustomActor) );
+  DALI_TEST_CHECK( typeInfo );
+  BaseHandle handle = typeInfo.CreateInstance();
+  DALI_TEST_CHECK( handle );
+  Actor customActor = Actor::DownCast( handle );
+  DALI_TEST_CHECK( customActor );
+  unsigned int initialPropertyCount( customActor.GetPropertyCount() );
+
+  // Register child properties to the parent
+  std::string propertyName( "childProp1" );
+  int propertyIndex( CHILD_PROPERTY_REGISTRATION_START_INDEX );
+  Property::Type propertyType( Property::BOOLEAN );
+  ChildPropertyRegistration childProperty1( customType1, propertyName, propertyIndex, propertyType );
+
+  std::string propertyName2( "childProp2" );
+  int propertyIndex2( CHILD_PROPERTY_REGISTRATION_START_INDEX + 1 );
+  Property::Type propertyType2( Property::INTEGER );
+  ChildPropertyRegistration childProperty2( customType1, propertyName2, propertyIndex2, propertyType2 );
+
+  std::string propertyName3( "childProp3" );
+  int propertyIndex3( CHILD_PROPERTY_REGISTRATION_START_INDEX + 2 );
+  Property::Type propertyType3( Property::FLOAT );
+  ChildPropertyRegistration childProperty3( customType1, propertyName3, propertyIndex3, propertyType3 );
+
+  std::string propertyName4( "childProp4" );
+  int propertyIndex4( CHILD_PROPERTY_REGISTRATION_START_INDEX + 3 );
+  Property::Type propertyType4( Property::INTEGER );
+  ChildPropertyRegistration childProperty4( customType1, propertyName4, propertyIndex4, propertyType4 );
+
+  // Check property count are not changed because the child properties will not be created for the parent
+  DALI_TEST_EQUALS( initialPropertyCount, customActor.GetPropertyCount(), TEST_LOCATION );
+
+  // Create a child actor
+  Actor childActor = Actor::New();
+  DALI_TEST_CHECK( childActor );
+  unsigned int initialChildActorPropertyCount( childActor.GetPropertyCount() );
+
+  // The type of child properties should be Property::None as the child hasn't registered any child property yet.
+  DALI_TEST_EQUALS( childActor.GetPropertyType( propertyIndex ), Property::NONE, TEST_LOCATION );
+  DALI_TEST_EQUALS( childActor.GetPropertyType( propertyIndex2 ), Property::NONE, TEST_LOCATION );
+  DALI_TEST_EQUALS( childActor.GetPropertyType( propertyIndex3 ), Property::NONE, TEST_LOCATION );
+  DALI_TEST_EQUALS( childActor.GetPropertyType( propertyIndex4 ), Property::NONE, TEST_LOCATION );
+
+  // Set the value for the first child property when the child actor doesn't have a parent yet
+  childActor.SetProperty(propertyIndex, true);
+
+  // Check that the first child property is dynamically created
+  DALI_TEST_EQUALS( initialChildActorPropertyCount + 1u, childActor.GetPropertyCount(), TEST_LOCATION );
+
+  // Check the first child property value
+  DALI_TEST_EQUALS( childActor.GetProperty< bool >( propertyIndex ), true, TEST_LOCATION );
+
+  // Check the first child property type
+  DALI_TEST_EQUALS( childActor.GetPropertyType( propertyIndex ), propertyType, TEST_LOCATION );
+
+  // Check that the first child property have no name, as it doesn't have a parent yet.
+  DALI_TEST_EQUALS( childActor.GetPropertyName( propertyIndex ), "", TEST_LOCATION );
+
+  // Check that the first property can't be accessed through its name, as it doesn't have a parent yet.
+  DALI_TEST_EQUALS( childActor.GetPropertyIndex( propertyName ), Property::INVALID_INDEX, TEST_LOCATION );
+
+  // Create a custom property for the child with the same name as the second child property registered to the parent
+  Property::Index customPropertyIndex = childActor.RegisterProperty(propertyName2, 100, Property::READ_WRITE);
+
+  // Check that the custom property is created
+  DALI_TEST_EQUALS( initialChildActorPropertyCount + 2u, childActor.GetPropertyCount(), TEST_LOCATION );
+
+  // Check the property value
+  DALI_TEST_EQUALS( childActor.GetProperty< int >( customPropertyIndex ), 100, TEST_LOCATION );
+
+  // Check the property index
+  DALI_TEST_EQUALS( childActor.GetPropertyIndex( propertyName2 ), customPropertyIndex, TEST_LOCATION );
+
+  // Check the property type
+  DALI_TEST_EQUALS( childActor.GetPropertyType( customPropertyIndex ), propertyType2, TEST_LOCATION );
+
+  // Check the property name
+  DALI_TEST_EQUALS( childActor.GetPropertyName( customPropertyIndex ), propertyName2, TEST_LOCATION );
+
+  // Now add the child actor to the parent
+  customActor.Add( childActor );
+
+  // Check that the first child property now has the correct name as previously registered to the parent
+  DALI_TEST_EQUALS( childActor.GetPropertyName( propertyIndex ), propertyName, TEST_LOCATION );
+
+  // Check that the child property index for the first child property can now be retrieved through its child property name
+  DALI_TEST_EQUALS( childActor.GetPropertyIndex( propertyName ), propertyIndex, TEST_LOCATION );
+
+  // Check that the second child property now has the correct index as previously registered to the parent
+  DALI_TEST_EQUALS( childActor.GetPropertyName( propertyIndex2 ), propertyName2, TEST_LOCATION );
+
+  // Check that the second child property can be accessed through both its custom property index and its child property index
+  DALI_TEST_EQUALS( childActor.GetProperty< int >( customPropertyIndex ), 100, TEST_LOCATION );
+  DALI_TEST_EQUALS( childActor.GetProperty< int >( propertyIndex2 ), 100, TEST_LOCATION );
+  DALI_TEST_EQUALS( childActor.GetPropertyType( customPropertyIndex ), propertyType2, TEST_LOCATION );
+  DALI_TEST_EQUALS( childActor.GetPropertyType( propertyIndex2 ), propertyType2, TEST_LOCATION );
+
+  // Check that the child property index for the second child property can now be retrieved through its child property name
+  DALI_TEST_EQUALS( childActor.GetPropertyIndex( propertyName2 ), propertyIndex2, TEST_LOCATION );
+
+  // Set the value for the third child property when the child actor is already added to the parent
+  childActor.SetProperty(propertyIndex3, 0.15f);
+
+  // Check that the third child property is dynamically created
+  DALI_TEST_EQUALS( initialChildActorPropertyCount + 3u, childActor.GetPropertyCount(), TEST_LOCATION );
+
+  // Check the third child property value
+  DALI_TEST_EQUALS( childActor.GetProperty< float >( propertyIndex3 ), 0.15f, TEST_LOCATION );
+
+  // Check the third child property type
+  DALI_TEST_EQUALS( childActor.GetPropertyType( propertyIndex3 ), propertyType3, TEST_LOCATION );
+
+  // Check the third child property name
+  DALI_TEST_EQUALS( childActor.GetPropertyName( propertyIndex3 ), propertyName3, TEST_LOCATION );
+
+  // Check the third child property index.
+  DALI_TEST_EQUALS( childActor.GetPropertyIndex( propertyName3 ), propertyIndex3, TEST_LOCATION );
+
+  // Create a custom property for the child with the same name as the fourth child property registered to the parent
+  Property::Index customPropertyIndex2 = childActor.RegisterProperty(propertyName4, 20, Property::READ_WRITE);
+
+  // Check that the custom property is created
+  DALI_TEST_EQUALS( initialChildActorPropertyCount + 4u, childActor.GetPropertyCount(), TEST_LOCATION );
+
+  // Check the fourth child property value
+  DALI_TEST_EQUALS( childActor.GetProperty< int >( propertyIndex4 ), 20, TEST_LOCATION );
+  DALI_TEST_EQUALS( childActor.GetProperty< int >( customPropertyIndex2 ), 20, TEST_LOCATION );
+
+  // Check the fourth child property type
+  DALI_TEST_EQUALS( childActor.GetPropertyType( propertyIndex4 ), propertyType4, TEST_LOCATION );
+  DALI_TEST_EQUALS( childActor.GetPropertyType( customPropertyIndex2 ), propertyType4, TEST_LOCATION );
+
+  // Check the fourth child property name
+  DALI_TEST_EQUALS( childActor.GetPropertyName( propertyIndex4 ), propertyName4, TEST_LOCATION );
+  DALI_TEST_EQUALS( childActor.GetPropertyName( customPropertyIndex2 ), propertyName4, TEST_LOCATION );
+
+  // Check the fourth child property index.
+  DALI_TEST_EQUALS( childActor.GetPropertyIndex( propertyName4 ), propertyIndex4, TEST_LOCATION );
+
+  // Now create another parent actor with different child properties registered
+  TypeInfo typeInfo2 = typeRegistry.GetTypeInfo( "MyNamedActor" );
+  DALI_TEST_CHECK( typeInfo2 );
+  BaseHandle handle2 = typeInfo2.CreateInstance();
+  DALI_TEST_CHECK( handle2 );
+  Actor customActor2 = Actor::DownCast( handle2 );
+  DALI_TEST_CHECK( customActor2 );
+
+  // Register child properties to the new parent
+  std::string newPropertyName( "newChildProp" );
+  int newPropertyIndex( CHILD_PROPERTY_REGISTRATION_START_INDEX ); // The same index as the first child property "childProp1" in the old parent
+  Property::Type newPropertyType( Property::VECTOR2 );
+  ChildPropertyRegistration newChildProperty( namedActorType, newPropertyName, newPropertyIndex, newPropertyType );
+
+  std::string newPropertyName2( "childProp3" ); // The same name as the third child property in the old parent
+  int newPropertyIndex2( CHILD_PROPERTY_REGISTRATION_START_INDEX + 1 ); // The same index as the second child property "childProp2" in the old parent
+  Property::Type newPropertyType2( Property::FLOAT ); // The same type as the third child property in the old parent
+  ChildPropertyRegistration newChildProperty2( namedActorType, newPropertyName2, newPropertyIndex2, newPropertyType2 );
+
+  // Now move the child actor to the new parent
+  customActor2.Add( childActor );
+
+  // "childProp1" is not a valid child property supported by the new parent, so nothing changed
+  DALI_TEST_EQUALS( childActor.GetPropertyType( propertyIndex ), propertyType, TEST_LOCATION );
+  DALI_TEST_EQUALS( childActor.GetPropertyName( propertyIndex ), propertyName, TEST_LOCATION );
+  DALI_TEST_EQUALS( childActor.GetPropertyIndex( propertyName ), propertyIndex, TEST_LOCATION );
+
+  // "childProp3" is a valid child property supported by the new parent
+  // So it should get its new child property index and should just work
+  DALI_TEST_EQUALS( childActor.GetPropertyType( newPropertyIndex2 ), newPropertyType2, TEST_LOCATION );
+  DALI_TEST_EQUALS( childActor.GetPropertyName( newPropertyIndex2 ), newPropertyName2, TEST_LOCATION );
+  DALI_TEST_EQUALS( childActor.GetPropertyIndex( newPropertyName2 ), newPropertyIndex2, TEST_LOCATION );
+  DALI_TEST_EQUALS( childActor.GetProperty< float >( newPropertyIndex2 ), 0.15f, TEST_LOCATION );
+
+  // Now register a custom property called "newChildProp"
+  Property::Index customPropertyIndex3 = childActor.RegisterProperty("newChildProp", Vector2( 10.0f, 10.0f ), Property::READ_WRITE);
+
+  // Check that the custom property is created
+  DALI_TEST_EQUALS( initialChildActorPropertyCount + 5u, childActor.GetPropertyCount(), TEST_LOCATION );
+
+  // This is a valid child property registered to the new parent
+  // So should be able to access it through both its custom property index and its registered child property index
+  DALI_TEST_EQUALS( childActor.GetPropertyType( newPropertyIndex ), newPropertyType, TEST_LOCATION );
+  DALI_TEST_EQUALS( childActor.GetPropertyType( customPropertyIndex3 ), newPropertyType, TEST_LOCATION );
+  DALI_TEST_EQUALS( childActor.GetPropertyName( newPropertyIndex ), newPropertyName, TEST_LOCATION ); // This should return the new name, although the child property index remains the same
+  DALI_TEST_EQUALS( childActor.GetPropertyName( customPropertyIndex3 ), newPropertyName, TEST_LOCATION );
+  DALI_TEST_EQUALS( childActor.GetProperty< Vector2 >( newPropertyIndex ), Vector2( 10.0f, 10.0f ), TEST_LOCATION );
+  DALI_TEST_EQUALS( childActor.GetProperty< Vector2 >( customPropertyIndex3 ), Vector2( 10.0f, 10.0f ), TEST_LOCATION );
+
+  // Should return the child property index by given its name
+  DALI_TEST_EQUALS( childActor.GetPropertyIndex( newPropertyName ), newPropertyIndex, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliTypeRegistryChildPropertyRegistrationN(void)
+{
+  TestApplication application;
+  TypeRegistry typeRegistry = TypeRegistry::Get();
+
+  // Attempt to register a child property type out-of-bounds index (less than)
+  try
+  {
+    ChildPropertyRegistration property1( customType1, "propName",  CHILD_PROPERTY_REGISTRATION_START_INDEX - 1, Property::BOOLEAN );
+    tet_result( TET_FAIL );
+  }
+  catch ( DaliException& e )
+  {
+    DALI_TEST_ASSERT( e, "( index >= CHILD_PROPERTY_REGISTRATION_START_INDEX ) && ( index <= CHILD_PROPERTY_REGISTRATION_MAX_INDEX )", TEST_LOCATION );
+  }
+
+  // Attempt to register a child property type out-of-bounds index (greater than)
+  try
+  {
+    ChildPropertyRegistration property1( customType1, "propName",  CHILD_PROPERTY_REGISTRATION_MAX_INDEX + 1, Property::BOOLEAN );
+    tet_result( TET_FAIL );
+  }
+  catch ( DaliException& e )
+  {
+    DALI_TEST_ASSERT( e, "( index >= CHILD_PROPERTY_REGISTRATION_START_INDEX ) && ( index <= CHILD_PROPERTY_REGISTRATION_MAX_INDEX )", TEST_LOCATION );
+  }
+
+  END_TEST;
+}
+
 
 /*******************************************************************************
  *
@@ -1747,3 +2144,68 @@ int UtcDaliTypeInfoGetSignalNameN(void)
 
   END_TEST;
 }
+
+
+int UtcDaliTypeInfoGetCreatorP(void)
+{
+  TestApplication application;
+  TypeRegistry typeRegistry = TypeRegistry::Get();
+
+  TypeInfo typeInfo = typeRegistry.GetTypeInfo( "Actor" );
+  DALI_TEST_CHECK( typeInfo );
+
+  TypeInfo::CreateFunction createFn = typeInfo.GetCreator();
+  DALI_TEST_EQUALS( createFn != NULL, true, TEST_LOCATION );
+  if( createFn )
+  {
+    // try calling it:
+    BaseHandle handle = createFn();
+    DALI_TEST_EQUALS( (bool)handle, true, TEST_LOCATION );
+  }
+
+  END_TEST;
+}
+
+int UtcDaliTypeInfoGetCreatorN(void)
+{
+  TestApplication application;
+  TypeRegistry typeRegistry = TypeRegistry::Get();
+
+  TypeInfo typeInfo = typeRegistry.GetTypeInfo( "MyTestCustomActor3" );
+  DALI_TEST_CHECK( typeInfo );
+
+  TypeInfo::CreateFunction createFn = typeInfo.GetCreator();
+  DALI_TEST_EQUALS( createFn == NULL, true, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliTypeInfoGetPropertyCountP1(void)
+{
+  TestApplication application;
+  TypeRegistry typeRegistry = TypeRegistry::Get();
+
+  TypeInfo typeInfo = typeRegistry.GetTypeInfo( "Actor" );
+  DALI_TEST_CHECK( typeInfo );
+  size_t actorPropertyCount = typeInfo.GetPropertyCount();
+
+  DALI_TEST_EQUALS( actorPropertyCount == 0 , true, TEST_LOCATION ); // No event only props
+  END_TEST;
+}
+
+int UtcDaliTypeInfoGetPropertyCountP2(void)
+{
+  TestApplication application;
+  TypeRegistry typeRegistry = TypeRegistry::Get();
+
+  TypeInfo typeInfo = typeRegistry.GetTypeInfo( "MyTestCustomActor2" );
+  DALI_TEST_CHECK( typeInfo );
+  size_t propertyCount = typeInfo.GetPropertyCount();
+  Property::IndexContainer indices;
+  typeInfo.GetPropertyIndices( indices );
+
+  DALI_TEST_EQUALS( propertyCount > 0 && propertyCount <= indices.Size(), true, TEST_LOCATION );
+  DALI_TEST_EQUALS( propertyCount == 2, true, TEST_LOCATION );
+
+  END_TEST;
+}