Merge remote-tracking branch 'origin/tizen' into devel/new_mesh
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-RenderTask.cpp
index 26115dd..792ade5 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <stdlib.h>
 #include <dali/public-api/dali-core.h>
+#include <dali/devel-api/events/hit-test-algorithm.h>
 #include <dali-test-suite-utils.h>
 #include <dali/integration-api/debug.h>
 #include <test-native-image.h>
@@ -38,6 +39,42 @@ void utc_dali_render_task_cleanup(void)
   test_return_value = TET_PASS;
 }
 
+/**
+ * APIs:
+ *
+ * Constructor, Destructor, DownCast, New, copy constructor, assignment operator
+ *
+ * SetSourceActor                      2+ve, 1-ve
+ * GetSourceActor                      1+ve, 1-ve
+ * SetExclusive                        2+ve, 0-ve
+ * IsExclusive                         2+ve, 0-ve
+ * SetInputEnabled                     1+ve, 0-ve
+ * GetInputEnabled                     1+ve, 0-ve
+ * SetCameraActor                      1+ve, 1-ve
+ * GetCameraActor                      1+ve, 1-ve
+ * SetTargetFrameBuffer                1+ve, 1-ve
+ * GetTargetFrameBuffer                1+ve, 1-ve
+ * SetScreenToFrameBufferFunction      1+ve, 1-ve
+ * GetScreenToFrameBufferFunction      1+ve, 1-ve
+ * SetScreenToFrameBufferMappingActor  1+ve, 1-ve
+ * GetScreenToFrameBufferMappingActor  1+ve, 1-ve
+ * SetViewportPosition                 1+ve
+ * GetCurrentViewportPosition          1+ve
+ * SetViewportSize                     1+ve
+ * GetCurrentViewportSize              1+ve
+ * SetViewport                         2+ve, 1-ve
+ * GetViewport                         2+ve, 1-ve
+ * SetClearColor                       1+ve, 1-ve
+ * GetClearColor                       1+ve, 1-ve
+ * SetClearEnabled                     1+ve, 1-ve
+ * GetClearEnabled                     1+ve, 1-ve
+ * SetCullMode
+ * GetCullMode
+ * SetRefreshRate                      Many
+ * GetRefreshRate                      1+ve
+ * FinishedSignal                      1+ve
+ */
+
 namespace // unnamed namespace
 {
 
@@ -193,7 +230,7 @@ RenderTask CreateRenderTask(TestApplication& application,
     frameBufferImage = FrameBufferImage::New( 10, 10 );
   }
 
-  // Don't draw output framebuffer
+  // Don't draw output framebuffer // '
 
   RenderTask newTask = taskList.CreateTask();
   newTask.SetCameraActor( offscreenCamera );
@@ -268,10 +305,10 @@ bool IsActorHittableFunction(Actor actor, Dali::HitTestAlgorithm::TraverseType t
     {
       // Check whether the actor is visible and not fully transparent.
       if( actor.IsVisible()
-       && actor.GetCurrentWorldColor().a > 0.01f) // not FULLY_TRANSPARENT
+          && actor.GetCurrentWorldColor().a > 0.01f) // not FULLY_TRANSPARENT
       {
 
-          hittable = true;
+        hittable = true;
       }
       break;
     }
@@ -301,7 +338,7 @@ bool IsActorHittableFunction(Actor actor, Dali::HitTestAlgorithm::TraverseType t
 /****************************************************************************************************/
 /****************************************************************************************************/
 
-int UtcDaliRenderTaskDownCast(void)
+int UtcDaliRenderTaskDownCast01(void)
 {
   TestApplication application;
 
@@ -320,11 +357,92 @@ int UtcDaliRenderTaskDownCast(void)
   END_TEST;
 }
 
-int UtcDaliRenderTaskSetSourceActor(void)
+int UtcDaliRenderTaskDownCast02(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::DownCast()");
+
+  Actor actor = Actor::New();
+
+  RenderTask task = RenderTask::DownCast( actor );
+  DALI_TEST_CHECK( ! task );
+
+  END_TEST;
+}
+
+int UtcDaliRenderTaskSetSourceActorN(void)
+{
+  TestApplication application;
+  tet_infoline("Testing RenderTask::SetSourceActor() Negative - try with empty actor handle");
+  Stage stage = Stage::GetCurrent();
+
+  Actor srcActor;
+
+  RenderTaskList taskList = stage.GetRenderTaskList();
+  RenderTask renderTask = taskList.CreateTask();
+  renderTask.SetSourceActor(srcActor);
+
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_CHECK( ! renderTask.GetSourceActor() );
+  END_TEST;
+}
+
+
+int UtcDaliRenderTaskSetSourceActorP01(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::SetSourceActor() Positive - check that setting a non-renderable actor stops existing source actor being rendered ");
+
+  Stage stage = Stage::GetCurrent();
+
+  const std::vector<GLuint>& boundTextures = application.GetGlAbstraction().GetBoundTextures( GL_TEXTURE0 );
+
+  RenderTaskList taskList = stage.GetRenderTaskList();
+
+  RenderTask task = taskList.GetTask( 0u );
+
+  Actor actor = task.GetSourceActor();
+  DALI_TEST_CHECK( actor );
+
+  std::vector<GLuint> ids;
+  ids.push_back( 7 );
+  application.GetGlAbstraction().SetNextTextureIds( ids );
+
+  BufferImage img = BufferImage::New( 1,1 );
+  ImageActor newActor = ImageActor::New( img );
+  newActor.SetSize(1,1);
+  stage.Add( newActor );
+
+  Actor nonRenderableActor = Actor::New();
+  stage.Add( nonRenderableActor );
+
+  // Stop the newActor from being rendered by changing the source actor
+  DALI_TEST_CHECK( nonRenderableActor );
+  task.SetSourceActor( nonRenderableActor );
+  DALI_TEST_CHECK( task.GetSourceActor() != actor );
+  DALI_TEST_CHECK( task.GetSourceActor() == nonRenderableActor );
+
+  // Update & Render nothing!
+  application.GetGlAbstraction().ClearBoundTextures();
+  application.SendNotification();
+  application.Render();
+
+  // Check that nothing was rendered
+  DALI_TEST_EQUALS( boundTextures.size(), 0u, TEST_LOCATION );
+
+  END_TEST;
+}
+
+
+int UtcDaliRenderTaskSetSourceActorP02(void)
 {
   TestApplication application;
 
-  tet_infoline("Testing RenderTask::SetSourceActor()");
+  tet_infoline("Testing RenderTask::SetSourceActor() Positive - check that switching source from a non-renderable to a renderable actor causes the texture to be drawn");
 
   Stage stage = Stage::GetCurrent();
 
@@ -341,7 +459,7 @@ int UtcDaliRenderTaskSetSourceActor(void)
   ids.push_back( 7 );
   application.GetGlAbstraction().SetNextTextureIds( ids );
 
-  BitmapImage img = BitmapImage::New( 1,1 );
+  BufferImage img = BufferImage::New( 1,1 );
   ImageActor newActor = ImageActor::New( img );
   newActor.SetSize(1,1);
   stage.Add( newActor );
@@ -404,11 +522,11 @@ int UtcDaliRenderTaskSetSourceActorOffStage(void)
   ids.push_back( expectedTextureId );
   application.GetGlAbstraction().SetNextTextureIds( ids );
 
-  BitmapImage img = BitmapImage::New( 1,1 );
+  BufferImage img = BufferImage::New( 1,1 );
   ImageActor newActor = ImageActor::New( img );
   newActor.SetSize(1,1);
   task.SetSourceActor( newActor );
-  // Don't add newActor to stage yet
+  // Don't add newActor to stage yet   //'
 
   // Update & Render with the actor initially off-stage
   application.GetGlAbstraction().ClearBoundTextures();
@@ -465,7 +583,7 @@ int UtcDaliRenderTaskSetSourceActorEmpty(void)
   ids.push_back( expectedTextureId );
   application.GetGlAbstraction().SetNextTextureIds( ids );
 
-  BitmapImage img = BitmapImage::New( 1,1 );
+  BufferImage img = BufferImage::New( 1,1 );
   ImageActor newActor = ImageActor::New( img );
   newActor.SetSize(1,1);
   stage.Add( newActor );
@@ -503,11 +621,11 @@ int UtcDaliRenderTaskSetSourceActorEmpty(void)
   END_TEST;
 }
 
-int UtcDaliRenderTaskGetSourceActor(void)
+int UtcDaliRenderTaskGetSourceActorP01(void)
 {
   TestApplication application;
 
-  tet_infoline("Testing RenderTask::GetSourceActor()");
+  tet_infoline("Testing RenderTask::GetSourceActor() Check the default render task has a valid source actor");
 
   RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
 
@@ -522,11 +640,48 @@ int UtcDaliRenderTaskGetSourceActor(void)
   END_TEST;
 }
 
+int UtcDaliRenderTaskGetSourceActorP02(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::GetSourceActor() Create a new render task, Add a new actor to the stage and set it as the source of the new render task. Get its source actor and check that it is equivalent to what was set.");
+
+  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTask task = taskList.CreateTask();
+  Actor actor = Actor::New();
+  Stage::GetCurrent().Add(actor);
+  task.SetSourceActor( actor );
+
+  DALI_TEST_EQUALS( actor, task.GetSourceActor(), TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliRenderTaskGetSourceActorN(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::GetSourceActor() Try with empty handle");
+
+  RenderTask task;
+  try
+  {
+    Actor actor = task.GetSourceActor();
+  }
+  catch (Dali::DaliException(e))
+  {
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_ASSERT(e, "RenderTask handle is empty", TEST_LOCATION);
+  }
+
+  END_TEST;
+}
+
 int UtcDaliRenderTaskSetExclusive(void)
 {
   TestApplication application;
 
-  tet_infoline("Testing RenderTask::SetExclusive()");
+  tet_infoline("Testing RenderTask::SetExclusive() Check that exclusion works");
 
   RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
 
@@ -538,7 +693,7 @@ int UtcDaliRenderTaskSetExclusive(void)
   ids.push_back( 10 ); // 10 = actor3
   application.GetGlAbstraction().SetNextTextureIds( ids );
 
-  BitmapImage img1 = BitmapImage::New( 1,1 );
+  BufferImage img1 = BufferImage::New( 1,1 );
   ImageActor actor1 = ImageActor::New( img1 );
   actor1.SetSize(1,1);
   Stage::GetCurrent().Add( actor1 );
@@ -556,7 +711,7 @@ int UtcDaliRenderTaskSetExclusive(void)
     DALI_TEST_EQUALS( boundTextures[0], 8u/*unique to actor1*/, TEST_LOCATION );
   }
 
-  BitmapImage img2 = BitmapImage::New( 1,1 );
+  BufferImage img2 = BufferImage::New( 1,1 );
   ImageActor actor2 = ImageActor::New( img2 );
   actor2.SetSize(1,1);
 
@@ -580,7 +735,7 @@ int UtcDaliRenderTaskSetExclusive(void)
     DALI_TEST_EQUALS( boundTextures[1], 8u/*unique to actor1*/, TEST_LOCATION );
   }
 
-  BitmapImage img3 = BitmapImage::New( 1,1 );
+  BufferImage img3 = BufferImage::New( 1,1 );
   ImageActor actor3 = ImageActor::New( img3 );
   actor3.SetSize(1,1);
 
@@ -659,11 +814,72 @@ int UtcDaliRenderTaskSetExclusive(void)
   END_TEST;
 }
 
-int UtcDaliRenderTaskIsExclusive(void)
+int UtcDaliRenderTaskSetExclusive02(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::SetExclusive() Check that changing from exclusive to not-exclusive works");
+
+  std::vector<GLuint> ids;
+  ids.push_back( 8 ); // 8 = actor1
+  application.GetGlAbstraction().SetNextTextureIds( ids );
+
+  BufferImage img1 = BufferImage::New( 1,1 );
+  ImageActor actor1 = ImageActor::New( img1 );
+  actor1.SetSize(1,1);
+  Stage::GetCurrent().Add( actor1 );
+
+  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTask task = taskList.CreateTask();
+
+  task.SetSourceActor( actor1 );
+  task.SetExclusive(true); // Actor should only render once
+
+  TestGlAbstraction& gl = application.GetGlAbstraction();
+  TraceCallStack& drawTrace = gl.GetDrawTrace();
+  drawTrace.Enable(true);
+
+  // Update & Render actor1
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( drawTrace.CountMethod("DrawArrays"), 1, TEST_LOCATION );
+
+  // Set task to non-exclusive - actor1 should render twice:
+  drawTrace.Reset();
+  task.SetExclusive(false);
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( drawTrace.CountMethod("DrawArrays"), 2, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliRenderTaskSetExclusiveN(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::SetExclusive() on empty handle");
+
+  RenderTask task;
+  try
+  {
+    task.SetExclusive(true);
+  }
+  catch (Dali::DaliException(e))
+  {
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_ASSERT(e, "RenderTask handle is empty", TEST_LOCATION);
+  }
+  END_TEST;
+}
+
+int UtcDaliRenderTaskIsExclusive01(void)
 {
   TestApplication application;
 
-  tet_infoline("Testing RenderTask::IsExclusive()");
+  tet_infoline("Testing RenderTask::IsExclusive() Check default values are non-exclusive");
 
   RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
 
@@ -673,6 +889,44 @@ int UtcDaliRenderTaskIsExclusive(void)
 
   RenderTask newTask = taskList.CreateTask();
   DALI_TEST_CHECK( false == newTask.IsExclusive() );
+
+  END_TEST;
+}
+
+int UtcDaliRenderTaskIsExclusive02(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::IsExclusive() Check the getter returns set values");
+
+  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+
+  // Not exclusive is the default
+  RenderTask newTask = taskList.CreateTask();
+  DALI_TEST_EQUALS( newTask.IsExclusive(), false, TEST_LOCATION );
+
+  newTask.SetExclusive(true);
+  DALI_TEST_EQUALS( newTask.IsExclusive(), true, TEST_LOCATION );
+  END_TEST;
+}
+
+int UtcDaliRenderTaskIsExclusiveN(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::IsExclusive() on empty handle");
+
+  RenderTask task;
+  try
+  {
+    bool x = task.IsExclusive();
+    x=x;
+  }
+  catch (Dali::DaliException(e))
+  {
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_ASSERT(e, "RenderTask handle is empty", TEST_LOCATION);
+  }
   END_TEST;
 }
 
@@ -706,14 +960,18 @@ int UtcDaliRenderTaskGetInputEnabled(void)
 
   // Input is enabled by default
   RenderTask task = taskList.GetTask( 0u );
-  DALI_TEST_CHECK( true == task.GetInputEnabled() );
+  DALI_TEST_EQUALS( true, task.GetInputEnabled(), TEST_LOCATION );
 
   RenderTask newTask = taskList.CreateTask();
-  DALI_TEST_CHECK( true == newTask.GetInputEnabled() );
+  DALI_TEST_EQUALS( true, newTask.GetInputEnabled(), TEST_LOCATION );
+
+  newTask.SetInputEnabled(false);
+  DALI_TEST_EQUALS( false, newTask.GetInputEnabled(), TEST_LOCATION );
+
   END_TEST;
 }
 
-int UtcDaliRenderTaskSetCameraActor(void)
+int UtcDaliRenderTaskSetCameraActorP(void)
 {
   TestApplication application;
 
@@ -723,19 +981,42 @@ int UtcDaliRenderTaskSetCameraActor(void)
 
   RenderTask task = taskList.GetTask( 0u );
 
+  Actor defaultCameraActor = task.GetCameraActor();
+  DALI_TEST_CHECK( defaultCameraActor );
+
+  CameraActor newCameraActor = CameraActor::New();
+  DALI_TEST_CHECK( newCameraActor );
+
+  task.SetCameraActor( newCameraActor );
+  DALI_TEST_CHECK( task.GetCameraActor() != defaultCameraActor );
+  DALI_TEST_EQUALS( task.GetCameraActor(), newCameraActor, TEST_LOCATION );
+  END_TEST;
+}
+
+
+int UtcDaliRenderTaskSetCameraActorN(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::SetCameraActor() with empty actor handle");
+
+  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+
+  RenderTask task = taskList.GetTask( 0u );
+
   Actor actor = task.GetCameraActor();
   DALI_TEST_CHECK( actor );
 
-  CameraActor newActor = CameraActor::New();
-  DALI_TEST_CHECK( newActor );
+  CameraActor cameraActor;
 
-  task.SetCameraActor( newActor );
-  DALI_TEST_CHECK( task.GetCameraActor() != actor );
-  DALI_TEST_CHECK( task.GetCameraActor() == newActor );
+  task.SetCameraActor( cameraActor );
+  DALI_TEST_EQUALS( (bool)task.GetCameraActor(), false, TEST_LOCATION );
+  DALI_TEST_EQUALS( task.GetCameraActor(), cameraActor, TEST_LOCATION );
   END_TEST;
 }
 
-int UtcDaliRenderTaskGetCameraActor(void)
+
+int UtcDaliRenderTaskGetCameraActorP(void)
 {
   TestApplication application;
 
@@ -745,15 +1026,34 @@ int UtcDaliRenderTaskGetCameraActor(void)
 
   RenderTask task = taskList.GetTask( 0u );
 
-  Actor actor = task.GetCameraActor();
+  CameraActor actor = task.GetCameraActor();
   DALI_TEST_CHECK( actor );
+  DALI_TEST_EQUALS( actor.GetProjectionMode(), Dali::Camera::PERSPECTIVE_PROJECTION, TEST_LOCATION );
+  DALI_TEST_GREATER( actor.GetFieldOfView(), 0.0f, TEST_LOCATION );
+  END_TEST;
+}
+
+int UtcDaliRenderTaskGetCameraActorN(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::GetCameraActor() with empty handle");
+  RenderTask task;
+
+  try
+  {
+    Actor actor = task.GetCameraActor();
+  }
+  catch (Dali::DaliException(e))
+  {
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_ASSERT(e, "RenderTask handle is empty", TEST_LOCATION);
+  }
 
-  RenderTask newTask = taskList.CreateTask();
-  DALI_TEST_CHECK( actor == newTask.GetCameraActor() );
   END_TEST;
 }
 
-int UtcDaliRenderTaskSetTargetFrameBuffer(void)
+int UtcDaliRenderTaskSetTargetFrameBufferP(void)
 {
   TestApplication application;
 
@@ -763,18 +1063,43 @@ int UtcDaliRenderTaskSetTargetFrameBuffer(void)
 
   RenderTask task = taskList.GetTask( 0u );
 
-  // By default render-tasks do not render off-screen
-  FrameBufferImage image = task.GetTargetFrameBuffer();
-  DALI_TEST_CHECK( !image );
-
   FrameBufferImage newImage = FrameBufferImage::New();
-
   task.SetTargetFrameBuffer( newImage );
   DALI_TEST_CHECK( task.GetTargetFrameBuffer() == newImage );
   END_TEST;
 }
 
-int UtcDaliRenderTaskGetTargetFrameBuffer(void)
+int UtcDaliRenderTaskSetTargetFrameBufferN(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::SetTargetFrameBuffer()");
+
+  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+
+  RenderTask task = taskList.GetTask( 0u );
+  FrameBufferImage newImage; // Empty handle
+  task.SetTargetFrameBuffer( newImage );
+  DALI_TEST_EQUALS( (bool)task.GetTargetFrameBuffer(), false, TEST_LOCATION );
+  END_TEST;
+}
+
+int UtcDaliRenderTaskGetTargetFrameBufferP(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::GetTargetFrameBuffer()");
+
+  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+
+  RenderTask newTask = taskList.CreateTask();
+  FrameBufferImage fb = FrameBufferImage::New(128, 128, Pixel::RGBA8888);
+  newTask.SetTargetFrameBuffer( fb );
+  DALI_TEST_EQUALS( newTask.GetTargetFrameBuffer(), fb, TEST_LOCATION );
+  END_TEST;
+}
+
+int UtcDaliRenderTaskGetTargetFrameBufferN(void)
 {
   TestApplication application;
 
@@ -788,12 +1113,10 @@ int UtcDaliRenderTaskGetTargetFrameBuffer(void)
   FrameBufferImage image = task.GetTargetFrameBuffer();
   DALI_TEST_CHECK( !image );
 
-  RenderTask newTask = taskList.CreateTask();
-  DALI_TEST_CHECK( !newTask.GetTargetFrameBuffer() );
   END_TEST;
 }
 
-int UtcDaliRenderTaskSetScreenToFrameBufferFunction(void)
+int UtcDaliRenderTaskSetScreenToFrameBufferFunctionP(void)
 {
   TestApplication application;
 
@@ -822,7 +1145,26 @@ int UtcDaliRenderTaskSetScreenToFrameBufferFunction(void)
   END_TEST;
 }
 
-int UtcDaliRenderTaskGetScreenToFrameBufferFunction(void)
+int UtcDaliRenderTaskSetScreenToFrameBufferFunctionN(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::SetScreenToFrameBufferFunction()");
+
+  RenderTask task; // Empty handle
+  try
+  {
+    task.SetScreenToFrameBufferFunction( TestScreenToFrameBufferFunction );
+  }
+  catch (Dali::DaliException(e))
+  {
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_ASSERT(e, "RenderTask handle is empty", TEST_LOCATION);
+  }
+  END_TEST;
+}
+
+int UtcDaliRenderTaskGetScreenToFrameBufferFunctionP(void)
 {
   TestApplication application;
 
@@ -841,8 +1183,28 @@ int UtcDaliRenderTaskGetScreenToFrameBufferFunction(void)
   END_TEST;
 }
 
+int UtcDaliRenderTaskGetScreenToFrameBufferFunctionN(void)
+{
+  TestApplication application;
 
-int UtcDaliRenderTaskGetScreenToFrameBufferMappingActor(void)
+  tet_infoline("Testing RenderTask::GetScreenToFrameBufferFunction() on empty handle");
+
+  RenderTask task;
+  try
+  {
+    RenderTask::ScreenToFrameBufferFunction func = task.GetScreenToFrameBufferFunction();
+    func=func;
+  }
+  catch (Dali::DaliException(e))
+  {
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_ASSERT(e, "RenderTask handle is empty", TEST_LOCATION);
+  }
+  END_TEST;
+}
+
+
+int UtcDaliRenderTaskGetScreenToFrameBufferMappingActorP(void)
 {
   TestApplication application;
   tet_infoline("Testing RenderTask::GetScreenToFrameBufferMappingActor ");
@@ -852,28 +1214,109 @@ int UtcDaliRenderTaskGetScreenToFrameBufferMappingActor(void)
   Actor mappingActor = Actor::New();
   renderTask.SetScreenToFrameBufferMappingActor(mappingActor);
 
-  DALI_TEST_CHECK( mappingActor == renderTask.GetScreenToFrameBufferMappingActor() );
+  DALI_TEST_EQUALS( mappingActor, renderTask.GetScreenToFrameBufferMappingActor(), TEST_LOCATION );
   END_TEST;
 }
 
-int UtcDaliRenderTaskSetViewport(void)
+
+int UtcDaliRenderTaskGetScreenToFrameBufferMappingActorN(void)
 {
   TestApplication application;
+  tet_infoline("Testing RenderTask::GetScreenToFrameBufferMappingActor with empty task handle");
 
-  tet_infoline("Testing RenderTask::SetViewport()");
+  RenderTask task;
+  try
+  {
+    Actor mappingActor;
+    task.SetScreenToFrameBufferMappingActor(mappingActor);
+  }
+  catch (Dali::DaliException(e))
+  {
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_ASSERT(e, "RenderTask handle is empty", TEST_LOCATION);
+  }
+  END_TEST;
+}
+
+int UtcDaliRenderTaskGetScreenToFrameBufferMappingActor02N(void)
+{
+  TestApplication application;
+  tet_infoline("Testing RenderTask::GetScreenToFrameBufferMappingActor with empty task handle");
 
   RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTask renderTask = taskList.CreateTask();
+  Actor actor;
+  renderTask.SetScreenToFrameBufferMappingActor(actor);
 
-  RenderTask task = taskList.GetTask( 0u );
+  DALI_TEST_EQUALS( (bool)renderTask.GetScreenToFrameBufferMappingActor(), false, TEST_LOCATION);
+  END_TEST;
+}
+
+int UtcDaliRenderTaskGetViewportP01(void)
+{
+  TestApplication application;
 
+  tet_infoline("Testing RenderTask::GetViewport() on default task");
+
+  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTask task = taskList.GetTask( 0u );
   Viewport viewport = task.GetViewport();
 
   // By default the viewport should match the stage width/height
+  Vector2 stageSize = Stage::GetCurrent().GetSize();
+  Viewport expectedViewport( 0, 0, stageSize.width, stageSize.height );
+  DALI_TEST_CHECK( viewport == expectedViewport );
+  END_TEST;
+}
+
+int UtcDaliRenderTaskGetViewportP02(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::GetViewport() on new task");
+
+  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTask task = taskList.CreateTask();
+  Viewport viewport = task.GetViewport();
 
+  // By default the viewport should match the stage width/height
   Vector2 stageSize = Stage::GetCurrent().GetSize();
   Viewport expectedViewport( 0, 0, stageSize.width, stageSize.height );
   DALI_TEST_CHECK( viewport == expectedViewport );
+  END_TEST;
+}
+
+int UtcDaliRenderTaskGetViewportN(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::GetViewport() on empty handle");
+
+  RenderTask task;
+  try
+  {
+    Viewport viewport = task.GetViewport();
+    viewport = viewport;
+  }
+  catch (Dali::DaliException(e))
+  {
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_ASSERT(e, "RenderTask handle is empty", TEST_LOCATION);
+  }
+  END_TEST;
+}
 
+
+int UtcDaliRenderTaskSetViewportP(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::SetViewport()");
+
+  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+
+  RenderTask task = taskList.GetTask( 0u );
+  Vector2 stageSize = Stage::GetCurrent().GetSize();
   Viewport newViewport( 0, 0, stageSize.width * 0.5f, stageSize.height * 0.5f );
   task.SetViewport( newViewport );
 
@@ -885,29 +1328,31 @@ int UtcDaliRenderTaskSetViewport(void)
   END_TEST;
 }
 
-int UtcDaliRenderTaskGetViewport(void)
+int UtcDaliRenderTaskSetViewportN(void)
 {
   TestApplication application;
 
-  tet_infoline("Testing RenderTask::GetViewport()");
+  tet_infoline("Testing RenderTask::SetViewport()");
 
   RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
 
-  RenderTask task = taskList.GetTask( 0u );
-
-  Viewport viewport = task.GetViewport();
-
-  // By default the viewport should match the stage width/height
-
-  Vector2 stageSize = Stage::GetCurrent().GetSize();
-  Viewport expectedViewport( 0, 0, stageSize.width, stageSize.height );
-  DALI_TEST_CHECK( viewport == expectedViewport );
+  RenderTask task;
+  try
+  {
+    Vector2 stageSize = Stage::GetCurrent().GetSize();
+    Viewport newViewport( 0, 0, stageSize.width * 0.5f, stageSize.height * 0.5f );
+    task.SetViewport( newViewport );
+  }
+  catch (Dali::DaliException(e))
+  {
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_ASSERT(e, "RenderTask handle is empty", TEST_LOCATION);
+  }
 
-  RenderTask newTask = taskList.CreateTask();
-  DALI_TEST_CHECK( newTask.GetViewport() == expectedViewport );
   END_TEST;
 }
 
+
 int UtcDaliRenderTaskSetViewportPosition(void)
 {
   TestApplication application;
@@ -938,7 +1383,7 @@ int UtcDaliRenderTaskSetViewportPosition(void)
 
   // Set by Property test
   Vector2 newPosition2(32.0f, 32.0f);
-  task.SetProperty( RenderTask::VIEWPORT_POSITION, newPosition2 );
+  task.SetProperty( RenderTask::Property::VIEWPORT_POSITION, newPosition2 );
 
   // Update
   application.SendNotification();
@@ -948,7 +1393,7 @@ int UtcDaliRenderTaskSetViewportPosition(void)
 
   Vector2 newPosition3(64.0f, 0.0f);
   Animation animation = Animation::New(1.0f);
-  animation.AnimateTo( Property( task, RenderTask::VIEWPORT_POSITION ), newPosition3, AlphaFunctions::Linear );
+  animation.AnimateTo( Property( task, RenderTask::Property::VIEWPORT_POSITION ), newPosition3, AlphaFunction::LINEAR );
   animation.Play();
 
   // Perform 1000ms worth of updates at which point animation should have completed.
@@ -986,7 +1431,7 @@ int UtcDaliRenderTaskSetViewportSize(void)
 
   // Set by Property test
   Vector2 newSize2(50.0f, 50.0f);
-  task.SetProperty( RenderTask::VIEWPORT_SIZE, newSize2 );
+  task.SetProperty( RenderTask::Property::VIEWPORT_SIZE, newSize2 );
 
   // Update
   application.SendNotification();
@@ -996,7 +1441,7 @@ int UtcDaliRenderTaskSetViewportSize(void)
 
   Vector2 newSize3(10.0f, 10.0f);
   Animation animation = Animation::New(1.0f);
-  animation.AnimateTo( Property( task, RenderTask::VIEWPORT_SIZE ), newSize3, AlphaFunctions::Linear );
+  animation.AnimateTo( Property( task, RenderTask::Property::VIEWPORT_SIZE ), newSize3, AlphaFunction::LINEAR );
   animation.Play();
 
   // Perform 1000ms worth of updates at which point animation should have completed.
@@ -1006,7 +1451,7 @@ int UtcDaliRenderTaskSetViewportSize(void)
   END_TEST;
 }
 
-int UtcDaliRenderTaskSetClearColor(void)
+int UtcDaliRenderTaskSetClearColorP(void)
 {
   TestApplication application;
 
@@ -1027,7 +1472,7 @@ int UtcDaliRenderTaskSetClearColor(void)
 
   DALI_TEST_EQUALS( task.GetClearColor(), testColor, TEST_LOCATION );
 
-  task.SetProperty( RenderTask::CLEAR_COLOR, testColor2 );
+  task.SetProperty( RenderTask::Property::CLEAR_COLOR, testColor2 );
 
   // Wait a frame.
   Wait(application);
@@ -1036,7 +1481,26 @@ int UtcDaliRenderTaskSetClearColor(void)
   END_TEST;
 }
 
-int UtcDaliRenderTaskGetClearColor(void)
+int UtcDaliRenderTaskSetClearColorN(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::SetClearColor() on empty handle");
+
+  RenderTask task;
+  try
+  {
+    task.SetClearColor( Vector4::ZERO );
+  }
+  catch (Dali::DaliException(e))
+  {
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_ASSERT(e, "RenderTask handle is empty", TEST_LOCATION);
+  }
+  END_TEST;
+}
+
+int UtcDaliRenderTaskGetClearColorP(void)
 {
   TestApplication application;
 
@@ -1048,7 +1512,27 @@ int UtcDaliRenderTaskGetClearColor(void)
   END_TEST;
 }
 
-int UtcDaliRenderTaskSetClearEnabled(void)
+int UtcDaliRenderTaskGetClearColorN(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::GetClearColor()");
+
+  RenderTask task;
+  try
+  {
+    Vector4 color = task.GetClearColor();
+    color = color;
+  }
+  catch (Dali::DaliException(e))
+  {
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_ASSERT(e, "RenderTask handle is empty", TEST_LOCATION);
+  }
+  END_TEST;
+}
+
+int UtcDaliRenderTaskSetClearEnabledP(void)
 {
   TestApplication application;
 
@@ -1067,7 +1551,26 @@ int UtcDaliRenderTaskSetClearEnabled(void)
   END_TEST;
 }
 
-int UtcDaliRenderTaskGetClearEnabled(void)
+int UtcDaliRenderTaskSetClearEnabledN(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::SetClearEnabled() with empty handle");
+
+  RenderTask task;
+  try
+  {
+    task.SetClearEnabled(true);
+  }
+  catch (Dali::DaliException(e))
+  {
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_ASSERT(e, "RenderTask handle is empty", TEST_LOCATION);
+  }
+  END_TEST;
+}
+
+int UtcDaliRenderTaskGetClearEnabledP(void)
 {
   TestApplication application;
 
@@ -1080,6 +1583,96 @@ int UtcDaliRenderTaskGetClearEnabled(void)
   END_TEST;
 }
 
+
+int UtcDaliRenderTaskGetClearEnabledN(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::GetClearEnabled() with empty handle");
+
+  RenderTask task;
+  try
+  {
+    bool x = task.GetClearEnabled();
+    x=x;
+  }
+  catch (Dali::DaliException(e))
+  {
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_ASSERT(e, "RenderTask handle is empty", TEST_LOCATION);
+  }
+  END_TEST;
+}
+
+int UtcDaliRenderTaskSetCullModeP(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::SetCullMode()");
+
+  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTask task = taskList.GetTask( 0u );
+  DALI_TEST_EQUALS( task.GetCullMode(), true, TEST_LOCATION );
+
+  task.SetCullMode( false );
+
+  DALI_TEST_EQUALS( task.GetCullMode(), false, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliRenderTaskSetCullModeN(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::SetCullMode() on empty handle");
+
+  RenderTask task;
+  try
+  {
+    task.SetCullMode( false );
+  }
+  catch (Dali::DaliException(e))
+  {
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_ASSERT(e, "RenderTask handle is empty", TEST_LOCATION);
+  }
+  END_TEST;
+}
+
+int UtcDaliRenderTaskGetCullModeP(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::GetCullMode()");
+
+  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTask task = taskList.GetTask( 0u );
+  DALI_TEST_EQUALS( task.GetCullMode(), true, TEST_LOCATION );
+  END_TEST;
+}
+
+int UtcDaliRenderTaskGetCullModeN(void)
+{
+  TestApplication application;
+
+  tet_infoline("Testing RenderTask::GetCullMode() with empty handle");
+
+  RenderTask task;
+  try
+  {
+    bool x = task.GetCullMode();
+    x=x;
+  }
+  catch (Dali::DaliException(e))
+  {
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_ASSERT(e, "RenderTask handle is empty", TEST_LOCATION);
+  }
+  END_TEST;
+}
+
+
 int UtcDaliRenderTaskSetRefreshRate(void)
 {
   TestApplication application;
@@ -1130,7 +1723,7 @@ int UtcDaliRenderTaskSignalFinished(void)
 
   Stage::GetCurrent().Add( offscreenCameraActor );
 
-  BitmapImage image = BitmapImage::New( 10, 10 );
+  BufferImage image = BufferImage::New( 10, 10 );
   ImageActor rootActor = ImageActor::New( image );
   rootActor.SetSize( 10, 10 );
   Stage::GetCurrent().Add( rootActor );
@@ -1230,17 +1823,14 @@ int UtcDaliRenderTaskContinuous01(void)
   application.SendNotification();
 
   // START PROCESS/RENDER                     Input,    Expected  Input, Expected, KeepUpdating
-  DALI_TEST_CHECK( UpdateRender(application,  drawTrace, false,   finished, false, true ) );
-  application.GetPlatform().ClearReadyResources();
-
   DALI_TEST_CHECK( UpdateRender(application,  drawTrace, false,   finished, false, false ) );
+  application.GetPlatform().ClearReadyResources();
 
   // ADD SOURCE ACTOR TO STAGE - expect continuous renders to start, no finished signal
   Stage::GetCurrent().Add(secondRootActor);
   application.SendNotification();
 
   // CONTINUE PROCESS/RENDER                  Input,    Expected  Input,    Expected
-  DALI_TEST_CHECK( UpdateRender(application,  drawTrace, true,    finished, false, true ) );
   DALI_TEST_CHECK( UpdateRender(application,  drawTrace, true,    finished, false, false ) );
   END_TEST;
 }
@@ -1277,17 +1867,15 @@ int UtcDaliRenderTaskContinuous02(void)
   CompleteImageLoad(application, imageRequestId, imageType); // Need to run update again for this to complete
   application.SendNotification();
 
-  // START PROCESS/RENDER                    Input,    Expected  Input,    Expected
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, false,   finished, false, true ) );
-  application.GetPlatform().ClearReadyResources();
+  // START PROCESS/RENDER                    Input,    Expected  Input,    Expected, KeepUpdating
   DALI_TEST_CHECK( UpdateRender(application, drawTrace, false,   finished, false, false ) );
+  application.GetPlatform().ClearReadyResources();
 
   // MAKE SOURCE ACTOR VISIBLE - expect continuous renders to start, no finished signal
   secondRootActor.SetVisible(true);
   application.SendNotification();
 
   // CONTINUE PROCESS/RENDER                 Input,    Expected  Input,    Expected
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, true ) );
   DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, false ) );
   END_TEST;
 }
