Merge "Fix webp&gif issue" into devel/master
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-Visual.cpp
index 7d77a1b..c17567a 100644 (file)
@@ -615,20 +615,6 @@ int UtcDaliVisualGetPropertyMap2(void)
   DALI_TEST_CHECK(sizeValue);
   DALI_TEST_CHECK(sizeValue->Get<float>() == 10.f);
 
-  // Get default value of borderline values here
-
-  sizeValue = resultMap.Find(DevelVisual::Property::BORDERLINE_WIDTH, Property::FLOAT);
-  DALI_TEST_CHECK(sizeValue);
-  DALI_TEST_CHECK(sizeValue->Get<float>() == 0.0f);
-
-  colorValue = resultMap.Find(DevelVisual::Property::BORDERLINE_COLOR, Property::VECTOR4);
-  DALI_TEST_CHECK(colorValue);
-  DALI_TEST_CHECK(colorValue->Get<Vector4>() == Color::BLACK);
-
-  sizeValue = resultMap.Find(DevelVisual::Property::BORDERLINE_OFFSET, Property::FLOAT);
-  DALI_TEST_CHECK(sizeValue);
-  DALI_TEST_CHECK(sizeValue->Get<float>() == 0.0f);
-
   END_TEST;
 }
 
@@ -3470,7 +3456,7 @@ int UtcDaliVisualPremultipliedAlpha(void)
     DALI_TEST_EQUALS(value->Get<bool>(), false, TEST_LOCATION);
   }
 
