Cleaning up RendererFactory API
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-ControlRenderer.cpp
index e0b50d1..43caadd 100644 (file)
@@ -18,7 +18,7 @@
 #include <stdlib.h>
 #include <dali-toolkit-test-suite-utils.h>
 #include <dali/devel-api/rendering/renderer.h>
-#include <dali/devel-api/rendering/material.h>
+#include <dali/devel-api/rendering/texture-set.h>
 #include <dali/devel-api/rendering/shader.h>
 #include <dali-toolkit/devel-api/controls/renderer-factory/renderer-factory.h>
 
@@ -29,6 +29,10 @@ namespace
 {
 const char* TEST_IMAGE_FILE_NAME =  "gallery_image_01.jpg";
 const char* TEST_NPATCH_FILE_NAME =  "gallery_image_01.9.jpg";
+const char* TEST_SVG_FILE_NAME = TEST_RESOURCE_DIR "/svg1.svg";
+const char* TEST_OBJ_FILE_NAME = TEST_RESOURCE_DIR "/Cube.obj";
+const char* TEST_MTL_FILE_NAME = TEST_RESOURCE_DIR "/ToyRobot-Metal.mtl";
+const char* TEST_RESOURCE_LOCATION = TEST_RESOURCE_DIR "/";
 }
 
 void dali_control_renderer_startup(void)
@@ -48,9 +52,9 @@ int UtcDaliControlRendererCopyAndAssignment(void)
 
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert("renderer-type", "color-renderer");
-  propertyMap.Insert("blend-color", Color::BLUE);
-  ControlRenderer controlRenderer = factory.GetControlRenderer( propertyMap );
+  propertyMap.Insert("rendererType",  "color");
+  propertyMap.Insert("mixColor",  Color::BLUE);
+  ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
 
   ControlRenderer controlRendererCopy( controlRenderer );
   DALI_TEST_CHECK(controlRenderer == controlRendererCopy);
@@ -81,9 +85,9 @@ int UtcDaliControlRendererSetGetDepthIndex(void)
 
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert("renderer-type", "color-renderer");
-  propertyMap.Insert("blend-color", Color::BLUE);
-  ControlRenderer controlRenderer = factory.GetControlRenderer( propertyMap );
+  propertyMap.Insert("rendererType",  "color");
+  propertyMap.Insert("mixColor",  Color::BLUE);
+  ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
 
   controlRenderer.SetDepthIndex( 1.f );
 
@@ -92,11 +96,13 @@ int UtcDaliControlRendererSetGetDepthIndex(void)
   Stage::GetCurrent().Add( actor );
   controlRenderer.SetOnStage( actor );
 
-  DALI_TEST_EQUALS( actor.GetRendererAt(0u).GetDepthIndex(), 1.f, TEST_LOCATION );
+  int depthIndex = actor.GetRendererAt(0u).GetProperty<int>( Renderer::Property::DEPTH_INDEX );
+  DALI_TEST_EQUALS( depthIndex, 1, TEST_LOCATION );
   DALI_TEST_EQUALS( controlRenderer.GetDepthIndex(), 1.f, TEST_LOCATION );
 
   controlRenderer.SetDepthIndex( -1.f );
-  DALI_TEST_EQUALS( actor.GetRendererAt(0u).GetDepthIndex(), -1.f, TEST_LOCATION );
+  depthIndex = actor.GetRendererAt(0u).GetProperty<int>( Renderer::Property::DEPTH_INDEX );
+  DALI_TEST_EQUALS( depthIndex, -1, TEST_LOCATION );
   DALI_TEST_EQUALS( controlRenderer.GetDepthIndex(), -1.f, TEST_LOCATION );
 
   END_TEST;
@@ -112,7 +118,10 @@ int UtcDaliControlRendererSize(void)
   Vector2 naturalSize;
 
   // color renderer
