Merge branch 'devel/master' into tizen
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-TouchProcessing.cpp
index 8d09883..17bb058 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -20,8 +20,9 @@
 #include <stdlib.h>
 #include <dali/public-api/dali-core.h>
 #include <dali/integration-api/events/touch-event-integ.h>
-#include <dali/integration-api/system-overlay.h>
+#include <dali/integration-api/render-task-list-integ.h>
 #include <dali-test-suite-utils.h>
+#include <dali/devel-api/events/touch-data-devel.h>
 
 using namespace Dali;
 
@@ -117,10 +118,13 @@ struct RemoveActorFunctor : public TouchEventFunctor
   }
 };
 
-Integration::TouchEvent GenerateSingleTouch( TouchPoint::State state, Vector2 screenPosition )
+Integration::TouchEvent GenerateSingleTouch( TouchPoint::State state, const Vector2& screenPosition )
 {
   Integration::TouchEvent touchEvent;
-  touchEvent.points.push_back( TouchPoint ( 0, state, screenPosition.x, screenPosition.y ) );
+  Integration::Point point;
+  point.SetState( static_cast< PointState::Type >( state ) );
+  point.SetScreenPosition( screenPosition );
+  touchEvent.points.push_back( point );
   return touchEvent;
 }
 
@@ -133,9 +137,9 @@ int UtcDaliTouchNormalProcessing(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -152,33 +156,39 @@ int UtcDaliTouchNormalProcessing(void)
 
   // Emit a down signal
   application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, screenCoordinates ) );
+  const TouchPoint *point1 = &data.touchEvent.GetPoint(0);
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
   DALI_TEST_EQUALS( 1u, data.touchEvent.GetPointCount(), TEST_LOCATION );
-  DALI_TEST_EQUALS( TouchPoint::Down, data.touchEvent.points[0].state, TEST_LOCATION );
-  DALI_TEST_EQUALS( screenCoordinates, data.touchEvent.points[0].screen, TEST_LOCATION );
-  DALI_TEST_EQUALS( localCoordinates, data.touchEvent.points[0].local, 0.1f, TEST_LOCATION );
+  DALI_TEST_EQUALS( TouchPoint::Down, point1->state, TEST_LOCATION );
+  DALI_TEST_EQUALS( screenCoordinates, point1->screen, TEST_LOCATION );
+  DALI_TEST_EQUALS( localCoordinates, point1->local, 0.1f, TEST_LOCATION );
   data.Reset();
 
   // Emit a motion signal
   screenCoordinates.x = screenCoordinates.y = 11.0f;
   actor.ScreenToLocal( localCoordinates.x, localCoordinates.y, screenCoordinates.x, screenCoordinates.y );
   application.ProcessEvent( GenerateSingleTouch( TouchPoint::Motion, screenCoordinates ) );
+  const TouchPoint *point2 = &data.touchEvent.GetPoint(0);
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
   DALI_TEST_EQUALS( 1u, data.touchEvent.GetPointCount(), TEST_LOCATION );
-  DALI_TEST_EQUALS( TouchPoint::Motion, data.touchEvent.points[0].state, TEST_LOCATION );
-  DALI_TEST_EQUALS( screenCoordinates, data.touchEvent.points[0].screen, TEST_LOCATION );
-  DALI_TEST_EQUALS( localCoordinates, data.touchEvent.points[0].local, 0.1f, TEST_LOCATION );
+  DALI_TEST_EQUALS( TouchPoint::Motion, point2->state, TEST_LOCATION );
+  DALI_TEST_EQUALS( screenCoordinates, point2->screen, TEST_LOCATION );
+  DALI_TEST_EQUALS( localCoordinates, point2->local, 0.1f, TEST_LOCATION );
   data.Reset();
 
   // Emit an up signal
   screenCoordinates.x = screenCoordinates.y = 12.0f;
   actor.ScreenToLocal( localCoordinates.x, localCoordinates.y, screenCoordinates.x, screenCoordinates.y );
   application.ProcessEvent( GenerateSingleTouch( TouchPoint::Up, screenCoordinates ) );