-  // svg visual ( premultiplied alpha by default is true )
+  // svg visual ( premultiplied alpha by default is true, and cannot change value )
   {
     Visual::Base imageVisual = factory.CreateVisual(
       Property::Map()
@@ -3485,6 +3471,149 @@ int UtcDaliVisualPremultipliedAlpha(void)
     DALI_TEST_CHECK(value);
     DALI_TEST_EQUALS(value->Get<bool>(), true, TEST_LOCATION);
   }
+  {
+    Visual::Base imageVisual = factory.CreateVisual(
+      Property::Map()
+        .Add(Toolkit::Visual::Property::TYPE, Visual::IMAGE)
+        .Add(ImageVisual::Property::URL, TEST_SVG_FILE_NAME)
+        .Add(Visual::Property::PREMULTIPLIED_ALPHA, false));
+
+    Dali::Property::Map visualMap;
+    imageVisual.CreatePropertyMap(visualMap);
+    Property::Value* value = visualMap.Find(Visual::Property::PREMULTIPLIED_ALPHA);
+
+    // test values
+    DALI_TEST_CHECK(value);
+    DALI_TEST_EQUALS(value->Get<bool>(), true, TEST_LOCATION);
+  }
+
+  // animated vector visual ( premultiplied alpha by default is true, and cannot change value )
+  {
+    Visual::Base imageVisual = factory.CreateVisual(
+      Property::Map()
+        .Add(Toolkit::Visual::Property::TYPE, Visual::IMAGE)
+        .Add(ImageVisual::Property::URL, "something.json"));
+
+    Dali::Property::Map visualMap;
+    imageVisual.CreatePropertyMap(visualMap);
+    Property::Value* value = visualMap.Find(Visual::Property::PREMULTIPLIED_ALPHA);
+
+    // test values
+    DALI_TEST_CHECK(value);
+    DALI_TEST_EQUALS(value->Get<bool>(), true, TEST_LOCATION);
+  }
+  {
+    Visual::Base imageVisual = factory.CreateVisual(
+      Property::Map()
+        .Add(Toolkit::Visual::Property::TYPE, Visual::IMAGE)
+        .Add(ImageVisual::Property::URL, "something.json")
+        .Add(Visual::Property::PREMULTIPLIED_ALPHA, false));
+
+    Dali::Property::Map visualMap;
+    imageVisual.CreatePropertyMap(visualMap);
+    Property::Value* value = visualMap.Find(Visual::Property::PREMULTIPLIED_ALPHA);
+
+    // test values
+    DALI_TEST_CHECK(value);
+    DALI_TEST_EQUALS(value->Get<bool>(), true, TEST_LOCATION);
+  }
+
+  // text visual ( premultiplied alpha by default is true, and cannot change value )
+  {
+    Visual::Base textVisual = factory.CreateVisual(
+      Property::Map()
+        .Add(Toolkit::Visual::Property::TYPE, Visual::TEXT)
+        .Add(TextVisual::Property::TEXT, "Text"));
+
+    Dali::Property::Map visualMap;
+    textVisual.CreatePropertyMap(visualMap);
+    Property::Value* value = visualMap.Find(Visual::Property::PREMULTIPLIED_ALPHA);
+
+    // test values
+    DALI_TEST_CHECK(value);
+    DALI_TEST_EQUALS(value->Get<bool>(), true, TEST_LOCATION);
+  }
+  {
+    Visual::Base textVisual = factory.CreateVisual(
+      Property::Map()
+        .Add(Toolkit::Visual::Property::TYPE, Visual::TEXT)
+        .Add(TextVisual::Property::TEXT, "Text")
+        .Add(Visual::Property::PREMULTIPLIED_ALPHA, false));
+
+    Dali::Property::Map visualMap;
+    textVisual.CreatePropertyMap(visualMap);
+    Property::Value* value = visualMap.Find(Visual::Property::PREMULTIPLIED_ALPHA);
+
+    // test values
+    DALI_TEST_CHECK(value);
+    DALI_TEST_EQUALS(value->Get<bool>(), true, TEST_LOCATION);
+  }
+
+  // gradient visual ( premultiplied alpha by default is true, and cannot change value )
+  {
+    Visual::Base gradientVisual = factory.CreateVisual(
+      Property::Map()
+        .Add(Toolkit::Visual::Property::TYPE, Visual::GRADIENT)
+        .Add(GradientVisual::Property::START_POSITION, Vector2(-0.5f, -0.5f))
+        .Add(GradientVisual::Property::END_POSITION, Vector2(0.5f, 0.5f))
+        .Add(GradientVisual::Property::STOP_COLOR, Property::Array().Add(Color::RED).Add(Vector4(1.0f, 1.0f, 1.0f, 0.5f))));
+
+    Dali::Property::Map visualMap;
+    gradientVisual.CreatePropertyMap(visualMap);
+    Property::Value* value = visualMap.Find(Visual::Property::PREMULTIPLIED_ALPHA);
+
+    // test values
+    DALI_TEST_CHECK(value);
+    DALI_TEST_EQUALS(value->Get<bool>(), true, TEST_LOCATION);
+  }
+  {
+    Visual::Base gradientVisual = factory.CreateVisual(
+      Property::Map()
+        .Add(Toolkit::Visual::Property::TYPE, Visual::GRADIENT)
+        .Add(GradientVisual::Property::START_POSITION, Vector2(-0.5f, -0.5f))
+        .Add(GradientVisual::Property::END_POSITION, Vector2(0.5f, 0.5f))
+        .Add(GradientVisual::Property::STOP_COLOR, Property::Array().Add(Color::RED).Add(Vector4(1.0f, 1.0f, 1.0f, 0.5f)))
+        .Add(Visual::Property::PREMULTIPLIED_ALPHA, false));
+
+    Dali::Property::Map visualMap;
+    gradientVisual.CreatePropertyMap(visualMap);
+    Property::Value* value = visualMap.Find(Visual::Property::PREMULTIPLIED_ALPHA);
+
+    // test values
+    DALI_TEST_CHECK(value);
+    DALI_TEST_EQUALS(value->Get<bool>(), true, TEST_LOCATION);
+  }
+
+  // color visual ( premultiplied alpha by default is false, and cannot change value )
+  {
+    Visual::Base colorVisual = factory.CreateVisual(
+      Property::Map()
+        .Add(Toolkit::Visual::Property::TYPE, Visual::COLOR)
+        .Add(ColorVisual::Property::MIX_COLOR, Color::AQUA));
+
+    Dali::Property::Map visualMap;
+    colorVisual.CreatePropertyMap(visualMap);
+    Property::Value* value = visualMap.Find(Visual::Property::PREMULTIPLIED_ALPHA);
+
+    // test values
+    DALI_TEST_CHECK(value);
+    DALI_TEST_EQUALS(value->Get<bool>(), false, TEST_LOCATION);
+  }
+  {
+    Visual::Base colorVisual = factory.CreateVisual(
+      Property::Map()
+        .Add(Toolkit::Visual::Property::TYPE, Visual::COLOR)
+        .Add(ColorVisual::Property::MIX_COLOR, Color::AQUA)
+        .Add(Visual::Property::PREMULTIPLIED_ALPHA, true));
+
+    Dali::Property::Map visualMap;
+    colorVisual.CreatePropertyMap(visualMap);
+    Property::Value* value = visualMap.Find(Visual::Property::PREMULTIPLIED_ALPHA);
+
+    // test values
+    DALI_TEST_CHECK(value);
+    DALI_TEST_EQUALS(value->Get<bool>(), false, TEST_LOCATION);
+  }
 
   END_TEST;
 }
@@ -3743,11 +3872,9 @@ int UtcDaliVisualRoundedCorner(void)
     application.SendNotification();
     application.Render();
 
-#ifdef OLD_GRAPHICS_TEST
     // Currently test with multiple program doesn't work well. will fix another day
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("cornerRadius", Vector4(cornerRadius, cornerRadius, cornerRadius, cornerRadius)), true, TEST_LOCATION);
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("cornerRadiusPolicy", Toolkit::Visual::Transform::Policy::ABSOLUTE), true, TEST_LOCATION);
-#endif
   }
 
   // color visual 2