-  ControlRenderer colorRenderer = factory.GetControlRenderer( Color::MAGENTA );
+  Dali::Property::Map map;
+  map[ "rendererType" ] = "color";
+  map[ "mixColor" ] = Color::MAGENTA;
+  ControlRenderer colorRenderer = factory.CreateControlRenderer( map );
   colorRenderer.SetSize( rendererSize );
   DALI_TEST_EQUALS( colorRenderer.GetSize(), rendererSize, TEST_LOCATION );
   colorRenderer.GetNaturalSize(naturalSize);
@@ -120,7 +129,7 @@ int UtcDaliControlRendererSize(void)
 
   // image renderer
   Image image = ResourceImage::New(TEST_IMAGE_FILE_NAME, ImageDimensions(100, 200));
-  ControlRenderer imageRenderer = factory.GetControlRenderer( image );
+  ControlRenderer imageRenderer = factory.CreateControlRenderer( image );
   imageRenderer.SetSize( rendererSize );
   DALI_TEST_EQUALS( imageRenderer.GetSize(), rendererSize, TEST_LOCATION );
   imageRenderer.GetNaturalSize(naturalSize);
@@ -131,7 +140,7 @@ int UtcDaliControlRendererSize(void)
   Vector2 testSize(80.f, 160.f);
   platform.SetClosestImageSize(testSize);
   image = ResourceImage::New(TEST_NPATCH_FILE_NAME);
-  ControlRenderer nPatchRenderer = factory.GetControlRenderer( image );
+  ControlRenderer nPatchRenderer = factory.CreateControlRenderer( image );
   nPatchRenderer.SetSize( rendererSize );
   DALI_TEST_EQUALS( nPatchRenderer.GetSize(), rendererSize, TEST_LOCATION );
   nPatchRenderer.GetNaturalSize(naturalSize);
@@ -139,7 +148,11 @@ int UtcDaliControlRendererSize(void)
 
   // border renderer
   float borderSize = 5.f;
-  ControlRenderer borderRenderer = factory.GetControlRenderer( borderSize, Color::RED );
+  map.Clear();
+  map[ "rendererType" ] = "border";
+  map[ "borderColor"  ] = Color::RED;
+  map[ "borderSize"   ] = borderSize;
+  ControlRenderer borderRenderer = factory.CreateControlRenderer( map );
   borderRenderer.SetSize( rendererSize );
   DALI_TEST_EQUALS( borderRenderer.GetSize(), rendererSize, TEST_LOCATION );
   borderRenderer.GetNaturalSize(naturalSize);
@@ -147,22 +160,32 @@ int UtcDaliControlRendererSize(void)
 
   // gradient renderer
   Property::Map propertyMap;
-  propertyMap.Insert("renderer-type", "gradient-renderer");
+  propertyMap.Insert("rendererType",  "gradient");
   Vector2 start(-1.f, -1.f);
   Vector2 end(1.f, 1.f);
-  propertyMap.Insert("gradient-start-position", start);
-  propertyMap.Insert("gradient-end-position", end);
-  propertyMap.Insert("gradient-stop-offset", Vector2(0.f, 1.f));
+  propertyMap.Insert("startPosition",   start);
+  propertyMap.Insert("endPosition",   end);
+  propertyMap.Insert("stopOffset",   Vector2(0.f, 1.f));
   Property::Array stopColors;
   stopColors.PushBack( Color::RED );
   stopColors.PushBack( Color::GREEN );
-  propertyMap.Insert("gradient-stop-color", stopColors);
-  ControlRenderer gradientRenderer = factory.GetControlRenderer(propertyMap);
+  propertyMap.Insert("stopColor",   stopColors);
+  ControlRenderer gradientRenderer = factory.CreateControlRenderer(propertyMap);
   gradientRenderer.SetSize( rendererSize );
   DALI_TEST_EQUALS( gradientRenderer.GetSize(), rendererSize, TEST_LOCATION );
   gradientRenderer.GetNaturalSize(naturalSize);
   DALI_TEST_EQUALS( naturalSize, Vector2::ZERO,TEST_LOCATION );
 