+
+  const TouchPoint *point3ptr = &data.touchEvent.GetPoint(0);
+  TouchPoint point3( point3ptr->deviceId, point3ptr->state, point3ptr->screen.x, point3ptr->screen.y, point3ptr->local.x, point3ptr->local.y );
+
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
   DALI_TEST_EQUALS( 1u, data.touchEvent.GetPointCount(), TEST_LOCATION );
-  DALI_TEST_EQUALS( TouchPoint::Up, data.touchEvent.points[0].state, TEST_LOCATION );
-  DALI_TEST_EQUALS( screenCoordinates, data.touchEvent.points[0].screen, TEST_LOCATION );
-  DALI_TEST_EQUALS( localCoordinates, data.touchEvent.points[0].local, 0.1f, TEST_LOCATION );
+  DALI_TEST_EQUALS( TouchPoint::Up, point3.state, TEST_LOCATION );
+  DALI_TEST_EQUALS( screenCoordinates, point3.screen, TEST_LOCATION );
+  DALI_TEST_EQUALS( localCoordinates, point3.local, 0.1f, TEST_LOCATION );
   data.Reset();
 
   // Emit a down signal where the actor is not present
@@ -192,21 +202,21 @@ int UtcDaliTouchOutsideCameraNearFarPlanes(void)
 {
   TestApplication application;
 
-  Stage stage = Stage::GetCurrent();
-  Vector2 stageSize = stage.GetSize();
+  Integration::Scene scene = application.GetScene();
+  Vector2 sceneSize = scene.GetSize();
 
   Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::CENTER);
-  actor.SetParentOrigin(ParentOrigin::CENTER);
-  stage.Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
+  actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
+  scene.Add(actor);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Get the camera's near and far planes
-  RenderTaskList taskList = stage.GetRenderTaskList();
+  RenderTaskList taskList = scene.GetRenderTaskList();
   Dali::RenderTask task = taskList.GetTask(0);
   CameraActor camera = task.GetCameraActor();
   float nearPlane = camera.GetNearClippingPlane();
@@ -214,14 +224,14 @@ int UtcDaliTouchOutsideCameraNearFarPlanes(void)
 
   // Calculate the current distance of the actor from the camera
   float tanHalfFov = tanf(camera.GetFieldOfView() * 0.5f);
-  float distance = (stageSize.y * 0.5f) / tanHalfFov;
+  float distance = (sceneSize.y * 0.5f) / tanHalfFov;
 
   // Connect to actor's touched signal
   SignalData data;
   TouchEventFunctor functor( data );
   actor.TouchedSignal().Connect( &application, functor );
 
-  Vector2 screenCoordinates( stageSize.x * 0.5f, stageSize.y * 0.5f );
+  Vector2 screenCoordinates( sceneSize.x * 0.5f, sceneSize.y * 0.5f );
 
   // Emit a down signal
   application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, screenCoordinates ) );
@@ -229,7 +239,7 @@ int UtcDaliTouchOutsideCameraNearFarPlanes(void)
   data.Reset();
 
   // Emit a down signal where actor is just at the camera's near plane
-  actor.SetZ(distance - nearPlane);
+  actor.SetProperty( Actor::Property::POSITION_Z, distance - nearPlane);
 
   // Render and notify
   application.SendNotification();
@@ -240,7 +250,7 @@ int UtcDaliTouchOutsideCameraNearFarPlanes(void)
   data.Reset();
 
   // Emit a down signal where actor is closer than the camera's near plane
-  actor.SetZ((distance - nearPlane) + 1.0f);
+  actor.SetProperty( Actor::Property::POSITION_Z, (distance - nearPlane) + 1.0f);
 
   // Render and notify
   application.SendNotification();
@@ -251,7 +261,7 @@ int UtcDaliTouchOutsideCameraNearFarPlanes(void)
   data.Reset();
 
   // Emit a down signal where actor is just at the camera's far plane
-  actor.SetZ(distance - farPlane);
+  actor.SetProperty( Actor::Property::POSITION_Z, distance - farPlane);
 
   // Render and notify
   application.SendNotification();
@@ -262,7 +272,7 @@ int UtcDaliTouchOutsideCameraNearFarPlanes(void)
   data.Reset();
 
   // Emit a down signal where actor is further than the camera's far plane