@@ -3778,11 +3905,9 @@ int UtcDaliVisualRoundedCorner(void)
     application.SendNotification();
     application.Render();
 
-#ifdef OLD_GRAPHICS_TEST
     // Currently test with multiple program doesn't work well. will fix another day
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("cornerRadius", cornerRadius), true, TEST_LOCATION);
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("cornerRadiusPolicy", Toolkit::Visual::Transform::Policy::RELATIVE), true, TEST_LOCATION);
-#endif
   }
 
   // color visual 3 - invalid value
@@ -3813,12 +3938,10 @@ int UtcDaliVisualRoundedCorner(void)
     application.SendNotification();
     application.Render();
 
-#ifdef OLD_GRAPHICS_TEST
     // Currently test with multiple program doesn't work well. will fix another day
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("cornerRadius", cornerRadius), true, TEST_LOCATION);
     // Default corner radius policy is absolute.
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("cornerRadiusPolicy", Toolkit::Visual::Transform::Policy::ABSOLUTE), true, TEST_LOCATION);
-#endif
   }
 
   // gradient visual
@@ -3863,12 +3986,9 @@ int UtcDaliVisualRoundedCorner(void)
     application.SendNotification();
     application.Render();
 
-#ifdef OLD_GRAPHICS_TEST
-    // Currently test with multiple program doesn't work well. will fix another day
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("cornerRadius", Vector4(cornerRadius, cornerRadius, cornerRadius, cornerRadius)), true, TEST_LOCATION);
     // Default corner radius policy is absolute.
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("cornerRadiusPolicy", Toolkit::Visual::Transform::Policy::ABSOLUTE), true, TEST_LOCATION);
-#endif
   }
 
   // animated image visual
@@ -3902,11 +4022,8 @@ int UtcDaliVisualRoundedCorner(void)
     application.SendNotification();
     application.Render();
 
-#ifdef OLD_GRAPHICS_TEST
-    // Currently test with multiple program doesn't work well. will fix another day
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("cornerRadius", cornerRadius), true, TEST_LOCATION);
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("cornerRadiusPolicy", Toolkit::Visual::Transform::Policy::ABSOLUTE), true, TEST_LOCATION);
-#endif
   }
 
   // vector image visual
@@ -3938,12 +4055,9 @@ int UtcDaliVisualRoundedCorner(void)
     application.SendNotification();
     application.Render();
 
-#ifdef OLD_GRAPHICS_TEST
-    // Currently test with multiple program doesn't work well. will fix another day
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("cornerRadius", cornerRadius), true, TEST_LOCATION);
     // Default corner radius policy is absolute.
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("cornerRadiusPolicy", Toolkit::Visual::Transform::Policy::ABSOLUTE), true, TEST_LOCATION);
-#endif
   }
 
   // animated vector image visual
@@ -3977,11 +4091,8 @@ int UtcDaliVisualRoundedCorner(void)
     application.SendNotification();
     application.Render();
 
-#ifdef OLD_GRAPHICS_TEST
-    // Currently test with multiple program doesn't work well. will fix another day
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("cornerRadius", Vector4(cornerRadius, cornerRadius, cornerRadius, cornerRadius)), true, TEST_LOCATION);
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("cornerRadiusPolicy", Toolkit::Visual::Transform::Policy::RELATIVE), true, TEST_LOCATION);
-#endif
   }
 
   END_TEST;
@@ -4080,13 +4191,10 @@ int UtcDaliVisualBorderline(void)
     application.SendNotification();
     application.Render();
 
-#ifdef OLD_GRAPHICS_TEST
-    // Currently test with multiple program doesn't work well. will fix another day
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("cornerRadius", cornerRadius), true, TEST_LOCATION);
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("borderlineWidth", borderlineWidth), true, TEST_LOCATION);
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("borderlineColor", borderlineColor), true, TEST_LOCATION);
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("borderlineOffset", borderlineOffset), true, TEST_LOCATION);
-#endif
   }
 
   // color visual 2, default color, default offset
@@ -4116,14 +4224,11 @@ int UtcDaliVisualBorderline(void)
     application.SendNotification();
     application.Render();
 
-#ifdef OLD_GRAPHICS_TEST
-    // Currently test with multiple program doesn't work well. will fix another day
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("borderlineWidth", borderlineWidth), true, TEST_LOCATION);
     // Default borderline color is BLACK.
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("borderlineColor", Color::BLACK), true, TEST_LOCATION);
     // Default borderline offset is 0.0f.
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("borderlineOffset", 0.0f), true, TEST_LOCATION);
-#endif
   }
 
   // color visual 3, offset not [-1.0 ~ 1.0], but uniform value is same anyway