+  //svg renderer
+  ControlRenderer svgRenderer = factory.CreateControlRenderer( TEST_SVG_FILE_NAME, ImageDimensions() );
+  svgRenderer.SetSize( rendererSize );
+  DALI_TEST_EQUALS( svgRenderer.GetSize(), rendererSize, TEST_LOCATION );
+  svgRenderer.GetNaturalSize(naturalSize);
+  // TEST_SVG_FILE:
+  //  <svg width="100" height="100">
+  //  <circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" />
+  //  </svg>
+  DALI_TEST_EQUALS( naturalSize, Vector2(100.f, 100.f), TEST_LOCATION );
   END_TEST;
 }
 
@@ -173,9 +196,9 @@ int UtcDaliControlRendererSetOnOffStage(void)
 
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert("renderer-type", "color-renderer");
-  propertyMap.Insert("blend-color", Color::BLUE);
-  ControlRenderer controlRenderer = factory.GetControlRenderer( propertyMap );
+  propertyMap.Insert("rendererType",  "color");
+  propertyMap.Insert("mixColor",  Color::BLUE);
+  ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
 
   Actor actor = Actor::New();
   actor.SetSize(200.f, 200.f);
@@ -222,7 +245,7 @@ int UtcDaliControlRendererRemoveAndReset(void)
   }
 
   Image image = ResourceImage::New(TEST_IMAGE_FILE_NAME, ImageDimensions(100, 200));
-  imageRenderer = factory.GetControlRenderer(image);
+  imageRenderer = factory.CreateControlRenderer(image);
   DALI_TEST_CHECK( imageRenderer );
 
   imageRenderer.SetOnStage( actor );
@@ -246,26 +269,29 @@ int UtcDaliControlRendererGetPropertyMap1(void)
 
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert("renderer-type", "color-renderer");
-  propertyMap.Insert("blend-color", Color::BLUE);
-  ControlRenderer colorRenderer = factory.GetControlRenderer( propertyMap );
+  propertyMap.Insert("rendererType",  "color");
+  propertyMap.Insert("mixColor",  Color::BLUE);
+  ControlRenderer colorRenderer = factory.CreateControlRenderer( propertyMap );
 
   Property::Map resultMap;
   colorRenderer.CreatePropertyMap( resultMap );
 
-  Property::Value* typeValue = resultMap.Find( "renderer-type", Property::STRING );
+  Property::Value* typeValue = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( typeValue );
-  DALI_TEST_CHECK( typeValue->Get<std::string>() == "color-renderer" );
+  DALI_TEST_CHECK( typeValue->Get<std::string>() == "color" );
 
-  Property::Value* colorValue = resultMap.Find( "blend-color", Property::VECTOR4 );
+  Property::Value* colorValue = resultMap.Find( "mixColor",  Property::VECTOR4 );
   DALI_TEST_CHECK( colorValue );
   DALI_TEST_CHECK( colorValue->Get<Vector4>() == Color::BLUE );
 
   // change the blend color
-  factory.ResetRenderer( colorRenderer, Color::CYAN );
+  Actor actor;
+  colorRenderer.RemoveAndReset( actor );
+  propertyMap["mixColor"] = Color::CYAN;
+  colorRenderer = factory.CreateControlRenderer( propertyMap  );
   colorRenderer.CreatePropertyMap( resultMap );
 
-  colorValue = resultMap.Find( "blend-color", Property::VECTOR4 );
+  colorValue = resultMap.Find( "mixColor",  Property::VECTOR4 );
   DALI_TEST_CHECK( colorValue );
   DALI_TEST_CHECK( colorValue->Get<Vector4>() == Color::CYAN );
 
@@ -279,39 +305,43 @@ int UtcDaliControlRendererGetPropertyMap2(void)
 
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert("renderer-type", "border-renderer");
-  propertyMap.Insert("border-color", Color::BLUE);
-  propertyMap.Insert("border-size", 5.f);
-  ControlRenderer borderRenderer = factory.GetControlRenderer( propertyMap );
+  propertyMap.Insert("rendererType",  "border");
+  propertyMap.Insert("borderColor",  Color::BLUE);
+  propertyMap.Insert("borderSize",  5.f);
+  ControlRenderer borderRenderer = factory.CreateControlRenderer( propertyMap );
 
   Property::Map resultMap;
   borderRenderer.CreatePropertyMap( resultMap );
 
   // check the property values from the returned map from control renderer