-  actor.SetZ((distance - farPlane) - 1.0f);
+  actor.SetProperty( Actor::Property::POSITION_Z, (distance - farPlane) - 1.0f);
 
   // Render and notify
   application.SendNotification();
@@ -297,9 +307,9 @@ int UtcDaliTouchInterrupted(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -331,12 +341,12 @@ int UtcDaliTouchInterrupted(void)
 int UtcDaliTouchParentConsumer(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -431,12 +441,12 @@ int UtcDaliTouchParentConsumer(void)
 int UtcDaliTouchInterruptedParentConsumer(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -483,8 +493,8 @@ int UtcDaliTouchInterruptedParentConsumer(void)
   data.Reset();
   rootData.Reset();
 
-  // Remove actor from Stage
-  Stage::GetCurrent().Remove( actor );
+  // Remove actor from scene
+  application.GetScene().Remove( actor );
   data.Reset();
   rootData.Reset();
 
@@ -513,9 +523,9 @@ int UtcDaliTouchLeave(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -527,7 +537,7 @@ int UtcDaliTouchLeave(void)
   actor.TouchedSignal().Connect( &application, functor );
 
   // Set actor to require leave events
-  actor.SetLeaveRequired( true );
+  actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
 
   // Emit a down signal
   application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) );
@@ -553,7 +563,7 @@ int UtcDaliTouchLeave(void)
   data.Reset();
 
   // We do not want to listen to leave events anymore
-  actor.SetLeaveRequired( false );
+  actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false );
 
   // Another motion event outside of actor, no signalling
   application.ProcessEvent( GenerateSingleTouch( TouchPoint::Motion, Vector2 ( 200.0f, 200.0f )) );
@@ -565,12 +575,12 @@ int UtcDaliTouchLeave(void)
 int UtcDaliTouchLeaveParentConsumer(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -587,8 +597,8 @@ int UtcDaliTouchLeaveParentConsumer(void)
   rootActor.TouchedSignal().Connect( &application, rootFunctor );
 
   // Set actor to require leave events
-  actor.SetLeaveRequired( true );
-  rootActor.SetLeaveRequired( true );
+  actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
+  rootActor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
 
   // Emit a down signal
   application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) );
@@ -633,11 +643,11 @@ int UtcDaliTouchLeaveParentConsumer(void)
   rootData.Reset();
 
   // We do not want to listen to leave events of actor anymore
-  actor.SetLeaveRequired( false );
+  actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false );
 
   // Another motion event outside of root actor, only root signalled
-  Vector2 stageSize( Stage::GetCurrent().GetSize() );
-  application.ProcessEvent( GenerateSingleTouch( TouchPoint::Motion, Vector2 ( stageSize.width + 10.0f, stageSize.height + 10.0f )) );
+  Vector2 sceneSize( application.GetScene().GetSize() );
+  application.ProcessEvent( GenerateSingleTouch( TouchPoint::Motion, Vector2 ( sceneSize.width + 10.0f, sceneSize.height + 10.0f )) );
   DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
   DALI_TEST_EQUALS( true, rootData.functorCalled, TEST_LOCATION );
   DALI_TEST_EQUALS( TouchPoint::Leave, rootData.touchEvent.points[0].state, TEST_LOCATION );