@@ -4157,13 +4262,10 @@ int UtcDaliVisualBorderline(void)
     application.SendNotification();
     application.Render();
 
-#ifdef OLD_GRAPHICS_TEST
-    // Currently test with multiple program doesn't work well. will fix another day
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("borderlineWidth", borderlineWidth), true, TEST_LOCATION);
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("borderlineColor", borderlineColor), true, TEST_LOCATION);
     // NOTE : borderlineOffset will clamp in fragment shader. not visual itself
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("borderlineOffset", borderlineOffset), true, TEST_LOCATION);
-#endif
   }
 
   // gradient visual
@@ -4210,8 +4312,6 @@ int UtcDaliVisualBorderline(void)
     application.SendNotification();
     application.Render();
 
-#ifdef OLD_GRAPHICS_TEST
-    // Currently test with multiple program doesn't work well. will fix another day
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("cornerRadius", Vector4(cornerRadius, cornerRadius, cornerRadius, cornerRadius)), true, TEST_LOCATION);
     // Default corner radius policy is absolute.
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("cornerRadiusPolicy", Toolkit::Visual::Transform::Policy::ABSOLUTE), true, TEST_LOCATION);
@@ -4220,7 +4320,6 @@ int UtcDaliVisualBorderline(void)
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("borderlineColor", Color::BLACK), true, TEST_LOCATION);
     // Default borderline offset is 0.0f.
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("borderlineOffset", 0.0f), true, TEST_LOCATION);
-#endif
   }
 
   // animated image visual
@@ -4255,13 +4354,10 @@ int UtcDaliVisualBorderline(void)
     application.SendNotification();
     application.Render();
 
-#ifdef OLD_GRAPHICS_TEST
-    // Currently test with multiple program doesn't work well. will fix another day
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("borderlineWidth", borderlineWidth), true, TEST_LOCATION);
     // Default borderline color is BLACK.
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("borderlineColor", Color::BLACK), true, TEST_LOCATION);
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("borderlineOffset", borderlineOffset), true, TEST_LOCATION);
-#endif
   }
 
   // vector image visual
@@ -4297,8 +4393,6 @@ int UtcDaliVisualBorderline(void)
     application.SendNotification();
     application.Render();
 
-#ifdef OLD_GRAPHICS_TEST
-    // Currently test with multiple program doesn't work well. will fix another day
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("cornerRadius", cornerRadius), true, TEST_LOCATION);
     // Default corner radius policy is absolute.
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("cornerRadiusPolicy", Toolkit::Visual::Transform::Policy::ABSOLUTE), true, TEST_LOCATION);
@@ -4306,7 +4400,6 @@ int UtcDaliVisualBorderline(void)
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("borderlineColor", borderlineColor), true, TEST_LOCATION);
     // Default borderline offset is 0.0.
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("borderlineOffset", 0.0f), true, TEST_LOCATION);
-#endif
   }
 
   // animated vector image visual
@@ -4345,14 +4438,11 @@ int UtcDaliVisualBorderline(void)
     application.SendNotification();
     application.Render();
 
-#ifdef OLD_GRAPHICS_TEST
-    // Currently test with multiple program doesn't work well. will fix another day
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("cornerRadius", cornerRadius), true, TEST_LOCATION);
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("cornerRadiusPolicy", Toolkit::Visual::Transform::Policy::RELATIVE), true, TEST_LOCATION);
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("borderlineWidth", borderlineWidth), true, TEST_LOCATION);
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("borderlineColor", borderlineColor), true, TEST_LOCATION);
     DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("borderlineOffset", borderlineOffset), true, TEST_LOCATION);
-#endif
   }
 
   END_TEST;
@@ -4788,8 +4878,7 @@ int UtcDaliVisualGetVisualProperty01(void)
       UniformData("blurRadius", Property::Type::FLOAT),
       UniformData("borderlineWidth", Property::Type::FLOAT),
       UniformData("borderlineColor", Property::Type::VECTOR4),
-      UniformData("borderlineOffset", Property::Type::FLOAT),
-      UniformData("preMultipliedAlpha", Property::Type::FLOAT)};
+      UniformData("borderlineOffset", Property::Type::FLOAT)};
 
   TestGraphicsController& graphics = application.GetGraphicsController();
   graphics.AddCustomUniforms(customUniforms);
@@ -4804,7 +4893,6 @@ int UtcDaliVisualGetVisualProperty01(void)
   propertyMap.Insert(DevelVisual::Property::BORDERLINE_WIDTH, 20.0f);
   propertyMap.Insert(DevelVisual::Property::BORDERLINE_COLOR, Color::RED);
   propertyMap.Insert(DevelVisual::Property::BORDERLINE_OFFSET, 1.0f);