@@ -1321,16 +1909,14 @@ int UtcDaliRenderTaskContinuous03(void)
   application.SendNotification();
 
   // START PROCESS/RENDER                    Input,    Expected  Input,    Expected
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, false,   finished, false, true ) );
-  application.GetPlatform().ClearReadyResources();
   DALI_TEST_CHECK( UpdateRender(application, drawTrace, false,   finished, false, false ) );
+  application.GetPlatform().ClearReadyResources();
 
   // ADD CAMERA ACTOR TO STAGE - expect continuous renders to start, no finished signal
   Stage::GetCurrent().Add( offscreenCameraActor );
   application.SendNotification();
 
   // CONTINUE PROCESS/RENDER                 Input,    Expected  Input,    Expected
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, true ) );
   DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, false ) );
   END_TEST;
 }
@@ -1537,8 +2123,17 @@ int UtcDaliRenderTaskOnce03(void)
   application.GetPlatform().ClearReadyResources();
 
   sync.SetObjectSynced( lastSyncObj, true );
+
+  // Expect: No draw - we've just drawn our render task once, above. No finished signal -
+  // we won't read the gl sync until the next frame. Continue rendering - we're waiting for
+  // the sync
   DALI_TEST_CHECK( UpdateRender(application, drawTrace, false,   finished, false, true  ) );
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, false,   finished, true, false  ) );
+
+  // Expect: 1 final draw - this Update doesn't update the scene, hence render instructions
+  // from last frame but 1 are still present.
+  // Finished signal should be true - we've just done the sync.
+  // Should now stop rendering and updating - nothing left to do.
+  DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,   finished, true, false  ) );
 
   END_TEST;
 }