@@ -649,9 +659,9 @@ int UtcDaliTouchActorBecomesInsensitive(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -669,7 +679,7 @@ int UtcDaliTouchActorBecomesInsensitive(void)
   data.Reset();
 
   // Change actor to insensitive
-  actor.SetSensitive( false );
+  actor.SetProperty( Actor::Property::SENSITIVE, false );
 
   // Emit a motion signal, signalled with an interrupted
   application.ProcessEvent( GenerateSingleTouch( TouchPoint::Motion, Vector2 ( 200.0f, 200.0f )) );
@@ -682,12 +692,12 @@ int UtcDaliTouchActorBecomesInsensitive(void)
 int UtcDaliTouchActorBecomesInsensitiveParentConsumer(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -719,7 +729,7 @@ int UtcDaliTouchActorBecomesInsensitiveParentConsumer(void)
   application.Render();
 
   // Make root actor insensitive
-  rootActor.SetSensitive( false );
+  rootActor.SetProperty( Actor::Property::SENSITIVE, false );
 
   // Emit a motion signal, signalled with an interrupted (should get interrupted even if within root actor)
   application.ProcessEvent( GenerateSingleTouch( TouchPoint::Motion, Vector2 ( 200.0f, 200.0f )) );
@@ -733,21 +743,21 @@ int UtcDaliTouchActorBecomesInsensitiveParentConsumer(void)
 int UtcDaliTouchMultipleLayers(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   // Connect to actor's touched signal
   SignalData data;
   TouchEventFunctor functor( data );
 
   Layer layer1 ( Layer::New() );
-  layer1.SetSize(100.0f, 100.0f);
-  layer1.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add( layer1 );
+  layer1.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  layer1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  application.GetScene().Add( layer1 );
 
   Actor actor1 ( Actor::New() );
-  actor1.SetSize( 100.0f, 100.0f );
-  actor1.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  actor1.SetZ( 1.0f ); // Should hit actor1 in this layer
+  actor1.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  actor1.SetProperty( Actor::Property::POSITION_Z,  1.0f ); // Should hit actor1 in this layer
   layer1.Add( actor1 );
 
   // Render and notify
@@ -765,37 +775,37 @@ int UtcDaliTouchMultipleLayers(void)
   data.Reset();
 
   // Make layer1 insensitive, nothing should be hit
-  layer1.SetSensitive( false );
+  layer1.SetProperty( Actor::Property::SENSITIVE, false );
   application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) );
   DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
   data.Reset();
 
   // Make layer1 sensitive again, again actor1 will be hit
-  layer1.SetSensitive( true );
+  layer1.SetProperty( Actor::Property::SENSITIVE, true );
   application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) );
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
   DALI_TEST_CHECK( data.touchedActor == actor1 );
   data.Reset();
 
   // Make rootActor insensitive, nothing should be hit
-  rootActor.SetSensitive( false );
+  rootActor.SetProperty( Actor::Property::SENSITIVE, false );
   application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) );
   DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
   data.Reset();
 
   // Make rootActor sensitive
-  rootActor.SetSensitive( true );
+  rootActor.SetProperty( Actor::Property::SENSITIVE, true );
 
   // Add another layer
   Layer layer2 ( Layer::New() );
-  layer2.SetSize(100.0f, 100.0f );
-  layer2.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  layer2.SetZ( 10.0f ); // Should hit layer2 in this layer rather than actor2
-  Stage::GetCurrent().Add( layer2 );
+  layer2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  layer2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  layer2.SetProperty( Actor::Property::POSITION_Z,  10.0f ); // Should hit layer2 in this layer rather than actor2
+  application.GetScene().Add( layer2 );
 
   Actor actor2 ( Actor::New() );
-  actor2.SetSize(100.0f, 100.0f);
-  actor2.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+  actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
   layer2.Add( actor2 );
 
   // Render and notify
@@ -813,21 +823,21 @@ int UtcDaliTouchMultipleLayers(void)
   data.Reset();
 
   // Make layer2 insensitive, should hit actor1
-  layer2.SetSensitive( false );
+  layer2.SetProperty( Actor::Property::SENSITIVE, false );
   application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) );
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
   DALI_TEST_CHECK( data.touchedActor == actor1 );
   data.Reset();
 
   // Make layer2 sensitive again, should hit layer2
-  layer2.SetSensitive( true );
+  layer2.SetProperty( Actor::Property::SENSITIVE, true );
   application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) );
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
   //DALI_TEST_CHECK( data.touchedActor == layer2 ); // TODO: Uncomment this after removing renderable hack!
   data.Reset();
 
   // Make layer2 invisible, render and notify
-  layer2.SetVisible( false );
+  layer2.SetProperty( Actor::Property::VISIBLE, false );
   application.SendNotification();
   application.Render();
 
@@ -838,7 +848,7 @@ int UtcDaliTouchMultipleLayers(void)
   data.Reset();
 
   // Make rootActor invisible, render and notify