-  propertyMap.Insert(Visual::Property::PREMULTIPLIED_ALPHA, true);
   Visual::Base colorVisual = factory.CreateVisual(propertyMap);
 
   DummyControl        dummyControl = DummyControl::New(true);
@@ -4824,8 +4912,7 @@ int UtcDaliVisualGetVisualProperty01(void)
   float   targetBlurRadius      = 10.0f;
   float   targetBorderlineWidth = 25.0f;
   Vector4 targetBorderlineColor(1.0f, 1.0f, 1.0f, 1.0f);
-  float   targetBorderlineOffset   = -1.0f;
-  float   targetPreMultipliedAlpha = 1.0f;
+  float   targetBorderlineOffset = -1.0f;
 
   Animation animation = Animation::New(1.0f);
   animation.AnimateTo(DevelControl::GetVisualProperty(dummyControl, DummyControl::Property::TEST_VISUAL, Visual::Property::MIX_COLOR), targetColor);
@@ -4883,10 +4970,6 @@ int UtcDaliVisualGetVisualProperty01(void)
   DALI_TEST_CHECK(borderlineOffsetValue);
   DALI_TEST_EQUALS(borderlineOffsetValue->Get<float>(), targetBorderlineOffset, TEST_LOCATION);
 
-  Property::Value* preMultAlphaValue = resultMap.Find(Visual::Property::PREMULTIPLIED_ALPHA, Property::BOOLEAN);
-  DALI_TEST_CHECK(preMultAlphaValue);
-  DALI_TEST_EQUALS(preMultAlphaValue->Get<bool>(), bool(targetPreMultipliedAlpha), TEST_LOCATION);
-
   // Test uniform values
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector3>("mixColor", targetColor), true, TEST_LOCATION);
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector2>("offset", targetOffset), true, TEST_LOCATION);
@@ -4896,7 +4979,6 @@ int UtcDaliVisualGetVisualProperty01(void)
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("borderlineWidth", targetBorderlineWidth), true, TEST_LOCATION);
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("borderlineColor", targetBorderlineColor), true, TEST_LOCATION);
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("borderlineOffset", targetBorderlineOffset), true, TEST_LOCATION);
-  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("preMultipliedAlpha", targetPreMultipliedAlpha), true, TEST_LOCATION);
 
   // Test unregistered visual
   Property property3 = DevelControl::GetVisualProperty(dummyControl, DummyControl::Property::TEST_VISUAL2, Visual::Property::MIX_COLOR);
@@ -5007,15 +5089,12 @@ int UtcDaliVisualGetVisualProperty02(void)
   DALI_TEST_CHECK(blurRadiusValue);
   DALI_TEST_EQUALS(blurRadiusValue->Get<float>(), targetBlurRadius, TEST_LOCATION);
 
-#ifdef OLD_GRAPHICS_TEST
-  // Currently test with multiple program doesn't work well. will fix another day
   // Test uniform values
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector3>("mixColor", targetColor), true, TEST_LOCATION);
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector2>("offset", targetOffset), true, TEST_LOCATION);
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector2>("size", targetSize), true, TEST_LOCATION);
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("cornerRadius", targetCornerRadius), true, TEST_LOCATION);
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("blurRadius", targetBlurRadius), true, TEST_LOCATION);
-#endif
 
   END_TEST;
 }
@@ -5097,14 +5176,11 @@ int UtcDaliVisualGetVisualProperty03(void)
   DALI_TEST_CHECK(borderlineOffsetValue);
   DALI_TEST_EQUALS(borderlineOffsetValue->Get<float>(), targetBorderlineOffset, TEST_LOCATION);
 
-#ifdef OLD_GRAPHICS_TEST
-  // Currently test with multiple program doesn't work well. will fix another day
   // Test uniform value
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("cornerRadius", targetCornerRadius), true, TEST_LOCATION);
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("borderlineWidth", targetBorderlineWidth), true, TEST_LOCATION);
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("borderlineColor", targetBorderlineColor), true, TEST_LOCATION);
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("borderlineOffset", targetBorderlineOffset), true, TEST_LOCATION);
-#endif
 
   END_TEST;
 }
@@ -5171,11 +5247,8 @@ int UtcDaliVisualGetVisualProperty04(void)
   DALI_TEST_CHECK(cornerRadiusValue);
   DALI_TEST_EQUALS(cornerRadiusValue->Get<Vector4>(), targetCornerRadius, TEST_LOCATION);
 
-#ifdef OLD_GRAPHICS_TEST
-  // Currently test with multiple program doesn't work well. will fix another day
   // Test uniform value
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("cornerRadius", targetCornerRadius), true, TEST_LOCATION);
-#endif
 
   END_TEST;
 }