@@ -1655,7 +2250,6 @@ int UtcDaliRenderTaskOnce05(void)
   application.SendNotification();
 
   // START PROCESS/RENDER                    Input,    Expected  Input,    Expected
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, true ) );
   DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, false ) );
 
   // CHANGE TO RENDER ONCE,
@@ -1725,12 +2319,10 @@ int UtcDaliRenderTaskOnce06(void)
 
   application.SendNotification();
 
-  // Expect 2 frames to be drawn.
   // START PROCESS/RENDER                    Input,    Expected  Input,    Expected
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, true ) );
+  DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, false ) );
   Integration::GlSyncAbstraction::SyncObject* lastSyncObj = sync.GetLastSyncObject();
   DALI_TEST_CHECK( lastSyncObj == NULL );
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, false ) );
 
   // CHANGE TO RENDER ONCE,
   newTask.SetRefreshRate(RenderTask::REFRESH_ONCE);
@@ -1800,7 +2392,6 @@ int UtcDaliRenderTaskOnce07(void)
   application.SendNotification();
 
   // START PROCESS/RENDER                    Input,    Expected  Input,    Expected
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, true ) );
   DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, false ) );
 
   // CHANGE TO RENDER ONCE,
@@ -1872,6 +2463,7 @@ int UtcDaliRenderTaskOnce08(void)
   tet_printf("  FailImageLoad\n");
 
   FailImageLoad(application, imageRequestId); // Need to run Update again for this to complete