-  rootActor.SetVisible( false );
+  rootActor.SetProperty( Actor::Property::VISIBLE, false );
   application.SendNotification();
   application.Render();
 
@@ -852,17 +862,17 @@ int UtcDaliTouchMultipleLayers(void)
 int UtcDaliTouchMultipleRenderTasks(void)
 {
   TestApplication application;
-  Stage stage ( Stage::GetCurrent() );
-  Vector2 stageSize ( stage.GetSize() );
+  Integration::Scene scene ( application.GetScene() );
+  Vector2 sceneSize ( scene.GetSize() );
 
   Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  stage.Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  scene.Add(actor);
 
   // Create render task
-  Viewport viewport( stageSize.width * 0.5f, stageSize.height * 0.5f, stageSize.width * 0.5f, stageSize.height * 0.5f );
-  RenderTask renderTask ( Stage::GetCurrent().GetRenderTaskList().CreateTask() );
+  Viewport viewport( sceneSize.width * 0.5f, sceneSize.height * 0.5f, sceneSize.width * 0.5f, sceneSize.height * 0.5f );
+  RenderTask renderTask ( application.GetScene().GetRenderTaskList().CreateTask() );
   renderTask.SetViewport( viewport );
   renderTask.SetInputEnabled( true );
 
@@ -896,22 +906,22 @@ int UtcDaliTouchMultipleRenderTasks(void)
 int UtcDaliTouchMultipleRenderTasksWithChildLayer(void)
 {
   TestApplication application;
-  Stage stage ( Stage::GetCurrent() );
-  Vector2 stageSize ( stage.GetSize() );
+  Integration::Scene scene ( application.GetScene() );
+  Vector2 sceneSize ( scene.GetSize() );
 
   Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  stage.Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  scene.Add(actor);
 
   Layer layer = Layer::New();
-  layer.SetSize(100.0f, 100.0f);
-  layer.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+  layer.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
   actor.Add(layer);
 
   // Create render task
-  Viewport viewport( stageSize.width * 0.5f, stageSize.height * 0.5f, stageSize.width * 0.5f, stageSize.height * 0.5f );
-  RenderTask renderTask ( Stage::GetCurrent().GetRenderTaskList().CreateTask() );
+  Viewport viewport( sceneSize.width * 0.5f, sceneSize.height * 0.5f, sceneSize.width * 0.5f, sceneSize.height * 0.5f );
+  RenderTask renderTask ( application.GetScene().GetRenderTaskList().CreateTask() );
   renderTask.SetViewport( viewport );
   renderTask.SetInputEnabled( true );
   renderTask.SetSourceActor( actor );
@@ -947,35 +957,35 @@ int UtcDaliTouchMultipleRenderTasksWithChildLayer(void)
 int UtcDaliTouchOffscreenRenderTasks(void)
 {
   TestApplication application;
-  Stage stage ( Stage::GetCurrent() );
-  Vector2 stageSize ( stage.GetSize() );
+  Integration::Scene scene ( application.GetScene() );
+  Vector2 sceneSize ( scene.GetSize() );
 
-  // FrameBufferImage for offscreen RenderTask
-  FrameBufferImage frameBufferImage( FrameBufferImage::New( stageSize.width, stageSize.height, Pixel::RGBA8888 ) );
+  // FrameBuffer for offscreen RenderTask
+  FrameBuffer frameBuffer = FrameBuffer::New( sceneSize.width, sceneSize.height );
 
-  // Create an image actor to display the FrameBufferImage
-  ImageActor imageActor ( ImageActor::New( frameBufferImage ) );
-  imageActor.SetParentOrigin(ParentOrigin::CENTER);
-  imageActor.SetSize( stageSize.x, stageSize.y );
-  imageActor.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) ); // FIXME
-  stage.Add( imageActor );
+  // Create a renderable actor to display the FrameBufferImage
+  Actor renderableActor = CreateRenderableActor(frameBuffer.GetColorTexture());
+  renderableActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
+  renderableActor.SetProperty( Actor::Property::SIZE, Vector2( sceneSize.x, sceneSize.y ) );
+  renderableActor.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) ); // FIXME
+  scene.Add( renderableActor );
 
   Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  stage.Add( actor );
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  scene.Add( actor );
   application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE ); // Ensure framebuffer connects
 
