[3.0] Remove/move experimental features
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-Image.cpp
index 1c1ba77..a686651 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 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.
@@ -78,21 +78,6 @@ int UtcDaliImageDownCast(void)
   END_TEST;
 }
 
-int UtcDaliImageGetReleasePolicy(void)
-{
-  TestApplication application;
-
-  tet_infoline("UtcDaliImageGetReleasePolicy");
-
-  Image image = ResourceImage::New(gTestImageFilename, ResourceImage::IMMEDIATE, Image::UNUSED);
-
-  DALI_TEST_CHECK( image );
-
-  DALI_TEST_CHECK( Image::UNUSED == image.GetReleasePolicy() );
-
-  END_TEST;
-}
-
 int UtcDaliImageGetWidthHeight(void)
 {
   TestApplication application;
@@ -162,10 +147,10 @@ int UtcDaliImageSignalUploaded(void)
 
   image.UploadedSignal().Connect( SignalUploadedHandler );
 
-  Dali::ImageActor imageActor = ImageActor::New(image);
-  Stage::GetCurrent().Add(imageActor);
-  imageActor.SetSize(80, 80);
-  imageActor.SetVisible(true);
+  Dali::Actor actor = CreateRenderableActor( image );
+  Stage::GetCurrent().Add( actor );
+  actor.SetSize(80, 80);
+  actor.SetVisible(true);
 
   application.SendNotification();
   application.Render(0);
@@ -190,6 +175,12 @@ int UtcDaliImageSignalUploaded(void)
   application.Render(16);
   application.SendNotification();
 
+  request = platform.GetRequest();
+  if(request)
+  {
+    platform.SetResourceLoaded(request->GetId(), request->GetType()->id, resource);
+  }
+
   //upload
   application.Render(16);
   application.SendNotification();
@@ -239,10 +230,10 @@ int UtcDaliImageDiscard02(void)
 
   {
     {
-      ImageActor actor;
+      Actor actor;
       {
         Image image = ResourceImage::New(gTestImageFilename, ImageDimensions( 40, 30 ) );
-        actor = ImageActor::New(image);
+        actor = CreateRenderableActor(image);
         Stage::GetCurrent().Add(actor);
 
         application.SendNotification();
@@ -289,7 +280,7 @@ int UtcDaliImageDiscard03(void)
   application.GetPlatform().SetClosestImageSize(closestImageSize);
 
   Image image = ResourceImage::New(gTestImageFilename);
-  ImageActor actor = ImageActor::New(image);
+  Actor actor = CreateRenderableActor(image);
   Stage::GetCurrent().Add(actor);
 
   application.SendNotification();
@@ -332,9 +323,9 @@ int UtcDaliImageContextLoss(void)
 
   platform.SetClosestImageSize(closestImageSize);
 
-  tet_infoline("UtcDaliImageContextLoss - Load image with LoadPolicy::Immediate, ReleasePolicy::Never, bitmap discard. Check that the image is re-requested on context regain\n");
+  tet_infoline("UtcDaliImageContextLoss - Load image with LoadPolicy::Immediate, bitmap discard. Check that the image is re-requested on context regain\n");
 
-  Image image = ResourceImage::New("image.png", ResourceImage::IMMEDIATE, Image::NEVER);
+  Image image = ResourceImage::New("image.png");
 
   DALI_TEST_CHECK( image );
 
@@ -344,7 +335,7 @@ int UtcDaliImageContextLoss(void)
   // request file loading immediately
 
   DALI_TEST_CHECK( platform.WasCalled(TestPlatformAbstraction::LoadResourceFunc) );
-  ImageActor actor = ImageActor::New(image);
+  Actor actor = CreateRenderableActor(image);
   Stage::GetCurrent().Add(actor);
 
   application.SendNotification();