-  Property::Value* typeValue = resultMap.Find( "renderer-type", Property::STRING );
+  Property::Value* typeValue = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( typeValue );
-  DALI_TEST_CHECK( typeValue->Get<std::string>() == "border-renderer" );
+  DALI_TEST_CHECK( typeValue->Get<std::string>() == "border" );
 
-  Property::Value* colorValue = resultMap.Find( "border-color", Property::VECTOR4 );
+  Property::Value* colorValue = resultMap.Find( "borderColor",  Property::VECTOR4 );
   DALI_TEST_CHECK( colorValue );
   DALI_TEST_CHECK( colorValue->Get<Vector4>() == Color::BLUE );
 
-  Property::Value* sizeValue = resultMap.Find( "border-size", Property::FLOAT );
+  Property::Value* sizeValue = resultMap.Find( "borderSize",  Property::FLOAT );
   DALI_TEST_CHECK( sizeValue );
   DALI_TEST_CHECK( sizeValue->Get<float>() == 5.f );
 
-  borderRenderer = factory.GetControlRenderer( 10.f, Color::CYAN );
+  Property::Map propertyMap1;
+  propertyMap1[ "rendererType" ] = "border";
+  propertyMap1[ "borderColor"  ] = Color::CYAN;
+  propertyMap1[ "borderSize"   ] = 10.0f;
+  borderRenderer = factory.CreateControlRenderer( propertyMap1 );
   borderRenderer.CreatePropertyMap( resultMap );
 
-  typeValue = resultMap.Find( "renderer-type", Property::STRING );
+  typeValue = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( typeValue );
-  DALI_TEST_CHECK( typeValue->Get<std::string>() == "border-renderer" );
+  DALI_TEST_CHECK( typeValue->Get<std::string>() == "border" );
 
-   colorValue = resultMap.Find( "border-color", Property::VECTOR4 );
+  colorValue = resultMap.Find( "borderColor",  Property::VECTOR4 );
   DALI_TEST_CHECK( colorValue );
   DALI_TEST_CHECK( colorValue->Get<Vector4>() == Color::CYAN );
 
-  colorValue = resultMap.Find( "border-size", Property::FLOAT );
+  colorValue = resultMap.Find( "borderSize",  Property::FLOAT );
   DALI_TEST_CHECK( colorValue );
   DALI_TEST_CHECK( colorValue->Get<float>() == 10.f );
 
@@ -327,55 +357,55 @@ int UtcDaliControlRendererGetPropertyMap3(void)
   DALI_TEST_CHECK( factory );
 
   Property::Map propertyMap;
-  propertyMap.Insert("renderer-type", "gradient-renderer");
+  propertyMap.Insert("rendererType",  "gradient");
 
   Vector2 start(-1.f, -1.f);
   Vector2 end(1.f, 1.f);
-  propertyMap.Insert("gradient-start-position", start);
-  propertyMap.Insert("gradient-end-position", end);
-  propertyMap.Insert("gradient-spread-method", "repeat");
+  propertyMap.Insert("startPosition",   start);
+  propertyMap.Insert("endPosition",   end);
+  propertyMap.Insert("spreadMethod",   "repeat");
 
-  propertyMap.Insert("gradient-stop-offset", Vector2(0.2f, 0.8f));
+  propertyMap.Insert("stopOffset",   Vector2(0.2f, 0.8f));
 
   Property::Array stopColors;
   stopColors.PushBack( Color::RED );
   stopColors.PushBack( Color::GREEN );
-  propertyMap.Insert("gradient-stop-color", stopColors);
+  propertyMap.Insert("stopColor",   stopColors);
 