+
   DALI_TEST_CHECK( UpdateRender(application, drawTrace, false,   finished, false, true ) ); // nothing to draw
   application.SendNotification();
 
@@ -1879,8 +2471,11 @@ int UtcDaliRenderTaskOnce08(void)
   Integration::GlSyncAbstraction::SyncObject* lastSyncObj = sync.GetLastSyncObject();
   DALI_TEST_CHECK( lastSyncObj != NULL );
 
+  sync.SetObjectSynced( lastSyncObj, true );
+
   // Expect finished signal, as all resources are complete
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,   finished, true, false ) );
+  DALI_TEST_CHECK( UpdateRender(application, drawTrace, false,   finished, false, true ) );
+  DALI_TEST_CHECK( UpdateRender(application, drawTrace, false,   finished, true, false  ) );
 
   END_TEST;
 }
@@ -2123,7 +2718,6 @@ int UtcDaliRenderTaskOnceNoSync05(void)
   application.SendNotification();
 
   // START PROCESS/RENDER                    Input,    Expected  Input,    Expected
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, true ) );
   DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, false ) );
 
   // CHANGE TO RENDER ONCE,
@@ -2180,7 +2774,6 @@ int UtcDaliRenderTaskOnceNoSync06(void)
   application.SendNotification();
 
   // START PROCESS/RENDER                    Input,    Expected  Input,    Expected
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, true ) );
   DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, false ) );
 
   // CHANGE TO RENDER ONCE,