@@ -5260,14 +5333,12 @@ int UtcDaliVisualGetVisualProperty05(void)
   DALI_TEST_CHECK(borderlineOffsetValue);
   DALI_TEST_EQUALS(borderlineOffsetValue->Get<float>(), targetBorderlineOffset, TEST_LOCATION);
 
-#ifdef OLD_GRAPHICS_TEST
   // Currently test with multiple program doesn't work well. will fix another day
   // Test uniform value
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("cornerRadius", targetCornerRadius), true, TEST_LOCATION);
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("borderlineWidth", targetBorderlineWidth), true, TEST_LOCATION);
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("borderlineColor", targetBorderlineColor), true, TEST_LOCATION);
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("borderlineOffset", targetBorderlineOffset), true, TEST_LOCATION);
-#endif
 
   END_TEST;
 }
@@ -5352,14 +5423,12 @@ int UtcDaliVisualGetVisualProperty06(void)
   DALI_TEST_CHECK(borderlineOffsetValue);
   DALI_TEST_EQUALS(borderlineOffsetValue->Get<float>(), targetBorderlineOffset, TEST_LOCATION);
 
-#ifdef OLD_GRAPHICS_TEST
   // Currently test with multiple program doesn't work well. will fix another day
   // Test uniform value
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("cornerRadius", targetCornerRadius), true, TEST_LOCATION);
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("borderlineWidth", targetBorderlineWidth), true, TEST_LOCATION);
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("borderlineColor", targetBorderlineColor), true, TEST_LOCATION);
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("borderlineOffset", targetBorderlineOffset), true, TEST_LOCATION);
-#endif
 
   END_TEST;
 }
@@ -5444,14 +5513,12 @@ int UtcDaliVisualGetVisualProperty07(void)
   DALI_TEST_CHECK(borderlineOffsetValue);
   DALI_TEST_EQUALS(borderlineOffsetValue->Get<float>(), targetBorderlineOffset, TEST_LOCATION);
 
-#ifdef OLD_GRAPHICS_TEST
   // Currently test with multiple program doesn't work well. will fix another day
   // Test uniform value
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("cornerRadius", targetCornerRadius), true, TEST_LOCATION);
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("borderlineWidth", targetBorderlineWidth), true, TEST_LOCATION);
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<Vector4>("borderlineColor", targetBorderlineColor), true, TEST_LOCATION);
   DALI_TEST_EQUALS(application.GetGlAbstraction().CheckUniformValue<float>("borderlineOffset", targetBorderlineOffset), true, TEST_LOCATION);
-#endif
 
   END_TEST;
 }
@@ -6122,21 +6189,21 @@ int UtcDaliVisualUpdatePropertyChangeShader03(void)
 int UtcDaliVisualUpdatePropertyChangeShader04(void)
 {
   ToolkitTestApplication application;
-  tet_infoline( "UtcDaliVisualUpdatePropertyChangeShader04: Test update property by DoAction during Animation. Change the shader case" );
+  tet_infoline("UtcDaliVisualUpdatePropertyChangeShader04: Test update property by DoAction during Animation. Change the shader case");
 
   TraceCallStack& callStack = application.GetGraphicsController().mCallStack;
 
   VisualFactory factory = VisualFactory::Get();
   Property::Map propertyMap;
   // Case ImageVisual
-  propertyMap[Visual::Property::TYPE] = Visual::Type::IMAGE;
-  propertyMap[ImageVisual::Property::URL] = TEST_IMAGE_FILE_NAME;
+  propertyMap[Visual::Property::TYPE]               = Visual::Type::IMAGE;
+  propertyMap[ImageVisual::Property::URL]           = TEST_IMAGE_FILE_NAME;
   propertyMap[DevelVisual::Property::CORNER_RADIUS] = 10.0f;
 
   Visual::Base imageVisual = factory.CreateVisual(propertyMap);
 
-  DummyControl dummyControl = DummyControl::New(true);
-  Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummyControl.GetImplementation());
+  DummyControl        dummyControl = DummyControl::New(true);
+  Impl::DummyControl& dummyImpl    = static_cast<Impl::DummyControl&>(dummyControl.GetImplementation());
   dummyImpl.RegisterVisual(DummyControl::Property::TEST_VISUAL, imageVisual);
   dummyControl[Actor::Property::SIZE] = Vector2(200.f, 200.f);
   application.GetScene().Add(dummyControl);