-  ControlRenderer gradientRenderer = factory.GetControlRenderer(propertyMap);
+  ControlRenderer gradientRenderer = factory.CreateControlRenderer(propertyMap);
 
   Property::Map resultMap;
   gradientRenderer.CreatePropertyMap( resultMap );
 
   // check the property values from the returned map from control renderer
-  Property::Value* value = resultMap.Find( "renderer-type", Property::STRING );
+  Property::Value* value = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "gradient-renderer" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "gradient" );
 
-  value = resultMap.Find( "gradient-units", Property::STRING );
+  value = resultMap.Find( "units",  Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "object-bounding-box" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "objectBoundingBox" );
 
-  value = resultMap.Find( "gradient-spread-method", Property::STRING );
+  value = resultMap.Find( "spreadMethod",   Property::STRING );
   DALI_TEST_CHECK( value );
   DALI_TEST_CHECK( value->Get<std::string>() == "repeat" );
 
-  value = resultMap.Find( "gradient-start-position", Property::VECTOR2 );
+  value = resultMap.Find( "startPosition",   Property::VECTOR2 );
   DALI_TEST_CHECK( value );
   DALI_TEST_EQUALS( value->Get<Vector2>(), start , Math::MACHINE_EPSILON_100, TEST_LOCATION );
 
-  value = resultMap.Find( "gradient-end-position", Property::VECTOR2 );
+  value = resultMap.Find( "endPosition",   Property::VECTOR2 );
   DALI_TEST_CHECK( value );
   DALI_TEST_EQUALS( value->Get<Vector2>(), end , Math::MACHINE_EPSILON_100, TEST_LOCATION );
 
-  value = resultMap.Find( "gradient-stop-offset", Property::ARRAY );
+  value = resultMap.Find( "stopOffset",   Property::ARRAY );
   DALI_TEST_CHECK( value );
   Property::Array* offsetArray = value->GetArray();
   DALI_TEST_CHECK( offsetArray->Count() == 2 );
   DALI_TEST_EQUALS( offsetArray->GetElementAt(0).Get<float>(), 0.2f , Math::MACHINE_EPSILON_100, TEST_LOCATION );
   DALI_TEST_EQUALS( offsetArray->GetElementAt(1).Get<float>(), 0.8f , Math::MACHINE_EPSILON_100, TEST_LOCATION );
 
-  value = resultMap.Find( "gradient-stop-color", Property::ARRAY );
+  value = resultMap.Find( "stopColor",   Property::ARRAY );
   DALI_TEST_CHECK( value );
   Property::Array* colorArray = value->GetArray();
   DALI_TEST_CHECK( colorArray->Count() == 2 );
@@ -394,49 +424,49 @@ int UtcDaliControlRendererGetPropertyMap4(void)
   DALI_TEST_CHECK( factory );
 
   Property::Map propertyMap;
-  propertyMap.Insert("renderer-type", "gradient-renderer");
+  propertyMap.Insert("rendererType",  "gradient");
 
   Vector2 center(100.f, 100.f);
   float radius = 100.f;
-  propertyMap.Insert("gradient-units", "user-space");
-  propertyMap.Insert("gradient-center", center);
-  propertyMap.Insert("gradient-radius", radius);
-  propertyMap.Insert("gradient-stop-offset", Vector3(0.1f, 0.3f, 1.1f));
+  propertyMap.Insert("units",  "userSpace");
+  propertyMap.Insert("center",  center);
+  propertyMap.Insert("radius",  radius);
+  propertyMap.Insert("stopOffset",   Vector3(0.1f, 0.3f, 1.1f));
 
   Property::Array stopColors;
   stopColors.PushBack( Color::RED );
   stopColors.PushBack( Color::BLACK );
   stopColors.PushBack( Color::GREEN );
-  propertyMap.Insert("gradient-stop-color", stopColors);
+  propertyMap.Insert("stopColor",   stopColors);
 
