Merge "Add some properties into web view" into devel/master
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-BubbleEmitter.cpp
index 3294f66..7fa50ed 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
@@ -99,7 +99,7 @@ int UtcDaliBubbleEmitterNew(void)
   DALI_TEST_CHECK( emitter );
 
   // Additional check to ensure object is created by checking if it's registered
-  ObjectRegistry registry = Stage::GetCurrent().GetObjectRegistry();
+  ObjectRegistry registry = application.GetCore().GetObjectRegistry();
   DALI_TEST_CHECK( registry );
   gObjectCreatedCallBackCalled = false;
   registry.ObjectCreatedSignal().Connect( &TestCallback );
@@ -193,6 +193,14 @@ int UtcDaliBubbleEmitterSetBubbleScale(void)
   ToolkitTestApplication application;
   tet_infoline( " UtcDaliBubbleEmitterSetBubbleScale " );
 
+  static std::vector<UniformData> customUniforms =
+  {
+    UniformData("uDynamicScale", Property::Type::FLOAT),
+  };
+
+  TestGraphicsController& graphics = application.GetGraphicsController();
+  graphics.AddCustomUniforms(customUniforms);
+
   Texture shapeImage = CreateSolidColorTexture( application, Color::GREEN, 5, 5 );
   BubbleEmitter emitter = BubbleEmitter::New( Vector2(50.f,50.f),shapeImage, 150, Vector2( 5.f, 10.f ));
   DALI_TEST_CHECK(emitter);
@@ -259,7 +267,7 @@ int UtcDaliBubbleEmitterSetBubbleDensity02(void)
   catch(Dali::DaliException& e)
   {
     DALI_TEST_PRINT_ASSERT( e );
-    DALI_TEST_ASSERT(e, "density>0 && density<=9", TEST_LOCATION );
+    DALI_TEST_ASSERT(e, "density > 0 && density <= 9", TEST_LOCATION );
   }
   END_TEST;
 }
@@ -313,9 +321,19 @@ int UtcDaliBubbleEmitterEmitBubble(void)
 
 int UtcDaliBubbleEmitterRestore(void)
 {
+#ifdef OLD_GRAPHICS_TEST
   ToolkitTestApplication application;
   tet_infoline( " UtcDaliBubbleEmitterRestore " );
 
+  static std::vector<UniformData> customUniforms =
+  {
+    UniformData("uPercentage[0]", Property::Type::FLOAT),
+    UniformData("uStartEndPosition[0]", Property::Type::VECTOR4),
+  };
+
+  TestGraphicsController& graphics = application.GetGraphicsController();
+  graphics.AddCustomUniforms(customUniforms);
+
   Vector2 movementArea(50.f,50.f);
   Texture shapeImage = CreateSolidColorTexture( application, Color::GREEN, 5, 5 );
   BubbleEmitter emitter = BubbleEmitter::New( movementArea,shapeImage, 90, Vector2( 5.f, 10.f ));
@@ -365,6 +383,9 @@ int UtcDaliBubbleEmitterRestore(void)
 
   DALI_TEST_CHECK( gl.GetUniformValue<Vector4>( "uStartEndPosition[0]", startEndPosValue ) );
   DALI_TEST_EQUALS( startEndPosValue,  Vector4::ZERO, TEST_LOCATION );
+#else
+  tet_result(TET_PASS);
+#endif
 
   END_TEST;
 }