@@ -6152,24 +6219,24 @@ int UtcDaliVisualUpdatePropertyChangeShader04(void)
 
   // Get shader
   {
-    Renderer renderer = dummyControl.GetRendererAt( 0 );
-    Shader shader = renderer.GetShader();
-    Property::Value value = shader.GetProperty( Shader::Property::PROGRAM );
-    Property::Map* map = value.GetMap();
-    DALI_TEST_CHECK( map );
-
-    Property::Value* fragment = map->Find( "fragment" ); // fragment key name from shader-impl.cpp
-    DALI_TEST_CHECK( fragment );
+    Renderer        renderer = dummyControl.GetRendererAt(0);
+    Shader          shader   = renderer.GetShader();
+    Property::Value value    = shader.GetProperty(Shader::Property::PROGRAM);
+    Property::Map*  map      = value.GetMap();
+    DALI_TEST_CHECK(map);
+
+    Property::Value* fragment = map->Find("fragment"); // fragment key name from shader-impl.cpp
+    DALI_TEST_CHECK(fragment);
     std::string fragmentShader;
-    DALI_TEST_CHECK( fragment->Get(fragmentShader) );
-    DALI_TEST_CHECK( fragmentShader.find("#define IS_REQUIRED_BORDERLINE 1") == std::string::npos );
-    DALI_TEST_CHECK( fragmentShader.find("#define IS_REQUIRED_ROUNDED_CORNER 1") != std::string::npos );
-
-    Property::Value* vertex = map->Find( "vertex" ); // vertex key name from shader-impl.cpp
-    std::string vertexShader;
-    DALI_TEST_CHECK( vertex->Get(vertexShader) );
-    DALI_TEST_CHECK( vertexShader.find("#define IS_REQUIRED_BORDERLINE 1") == std::string::npos );
-    DALI_TEST_CHECK( vertexShader.find("#define IS_REQUIRED_ROUNDED_CORNER 1") != std::string::npos );
+    DALI_TEST_CHECK(fragment->Get(fragmentShader));
+    DALI_TEST_CHECK(fragmentShader.find("#define IS_REQUIRED_BORDERLINE 1") == std::string::npos);
+    DALI_TEST_CHECK(fragmentShader.find("#define IS_REQUIRED_ROUNDED_CORNER 1") != std::string::npos);
+
+    Property::Value* vertex = map->Find("vertex"); // vertex key name from shader-impl.cpp
+    std::string      vertexShader;
+    DALI_TEST_CHECK(vertex->Get(vertexShader));
+    DALI_TEST_CHECK(vertexShader.find("#define IS_REQUIRED_BORDERLINE 1") == std::string::npos);
+    DALI_TEST_CHECK(vertexShader.find("#define IS_REQUIRED_ROUNDED_CORNER 1") != std::string::npos);
   }
   callStack.Reset();
   callStack.Enable(true);
@@ -6186,30 +6253,30 @@ int UtcDaliVisualUpdatePropertyChangeShader04(void)
 
   // Get shader
   {
-    Renderer renderer = dummyControl.GetRendererAt( 0 );
-    Shader shader = renderer.GetShader();
-    Property::Value value = shader.GetProperty( Shader::Property::PROGRAM );
-    Property::Map* map = value.GetMap();
-    DALI_TEST_CHECK( map );
-
-    Property::Value* fragment = map->Find( "fragment" ); // fragment key name from shader-impl.cpp
-    DALI_TEST_CHECK( fragment );
+    Renderer        renderer = dummyControl.GetRendererAt(0);
+    Shader          shader   = renderer.GetShader();
+    Property::Value value    = shader.GetProperty(Shader::Property::PROGRAM);
+    Property::Map*  map      = value.GetMap();
+    DALI_TEST_CHECK(map);
+
+    Property::Value* fragment = map->Find("fragment"); // fragment key name from shader-impl.cpp
+    DALI_TEST_CHECK(fragment);
     std::string fragmentShader;
-    DALI_TEST_CHECK( fragment->Get(fragmentShader) );
-    DALI_TEST_CHECK( fragmentShader.find("#define IS_REQUIRED_BORDERLINE 1") == std::string::npos );
+    DALI_TEST_CHECK(fragment->Get(fragmentShader));
+    DALI_TEST_CHECK(fragmentShader.find("#define IS_REQUIRED_BORDERLINE 1") == std::string::npos);
     // Note : mAlwaysUsingCornerRadius is true.
-    DALI_TEST_CHECK( fragmentShader.find("#define IS_REQUIRED_ROUNDED_CORNER 1") != std::string::npos );
+    DALI_TEST_CHECK(fragmentShader.find("#define IS_REQUIRED_ROUNDED_CORNER 1") != std::string::npos);
 
-    Property::Value* vertex = map->Find( "vertex" ); // vertex key name from shader-impl.cpp
-    std::string vertexShader;
-    DALI_TEST_CHECK( vertex->Get(vertexShader) );
-    DALI_TEST_CHECK( vertexShader.find("#define IS_REQUIRED_BORDERLINE 1") == std::string::npos );
+    Property::Value* vertex = map->Find("vertex"); // vertex key name from shader-impl.cpp
+    std::string      vertexShader;
+    DALI_TEST_CHECK(vertex->Get(vertexShader));
+    DALI_TEST_CHECK(vertexShader.find("#define IS_REQUIRED_BORDERLINE 1") == std::string::npos);
     // Note : mAlwaysUsingCornerRadius is true.
-    DALI_TEST_CHECK( vertexShader.find("#define IS_REQUIRED_ROUNDED_CORNER 1") != std::string::npos );
+    DALI_TEST_CHECK(vertexShader.find("#define IS_REQUIRED_ROUNDED_CORNER 1") != std::string::npos);
   }
   callStack.Enable(false);
   // Shader not changed