@@ -2237,7 +2830,6 @@ int UtcDaliRenderTaskOnceNoSync07(void)
   application.SendNotification();
 
   // START PROCESS/RENDER                    Input,    Expected  Input,    Expected
-  DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, true ) );
   DALI_TEST_CHECK( UpdateRender(application, drawTrace, true,    finished, false, false ) );
 
   // CHANGE TO RENDER ONCE,
@@ -2370,8 +2962,8 @@ int UtcDaliRenderTaskProperties(void)
 
   Property::IndexContainer indices;
   task.GetPropertyIndices( indices );
-  DALI_TEST_CHECK( ! indices.empty() );
-  DALI_TEST_EQUALS( indices.size(), task.GetPropertyCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( indices.Size() );
+  DALI_TEST_EQUALS( indices.Size(), task.GetPropertyCount(), TEST_LOCATION );
   END_TEST;
 }
 
@@ -2460,7 +3052,7 @@ int UtcDaliRenderTaskFinishInvisibleSourceActor(void)
 
   Stage::GetCurrent().Add( offscreenCameraActor );
 
-  BitmapImage image = BitmapImage::New( 10, 10 );
+  BufferImage image = BufferImage::New( 10, 10 );
   ImageActor rootActor = ImageActor::New( image );
   rootActor.SetSize( 10, 10 );
   rootActor.SetVisible(false);
