Adding a TextSelectionToolbar Utc test
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-ImageView.cpp
index 5955748..709282a 100644 (file)
@@ -425,8 +425,10 @@ int UtcDaliImageViewAsyncLoadingWithAltasing(void)
 
   callStack.Enable(false);
 
-  DALI_TEST_CHECK(  callStack.FindMethodAndParams("TexSubImage2D", "0, 0, 34, 34" ) );
-
+  TraceCallStack::NamedParams params;
+  params["width"] = ToString(34);
+  params["height"] = ToString(34);
+  DALI_TEST_EQUALS( callStack.FindMethodAndParams( "TexSubImage2D", params ), true, TEST_LOCATION );
 
   END_TEST;
 }
@@ -440,9 +442,10 @@ int UtcDaliImageViewSyncLoading(void)
 
   // Sync loading, no atlasing for big size image
   {
-    ImageView imageView = ImageView::New( gImage_600_RGB );
+    ImageView imageView = ImageView::New();
 
     // Sync loading is used
+    syncLoadingMap[ "url" ] = gImage_600_RGB;
     imageView.SetProperty( ImageView::Property::IMAGE, syncLoadingMap );
 
     // BitmapLoader is used, and the loading is started immediately even the actor is not on stage.
@@ -475,9 +478,13 @@ int UtcDaliImageViewSyncLoading(void)
     Stage::GetCurrent().Add( imageView );
     application.SendNotification();
     application.Render(16);
-    DALI_TEST_CHECK(  callStack.FindMethodAndParams("TexSubImage2D", "0, 0, 34, 34" ) );
-  }
 
+    TraceCallStack::NamedParams params;
+    params["width"] = ToString(34);
+    params["height"] = ToString(34);
+    DALI_TEST_EQUALS( callStack.FindMethodAndParams( "TexSubImage2D", params ),
+                      true, TEST_LOCATION );
+  }
   END_TEST;
 }
 
@@ -987,7 +994,6 @@ int UtcDaliImageViewSetImageNativeImageWithCustomShader(void)
   customShader.Insert( "hints", shaderHints );
 
   Property::Map map;
-  map.Insert( "rendererType", "image" );
   map.Insert( "shader", customShader );
 
   TestNativeImagePointer nativeImageInterface = TestNativeImage::New( width, height );
@@ -997,8 +1003,6 @@ int UtcDaliImageViewSetImageNativeImageWithCustomShader(void)
   imageView.SetProperty( ImageView::Property::IMAGE, map );
   Stage::GetCurrent().Add( imageView );
 
-  imageView.SetProperty( ImageView::Property::IMAGE, map );
-
   TestGlAbstraction& gl = application.GetGlAbstraction();
   gl.EnableTextureCallTrace( true );
 
@@ -1039,7 +1043,6 @@ int UtcDaliImageViewSetImageBufferImageWithCustomShaderToNativeImage(void)
   customShader.Insert( "hints", shaderHints );
 
   Property::Map map;
-  map.Insert( "rendererType", "image" );
   map.Insert( "shader", customShader );
 
   BufferImage image = CreateBufferImage( width, height, Color::WHITE );
@@ -1048,8 +1051,6 @@ int UtcDaliImageViewSetImageBufferImageWithCustomShaderToNativeImage(void)
   imageView.SetProperty( ImageView::Property::IMAGE, map );
   Stage::GetCurrent().Add( imageView );
 
-  imageView.SetProperty( ImageView::Property::IMAGE, map );
-
   TestGlAbstraction& gl = application.GetGlAbstraction();
   gl.EnableTextureCallTrace( true );
 
@@ -1128,4 +1129,3 @@ int UtcDaliImageViewGetImageN(void)
 
   END_TEST;
 }
-