-  stage.GetRenderTaskList().GetTask( 0u ).SetScreenToFrameBufferFunction( RenderTask::FULLSCREEN_FRAMEBUFFER_FUNCTION );
+  scene.GetRenderTaskList().GetTask( 0u ).SetScreenToFrameBufferFunction( RenderTask::FULLSCREEN_FRAMEBUFFER_FUNCTION );
 
   // Create a RenderTask
-  RenderTask renderTask = stage.GetRenderTaskList().CreateTask();
+  RenderTask renderTask = scene.GetRenderTaskList().CreateTask();
   renderTask.SetSourceActor( actor );
-  renderTask.SetTargetFrameBuffer( frameBufferImage );
+  renderTask.SetFrameBuffer( frameBuffer );
   renderTask.SetInputEnabled( true );
 
   // Create another RenderTask
-  RenderTask renderTask2( stage.GetRenderTaskList().CreateTask() );
+  RenderTask renderTask2( scene.GetRenderTaskList().CreateTask() );
   renderTask2.SetInputEnabled( true );
 
   // Render and notify
@@ -994,21 +1004,51 @@ int UtcDaliTouchOffscreenRenderTasks(void)
   END_TEST;
 }
 
+int UtcDaliTouchRenderTaskWithExclusiveActor(void)
+{
+  TestApplication application;
+  auto scene = application.GetScene();
+  auto sceneSize( scene.GetSize() );
+
+  auto actor = CreateRenderableActor();
+  actor.SetProperty( Actor::Property::SIZE, Vector2( sceneSize.x, sceneSize.y ) );
+  scene.Add( actor );
+
+  auto renderTask = scene.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;
-  Stage stage ( Stage::GetCurrent() );
-  Vector2 stageSize ( stage.GetSize() );
-
-  ImageActor parent = ImageActor::New();
-  parent.SetSize(100.0f, 100.0f);
-  parent.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  stage.Add(parent);
-
-  ImageActor actor = ImageActor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  actor.SetSortModifier( 1.0f );
+  Integration::Scene scene ( application.GetScene() );
+  Vector2 sceneSize ( scene.GetSize() );
+
+  Actor parent = CreateRenderableActor();
+  parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  scene.Add(parent);
+
+  Actor actor = CreateRenderableActor();
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
   parent.Add(actor);
 
   // Render and notify
@@ -1033,9 +1073,9 @@ int UtcDaliTouchActorRemovedInSignal(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1047,7 +1087,7 @@ int UtcDaliTouchActorRemovedInSignal(void)
   actor.TouchedSignal().Connect( &application, functor );
 
   // Register for leave events
-  actor.SetLeaveRequired( true );
+  actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
 
   // Emit a down signal
   application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) );
@@ -1055,7 +1095,7 @@ int UtcDaliTouchActorRemovedInSignal(void)
   data.Reset();
 
   // Re-add, render and notify
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render();
 
@@ -1078,8 +1118,8 @@ int UtcDaliTouchActorRemovedInSignal(void)
   DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
   data.Reset();
 
-  // Re-add actor back to stage, render and notify
-  Stage::GetCurrent().Add(actor);
+  // Re-add actor back to scene, render and notify
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render();
 
@@ -1102,9 +1142,9 @@ int UtcDaliTouchActorSignalNotConsumed(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1121,14 +1161,14 @@ int UtcDaliTouchActorSignalNotConsumed(void)
   END_TEST;
 }
 
-int UtcDaliTouchActorUnStaged(void)
+int UtcDaliTouchActorRemovedFromScene(void)
 {
   TestApplication application;
 
   Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1144,8 +1184,8 @@ int UtcDaliTouchActorUnStaged(void)
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
   data.Reset();
 
-  // Remove actor from stage
-  Stage::GetCurrent().Remove( actor );
+  // Remove actor from scene
+  application.GetScene().Remove( actor );
   data.Reset();
 
   // Render and notify
@@ -1159,50 +1199,14 @@ int UtcDaliTouchActorUnStaged(void)
   END_TEST;
 }
 