-  ControlRenderer gradientRenderer = factory.GetControlRenderer(propertyMap);
+  ControlRenderer gradientRenderer = factory.CreateControlRenderer(propertyMap);
   DALI_TEST_CHECK( gradientRenderer );
 
   Property::Map resultMap;
   gradientRenderer.CreatePropertyMap( resultMap );
 
   // check the property values from the returned map from control renderer
-  Property::Value* value = resultMap.Find( "renderer-type", Property::STRING );
+  Property::Value* value = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "gradient-renderer" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "gradient" );
 
-  value = resultMap.Find( "gradient-units", Property::STRING );
+  value = resultMap.Find( "units",  Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "user-space" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "userSpace" );
 
-  value = resultMap.Find( "gradient-spread-method", Property::STRING );
+  value = resultMap.Find( "spreadMethod",   Property::STRING );
   DALI_TEST_CHECK( value );
   DALI_TEST_CHECK( value->Get<std::string>() == "pad" );
 
-  value = resultMap.Find( "gradient-center", Property::VECTOR2 );
+  value = resultMap.Find( "center",  Property::VECTOR2 );
   DALI_TEST_CHECK( value );
   DALI_TEST_EQUALS( value->Get<Vector2>(), center , Math::MACHINE_EPSILON_100, TEST_LOCATION );
 
-  value = resultMap.Find( "gradient-radius", Property::FLOAT );
+  value = resultMap.Find( "radius",  Property::FLOAT );
   DALI_TEST_CHECK( value );
   DALI_TEST_EQUALS( value->Get<float>(), radius , Math::MACHINE_EPSILON_100, TEST_LOCATION );
 
-  value = resultMap.Find( "gradient-stop-offset", Property::ARRAY );
+  value = resultMap.Find( "stopOffset",   Property::ARRAY );
   DALI_TEST_CHECK( value );
   Property::Array* offsetArray = value->GetArray();
   DALI_TEST_CHECK( offsetArray->Count() == 3 );
@@ -445,7 +475,7 @@ int UtcDaliControlRendererGetPropertyMap4(void)
   // any stop value will be clamped to [0.0, 1.0];
   DALI_TEST_EQUALS( offsetArray->GetElementAt(2).Get<float>(), 1.0f , Math::MACHINE_EPSILON_100, TEST_LOCATION );
 
-  value = resultMap.Find( "gradient-stop-color", Property::ARRAY );
+  value = resultMap.Find( "stopColor",   Property::ARRAY );
   DALI_TEST_CHECK( value );
   Property::Array* colorArray = value->GetArray();
   DALI_TEST_CHECK( colorArray->Count() == 3 );
@@ -463,73 +493,82 @@ int UtcDaliControlRendererGetPropertyMap5(void)
 
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert( "renderer-type", "image-renderer" );
-  propertyMap.Insert( "image-url", TEST_IMAGE_FILE_NAME );
-  propertyMap.Insert( "image-desired-width", 20 );
-  propertyMap.Insert( "image-desired-height", 30 );
-  propertyMap.Insert( "image-fitting-mode", "fit-height" );
-  propertyMap.Insert( "image-sampling-mode", "box-then-nearest" );
-
-  ControlRenderer imageRenderer = factory.GetControlRenderer(propertyMap);
+  propertyMap.Insert( "rendererType",  "image" );
+  propertyMap.Insert( "url",  TEST_IMAGE_FILE_NAME );
+  propertyMap.Insert( "desiredWidth",   20 );
+  propertyMap.Insert( "desiredHeight",   30 );
+  propertyMap.Insert( "fittingMode",   "FIT_HEIGHT" );
+  propertyMap.Insert( "samplingMode",   "BOX_THEN_NEAREST" );
+  propertyMap.Insert( "synchronousLoading",   true );
+
+  ControlRenderer imageRenderer = factory.CreateControlRenderer(propertyMap);
   DALI_TEST_CHECK( imageRenderer );
 
   Property::Map resultMap;
   imageRenderer.CreatePropertyMap( resultMap );
 
   // check the property values from the returned map from control renderer
-  Property::Value* value = resultMap.Find( "renderer-type", Property::STRING );
+  Property::Value* value = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "image-renderer" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "image" );
 
