If a RenderTask's exclusive actor is destoryed, then ensure the RenderTaskList of...
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-TouchProcessing.cpp
index b5f0ec9..2f6d2ba 100755 (executable)
@@ -1004,6 +1004,37 @@ int UtcDaliTouchOffscreenRenderTasks(void)
   END_TEST;
 }
 
+int UtcDaliTouchRenderTaskWithExclusiveActor(void)
+{
+  TestApplication application;
+  auto stage = Stage::GetCurrent();
+  auto stageSize( stage.GetSize() );
+
+  auto actor = CreateRenderableActor();
+  actor.SetSize( stageSize.x, stageSize.y );
+  stage.Add( actor );
+
+  auto renderTask = stage.GetRenderTaskList().CreateTask();
+  renderTask.SetSourceActor( actor );
+  renderTask.SetExclusive( true );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Connect to actor's touched signal
+  SignalData data;
+  TouchEventFunctor functor( data );
+  actor.TouchedSignal().Connect( &application, functor );
+
+  // Emit a down signal
+  application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) );
+  DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
+  data.Reset();
+
+  END_TEST;
+}
+
 int UtcDaliTouchMultipleRenderableActors(void)
 {
   TestApplication application;
@@ -1598,4 +1629,4 @@ int UtcDaliTouchDataConvert(void)
 
   END_TEST;
 
-}
\ No newline at end of file
+}