-int UtcDaliTouchSystemOverlayActor(void)
-{
-  TestApplication application;
-  Dali::Integration::Core& core( application.GetCore() );
-  Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() );
-  systemOverlay.GetOverlayRenderTasks().CreateTask();
-
-  // Create an actor and add it to the system overlay.
-  Actor systemActor = Actor::New();
-  systemActor.SetSize(100.0f, 100.0f);
-  systemActor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  systemOverlay.Add( systemActor );
-
-  // Create an actor and add it to the stage as per normal, same position and size as systemActor
-  Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
-
-  // Connect to the touch signals.
-  SignalData data;
-  TouchEventFunctor functor( data );
-  systemActor.TouchedSignal().Connect( &application, functor );
-  actor.TouchedSignal().Connect( &application, functor );
-
-  // Render and notify
-  application.SendNotification();
-  application.Render();
-
-  // Emit a down signal, the system overlay is drawn last so is at the top, should hit the systemActor.
-  application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) );
-  DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
-  DALI_TEST_CHECK( systemActor == data.touchedActor );
-  END_TEST;
-}
-
 int UtcDaliTouchLayerConsumesTouch(void)
 {
   TestApplication application;
 
   Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1215,9 +1219,9 @@ int UtcDaliTouchLayerConsumesTouch(void)
 
   // Add a layer to overlap the actor
   Layer layer = Layer::New();
-  layer.SetSize(100.0f, 100.0f);
-  layer.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add( layer );
+  layer.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  application.GetScene().Add( layer );
   layer.RaiseToTop();
 
   // Render and notify
@@ -1231,7 +1235,7 @@ int UtcDaliTouchLayerConsumesTouch(void)
   data.Reset();
 
   // Set layer to consume all touch
-  layer.SetTouchConsumed( true );
+  layer.SetProperty( Layer::Property::CONSUMES_TOUCH, true );
 
   // Render and notify
   application.SendNotification();
@@ -1249,15 +1253,15 @@ int UtcDaliTouchLayerConsumesTouch(void)
 int UtcDaliTouchLeaveActorReadded(void)
 {
   TestApplication application;
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene scene = application.GetScene();
 
   Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  stage.Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  scene.Add(actor);
 
   // Set actor to receive touch-events
-  actor.SetLeaveRequired( true );
+  actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
 
   // Render and notify
   application.SendNotification();
@@ -1274,9 +1278,9 @@ int UtcDaliTouchLeaveActorReadded(void)
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
   data.Reset();
 
-  // Remove actor from stage and add again
-  stage.Remove( actor );
-  stage.Add( actor );
+  // Remove actor from scene and add again
+  scene.Remove( actor );
+  scene.Add( actor );
 
   // Emit a motion within the actor's bounds
   application.ProcessEvent( GenerateSingleTouch( TouchPoint::Motion, Vector2( 12.0f, 10.0f ) ) );
@@ -1292,52 +1296,66 @@ int UtcDaliTouchLeaveActorReadded(void)
   END_TEST;
 }
 
-int UtcDaliTouchStencilNonRenderableActor(void)
+int UtcDaliTouchClippingActor(void)
 {
   TestApplication application;
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene scene = application.GetScene();
 
   Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  stage.Add(actor);
-
-  Actor stencil = Actor::New();
-  stencil.SetSize(50.0f, 50.0f);
-  stencil.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  stencil.SetDrawMode( DrawMode::STENCIL );
-  stage.Add(stencil);
-
-  // Render and notify
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+  scene.Add( actor );
+
+  Actor clippingActor = Actor::New();
+  clippingActor.SetProperty( Actor::Property::SIZE, Vector2( 50.0f, 50.0f ) );
+  clippingActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+  clippingActor.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
+  scene.Add( clippingActor );
+
+  // Add a child to the clipped region.
+  Actor clippingChild = Actor::New();
+  clippingChild.SetProperty( Actor::Property::SIZE, Vector2( 50.0f, 50.0f ) );
+  clippingChild.SetProperty( Actor::Property::POSITION, Vector2( 25.0f, 25.0f ));
+  clippingChild.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+  clippingActor.Add( clippingChild );
+
+  // Render and notify.
   application.SendNotification();
   application.Render();
 
-  // Connect to actor's touched signal
+  // Connect to actor's touched signal.
   SignalData data;
   TouchEventFunctor functor( data );
   actor.TouchedSignal().Connect( &application, functor );
 
-  // Emit an event within stencil area
+  // Emit an event within clipped area - no hit.
   application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) );