-  DALI_TEST_CHECK( !callStack.FindMethod("CreateShader") );
+  DALI_TEST_CHECK(!callStack.FindMethod("CreateShader"));
   callStack.Reset();
   callStack.Enable(true);
 
@@ -6221,7 +6288,7 @@ int UtcDaliVisualUpdatePropertyChangeShader04(void)
   DevelControl::DoAction(dummyControl, DummyControl::Property::TEST_VISUAL, DevelVisual::Action::UPDATE_PROPERTY, targetPropertyMap);
 
   Property::Map resultMap;
-  imageVisual.CreatePropertyMap( resultMap );
+  imageVisual.CreatePropertyMap(resultMap);
 
   // Test property values: they should be updated
   Property::Value* cornerRadiusValue = resultMap.Find(DevelVisual::Property::CORNER_RADIUS, Property::VECTOR4);
@@ -6238,26 +6305,26 @@ int UtcDaliVisualUpdatePropertyChangeShader04(void)
 
   // Get shader
   {
-    Renderer renderer = dummyControl.GetRendererAt( 0 );
-    Shader shader = renderer.GetShader();
-    Property::Value value = shader.GetProperty( Shader::Property::PROGRAM );
-    Property::Map* map = value.GetMap();
-    DALI_TEST_CHECK( map );
-
-    Property::Value* fragment = map->Find( "fragment" ); // fragment key name from shader-impl.cpp
-    DALI_TEST_CHECK( fragment );
+    Renderer        renderer = dummyControl.GetRendererAt(0);
+    Shader          shader   = renderer.GetShader();
+    Property::Value value    = shader.GetProperty(Shader::Property::PROGRAM);
+    Property::Map*  map      = value.GetMap();
+    DALI_TEST_CHECK(map);
+
+    Property::Value* fragment = map->Find("fragment"); // fragment key name from shader-impl.cpp
+    DALI_TEST_CHECK(fragment);
     std::string fragmentShader;
-    DALI_TEST_CHECK( fragment->Get(fragmentShader) );
-    DALI_TEST_CHECK( fragmentShader.find("#define IS_REQUIRED_BORDERLINE 1") != std::string::npos );
+    DALI_TEST_CHECK(fragment->Get(fragmentShader));
+    DALI_TEST_CHECK(fragmentShader.find("#define IS_REQUIRED_BORDERLINE 1") != std::string::npos);
     // Note : mAlwaysUsingCornerRadius is true.
-    DALI_TEST_CHECK( fragmentShader.find("#define IS_REQUIRED_ROUNDED_CORNER 1") != std::string::npos );
+    DALI_TEST_CHECK(fragmentShader.find("#define IS_REQUIRED_ROUNDED_CORNER 1") != std::string::npos);
 
-    Property::Value* vertex = map->Find( "vertex" ); // vertex key name from shader-impl.cpp
-    std::string vertexShader;
-    DALI_TEST_CHECK( vertex->Get(vertexShader) );
-    DALI_TEST_CHECK( vertexShader.find("#define IS_REQUIRED_BORDERLINE 1") != std::string::npos );
+    Property::Value* vertex = map->Find("vertex"); // vertex key name from shader-impl.cpp
+    std::string      vertexShader;
+    DALI_TEST_CHECK(vertex->Get(vertexShader));
+    DALI_TEST_CHECK(vertexShader.find("#define IS_REQUIRED_BORDERLINE 1") != std::string::npos);
     // Note : mAlwaysUsingCornerRadius is true.
-    DALI_TEST_CHECK( vertexShader.find("#define IS_REQUIRED_ROUNDED_CORNER 1") != std::string::npos );
+    DALI_TEST_CHECK(vertexShader.find("#define IS_REQUIRED_ROUNDED_CORNER 1") != std::string::npos);
   }
 
   // Send shader compile signal
@@ -6266,7 +6333,7 @@ int UtcDaliVisualUpdatePropertyChangeShader04(void)
 
   callStack.Enable(false);
   // Shader changed
-  DALI_TEST_CHECK( callStack.FindMethod("CreateShader") );
+  DALI_TEST_CHECK(callStack.FindMethod("CreateShader"));
 
   END_TEST;
 }