@@ -2531,4 +3123,43 @@ int UtcDaliRenderTaskFinishInvisibleSourceActor(void)
   END_TEST;
 }
 
+int UtcDaliRenderTaskFinishMissingImage(void)
+{
+  TestApplication application;
+
+  // Previously we had bugs where not having a resource ID would cause render-tasks to wait forever
+  tet_infoline("Testing RenderTask::SignalFinished() when an ImageActor has no Image set");
+
+  Stage stage = Stage::GetCurrent();
+
+  BufferImage image = BufferImage::New( 10, 10 );
+  ImageActor rootActor = ImageActor::New( image );
+  rootActor.SetSize( 10, 10 );
+  stage.Add( rootActor );
+
+  ImageActor actorWithMissingImage = ImageActor::New( Image() );
+  actorWithMissingImage.SetSize( 10, 10 );
+  stage.Add( actorWithMissingImage );
 
+  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTask newTask = taskList.CreateTask();
+  newTask.SetInputEnabled( false );
+  newTask.SetClearColor( Vector4( 0.f, 0.f, 0.f, 0.f ) );
+  newTask.SetClearEnabled( true );
+  newTask.SetExclusive( true );
+  newTask.SetRefreshRate( RenderTask::REFRESH_ONCE );
+
+  bool finished = false;
+  RenderTaskFinished renderTaskFinished( finished );
+  newTask.FinishedSignal().Connect( &application, renderTaskFinished );
+
+  // 1 render to process render task, then 1 before finished msg is sent from update to the event thread.
+  application.SendNotification();
+  application.Render();
+  application.Render();
+
+  application.SendNotification();
+  DALI_TEST_CHECK( finished );
+
+  END_TEST;
+}