-  DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
+  DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
   data.Reset();
 
-  // Emit an event outside the stencil area but within the actor area, we should have a hit!
+  // Emit an event outside the clipped area but within the actor area, we should have a hit.
   application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 60.0f, 60.0f ) ) );
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
   data.Reset();
 
+  clippingChild.TouchedSignal().Connect( &application, functor );
+
+  // Emit an event inside part of the child which is within the clipped area, we should have a hit.
+  application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 30.0f, 30.0f ) ) );
+  DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
+  data.Reset();
+
   END_TEST;
 }
 
-int UtcDaliTouchActorUnstaged(void)
+int UtcDaliTouchActorUnparented(void)
 {
   TestApplication application;
 
   Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1368,18 +1386,18 @@ int UtcDaliTouchActorUnstaged(void)
   END_TEST;
 }
 
-int UtcDaliTouchParentUnstaged(void)
+int UtcDaliTouchParentRemovedFromScene(void)
 {
   TestApplication application;
 
   Actor parent = Actor::New();
-  parent.SetSize(100.0f, 100.0f);
-  parent.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(parent);
+  parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  application.GetScene().Add(parent);
 
   Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
   parent.Add(actor);
 
   // Render and notify
@@ -1411,18 +1429,18 @@ int UtcDaliTouchParentUnstaged(void)
   END_TEST;
 }
 
-int UtcDaliTouchActorUnstagedDifferentConsumer(void)
+int UtcDaliTouchActorRemovedFromSceneDifferentConsumer(void)
 {
   TestApplication application;
 
   Actor parent = Actor::New();
-  parent.SetSize(100.0f, 100.0f);
-  parent.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(parent);
+  parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  application.GetScene().Add(parent);
 
   Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
   parent.Add(actor);
 
   // Render and notify
@@ -1506,16 +1524,16 @@ int UtcDaliTouchActorUnstagedDifferentConsumer(void)
 int UtcDaliTouchInterruptedDifferentConsumer(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   Actor parent = Actor::New();
-  parent.SetSize(100.0f, 100.0f);
-  parent.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(parent);
+  parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  application.GetScene().Add(parent);
 
   Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
   parent.Add(actor);
 
   // Render and notify
@@ -1574,3 +1592,41 @@ int UtcDaliTouchInterruptedDifferentConsumer(void)
 
   END_TEST;
 }
+
+int UtcDaliTouchDataConvert(void)
+{
+  TestApplication application;
+
+  Actor actor = Actor::New();
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  application.GetScene().Add(actor);
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Connect to actor's touch signal
+  SignalData data;
+  TouchEventFunctor functor(data);
+  actor.TouchedSignal().Connect(&application, functor);
+
+  Vector2 screenCoordiantes(10.0f, 10.0f);
+  Vector2 localCoordinates;
+  actor.ScreenToLocal(localCoordinates.x, localCoordinates.y, screenCoordiantes.x, screenCoordiantes.y);
+
+  // Emit a down signal
+  application.ProcessEvent(GenerateSingleTouch(TouchPoint::Down, screenCoordiantes));
+  Dali::TouchData touchData = Dali::DevelTouchData::Convert(data.touchEvent);
+
+  DALI_TEST_EQUALS( 1u, touchData.GetPointCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( screenCoordiantes, touchData.GetScreenPosition(0), TEST_LOCATION );
+  DALI_TEST_EQUALS( localCoordinates, touchData.GetLocalPosition(0), 0.1f, TEST_LOCATION );
+  DALI_TEST_EQUALS( PointState::DOWN, touchData.GetState(0), TEST_LOCATION );
+  DALI_TEST_EQUALS( actor, touchData.GetHitActor(0), TEST_LOCATION );
+
+  data.Reset();
+
+  END_TEST;
+
+}