-  value = resultMap.Find( "image-url", Property::STRING );
+  value = resultMap.Find( "url",  Property::STRING );
   DALI_TEST_CHECK( value );
   DALI_TEST_CHECK( value->Get<std::string>() == TEST_IMAGE_FILE_NAME );
 
-  value = resultMap.Find( "image-fitting-mode", Property::STRING );
+  value = resultMap.Find( "fittingMode",   Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "fit-height" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "FIT_HEIGHT" );
 
-  value = resultMap.Find( "image-sampling-mode", Property::STRING );
+  value = resultMap.Find( "samplingMode",   Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "box-then-nearest" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "BOX_THEN_NEAREST" );
 
-  value = resultMap.Find( "image-desired-width", Property::INTEGER );
+  value = resultMap.Find( "desiredWidth",   Property::INTEGER );
   DALI_TEST_CHECK( value );
   DALI_TEST_CHECK( value->Get<int>() == 20 );
 
-  value = resultMap.Find( "image-desired-height", Property::INTEGER );
+  value = resultMap.Find( "desiredHeight",   Property::INTEGER );
   DALI_TEST_CHECK( value );
   DALI_TEST_CHECK( value->Get<int>() == 30 );
 
+  value = resultMap.Find( "synchronousLoading",   Property::BOOLEAN );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_CHECK( value->Get<bool>() == true );
+
   // Get an image renderer with an image handle, and test the default property values
   Image image = ResourceImage::New(TEST_IMAGE_FILE_NAME, ImageDimensions(100, 200));
-  imageRenderer = factory.GetControlRenderer(image);
+  imageRenderer = factory.CreateControlRenderer(image);
   imageRenderer.CreatePropertyMap( resultMap );
 
-  value = resultMap.Find( "renderer-type", Property::STRING );
+  value = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "image-renderer" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "image" );
 
-  value = resultMap.Find( "image-url", Property::STRING );
+  value = resultMap.Find( "url",  Property::STRING );
   DALI_TEST_CHECK( value );
   DALI_TEST_CHECK( value->Get<std::string>() == TEST_IMAGE_FILE_NAME );
 
-  value = resultMap.Find( "image-fitting-mode", Property::STRING );
+  value = resultMap.Find( "fittingMode",   Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "shrink-to-fit" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "SHRINK_TO_FIT" );
 
-  value = resultMap.Find( "image-sampling-mode", Property::STRING );
+  value = resultMap.Find( "samplingMode",   Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "box" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "BOX" );
 
-  value = resultMap.Find( "image-desired-width", Property::INTEGER );
+  value = resultMap.Find( "desiredWidth",   Property::INTEGER );
   DALI_TEST_CHECK( value );
   DALI_TEST_CHECK( value->Get<int>() == 100 );
 
-  value = resultMap.Find( "image-desired-height", Property::INTEGER );
+  value = resultMap.Find( "desiredHeight",   Property::INTEGER );
   DALI_TEST_CHECK( value );
   DALI_TEST_CHECK( value->Get<int>() == 200 );
 
+  value = resultMap.Find( "synchronousLoading",   Property::BOOLEAN );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_CHECK( value->Get<bool>() == false );
+
   END_TEST;
 }
 
@@ -540,26 +579,108 @@ int UtcDaliControlRendererGetPropertyMap6(void)
 
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert( "renderer-type", "n-patch-renderer" );
-  propertyMap.Insert( "image-url", TEST_NPATCH_FILE_NAME );
-  propertyMap.Insert( "border-only", true );
-  ControlRenderer nPatchRenderer = factory.GetControlRenderer( propertyMap );
+  propertyMap.Insert( "rendererType",  "image" );
+  propertyMap.Insert( "url",  TEST_NPATCH_FILE_NAME );
+  propertyMap.Insert( "borderOnly",  true );
+  ControlRenderer nPatchRenderer = factory.CreateControlRenderer( propertyMap );
 
   Property::Map resultMap;
   nPatchRenderer.CreatePropertyMap( resultMap );
 
   // check the property values from the returned map from control renderer
-  Property::Value* value = resultMap.Find( "renderer-type", Property::STRING );
+  Property::Value* value = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "n-patch-renderer" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "image" );
 
-  value = resultMap.Find( "image-url", Property::STRING );
+  value = resultMap.Find( "url",  Property::STRING );
   DALI_TEST_CHECK( value );
   DALI_TEST_CHECK( value->Get<std::string>() == TEST_NPATCH_FILE_NAME );
 
-  value = resultMap.Find( "border-only", Property::BOOLEAN );
+  value = resultMap.Find( "borderOnly",  Property::BOOLEAN );
   DALI_TEST_CHECK( value );
   DALI_TEST_CHECK( value->Get<bool>() );
 
   END_TEST;
 }
+
+int UtcDaliControlRendererGetPropertyMap7(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliControlRendererGetPropertyMap7: SvgRenderer" );
+
+  // request SvgRenderer with a property map
+  RendererFactory factory = RendererFactory::Get();
+  Property::Map propertyMap;
+  propertyMap.Insert( "rendererType",  "image" );
+  propertyMap.Insert( "url",  TEST_SVG_FILE_NAME );
+  ControlRenderer svgRenderer = factory.CreateControlRenderer( propertyMap );
+
+  Property::Map resultMap;
+  svgRenderer.CreatePropertyMap( resultMap );
+  // check the property values from the returned map from control renderer
+  Property::Value* value = resultMap.Find( "rendererType",  Property::STRING );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_CHECK( value->Get<std::string>() == "image" );
+
+  value = resultMap.Find( "url",  Property::STRING );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_CHECK( value->Get<std::string>() == TEST_SVG_FILE_NAME );
+
+  // request SvgRenderer with an URL
+  ControlRenderer svgRenderer2 = factory.CreateControlRenderer( TEST_SVG_FILE_NAME, ImageDimensions() );
+  resultMap.Clear();
+  svgRenderer2.CreatePropertyMap( resultMap );
+  // check the property values from the returned map from control renderer
+  value = resultMap.Find( "rendererType",  Property::STRING );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_CHECK( value->Get<std::string>() == "image" );
+
+  value = resultMap.Find( "url",  Property::STRING );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_CHECK( value->Get<std::string>() == TEST_SVG_FILE_NAME );
+
+  END_TEST;
+}
+
+//Mesh renderer
+int UtcDaliControlRendererGetPropertyMap8(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliControlRendererGetPropertyMap8: MeshRenderer" );
+
+  //Request MeshRenderer using a property map.
+  RendererFactory factory = RendererFactory::Get();
+  Property::Map propertyMap;
+  propertyMap.Insert( "rendererType", "mesh" );
+  propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
+  propertyMap.Insert( "materialUrl", TEST_MTL_FILE_NAME );
+  propertyMap.Insert( "texturesPath", TEST_RESOURCE_LOCATION );
+  propertyMap.Insert( "shaderType", "textureless" );
+  ControlRenderer meshRenderer = factory.CreateControlRenderer( propertyMap );
+
+  Property::Map resultMap;
+  meshRenderer.CreatePropertyMap( resultMap );
+
+  //Check values in the result map are identical to the initial map's values.
+  Property::Value* value = resultMap.Find( "rendererType", Property::STRING );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_CHECK( value->Get<std::string>() == "mesh" );
+
+  value = resultMap.Find( "objectUrl", Property::STRING );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_CHECK( value->Get<std::string>() == TEST_OBJ_FILE_NAME );
+
+  value = resultMap.Find( "materialUrl", Property::STRING );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_CHECK( value->Get<std::string>() == TEST_MTL_FILE_NAME );
+
+  value = resultMap.Find( "texturesPath", Property::STRING );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_CHECK( value->Get<std::string>() == TEST_RESOURCE_LOCATION );
+
+  value = resultMap.Find( "shaderType", Property::STRING );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_CHECK( value->Get<std::string>() == "textureless" );
+
+  END_TEST;
+}