[dali_1.4.8] Merge branch 'devel/master'
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-TapGestureDetector.cpp
index d81fb58..03b6ecc 100644 (file)
@@ -21,7 +21,7 @@
 #include <dali/public-api/dali-core.h>
 #include <dali/integration-api/events/touch-event-integ.h>
 #include <dali/integration-api/events/tap-gesture-event.h>
-#include <dali/integration-api/system-overlay.h>
+#include <dali/integration-api/render-task-list-integ.h>
 #include <dali-test-suite-utils.h>
 #include <test-touch-utils.h>
 
@@ -73,7 +73,7 @@ struct GestureReceivedFunctor
 {
   GestureReceivedFunctor(SignalData& data) : signalData(data) { }
 
-  void operator()(Actor actor, TapGesture tap)
+  void operator()(Actor actor, const TapGesture& tap)
   {
     signalData.functorCalled = true;
     signalData.receivedGesture = tap;
@@ -93,7 +93,7 @@ struct UnstageActorFunctor : public GestureReceivedFunctor
 {
   UnstageActorFunctor( SignalData& data ) : GestureReceivedFunctor( data ) { }
 
-  void operator()(Actor actor, TapGesture tap)
+  void operator()(Actor actor, const TapGesture& tap)
   {
     GestureReceivedFunctor::operator()( actor, tap );
     Stage::GetCurrent().Remove( actor );
@@ -147,6 +147,30 @@ int UtcDaliTapGestureDetectorConstructor(void)
   END_TEST;
 }
 
+int UtcDaliTapGestureDetectorCopyConstructorP(void)
+{
+  TestApplication application;
+
+  TapGestureDetector detector = TapGestureDetector::New();
+
+  TapGestureDetector copy( detector );
+  DALI_TEST_CHECK( detector );
+  END_TEST;
+}
+
+int UtcDaliTapGestureDetectorAssignmentOperatorP(void)
+{
+  TestApplication application;
+
+  TapGestureDetector detector = TapGestureDetector::New();;
+
+  TapGestureDetector assign;
+  assign = detector;
+  DALI_TEST_CHECK( detector );
+
+  DALI_TEST_CHECK( detector == assign );
+  END_TEST;
+}
 
 int UtcDaliTapGestureDetectorNew(void)
 {
@@ -154,13 +178,13 @@ int UtcDaliTapGestureDetectorNew(void)
 
   TapGestureDetector detector = TapGestureDetector::New();
   DALI_TEST_CHECK(detector);
-  DALI_TEST_EQUALS(1u, detector.GetTapsRequired(), TEST_LOCATION);
-  DALI_TEST_EQUALS(1u, detector.GetTouchesRequired(), TEST_LOCATION);
+  DALI_TEST_EQUALS(1u, detector.GetMinimumTapsRequired(), TEST_LOCATION);
+  DALI_TEST_EQUALS(1u, detector.GetMaximumTapsRequired(), TEST_LOCATION);
 
-  TapGestureDetector detector2 = TapGestureDetector::New(5u, 5u);
+  TapGestureDetector detector2 = TapGestureDetector::New( 5u );
   DALI_TEST_CHECK(detector2);
-  DALI_TEST_EQUALS(5u, detector2.GetTapsRequired(), TEST_LOCATION);
-  DALI_TEST_EQUALS(5u, detector2.GetTouchesRequired(), TEST_LOCATION);
+  DALI_TEST_EQUALS(5u, detector2.GetMinimumTapsRequired(), TEST_LOCATION);
+  DALI_TEST_EQUALS(5u, detector2.GetMaximumTapsRequired(), TEST_LOCATION);
 
   //Scoped test to test destructor
   {
@@ -184,7 +208,10 @@ int UtcDaliTapGestureDetectorNew(void)
   actor.TouchedSignal().Connect( &application, touchFunctor );
 
   Integration::TouchEvent touchEvent(1);
-  TouchPoint point(1, TouchPoint::Down, 20.0f, 20.0f);
+  Integration::Point point;
+  point.SetDeviceId( 1 );
+  point.SetState( PointState::DOWN );
+  point.SetScreenPosition( Vector2( 20.0f, 20.0f ) );
   touchEvent.AddPoint(point);
   application.ProcessEvent(touchEvent);
 
@@ -231,13 +258,17 @@ int UtcDaliTapGestureSetTapsRequired(void)
 
   TapGestureDetector detector = TapGestureDetector::New();
 
-  unsigned int taps = 3;
+  const unsigned int minTaps = 3;
+  const unsigned int maxTaps = 7;
 
-  DALI_TEST_CHECK(taps != detector.GetTapsRequired());
+  DALI_TEST_CHECK( minTaps != detector.GetMinimumTapsRequired() );
+  DALI_TEST_CHECK( maxTaps != detector.GetMaximumTapsRequired() );
 
-  detector.SetTapsRequired(taps);
+  detector.SetMinimumTapsRequired( minTaps );
+  detector.SetMaximumTapsRequired( maxTaps );
 
-  DALI_TEST_EQUALS(taps, detector.GetTapsRequired(), TEST_LOCATION);
+  DALI_TEST_EQUALS( minTaps, detector.GetMinimumTapsRequired(), TEST_LOCATION );
+  DALI_TEST_EQUALS( maxTaps, detector.GetMaximumTapsRequired(), TEST_LOCATION );
 
   // Attach an actor and change the required touches
 
@@ -256,10 +287,34 @@ int UtcDaliTapGestureSetTapsRequired(void)
   detector.Attach(actor);
   detector.DetectedSignal().Connect( &application, functor );
 
+  // Ensure signal is emitted if minimum taps received
+  application.ProcessEvent(GenerateTap(Gesture::Possible, minTaps, 1u, Vector2(50.0f, 50.0f)));
+  application.ProcessEvent(GenerateTap(Gesture::Started, minTaps, 1u, Vector2(50.0f, 50.0f)));
+  DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
+  DALI_TEST_EQUALS( minTaps, data.receivedGesture.numberOfTaps, TEST_LOCATION );
+  data.Reset();
+
+  // Ensure signal is emitted if maximum taps received
+  application.ProcessEvent(GenerateTap(Gesture::Possible, maxTaps, 1u, Vector2(50.0f, 50.0f)));
+  application.ProcessEvent(GenerateTap(Gesture::Started, maxTaps, 1u, Vector2(50.0f, 50.0f)));
+  DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
+  DALI_TEST_EQUALS( maxTaps, data.receivedGesture.numberOfTaps, TEST_LOCATION );
+  data.Reset();
+
+  // Ensure signal is NOT emitted if outside the range
+  application.ProcessEvent(GenerateTap(Gesture::Possible, minTaps - 1, 1u, Vector2(50.0f, 50.0f)));
+  application.ProcessEvent(GenerateTap(Gesture::Started, minTaps - 1, 1u, Vector2(50.0f, 50.0f)));
+  DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
+  data.Reset();
+  application.ProcessEvent(GenerateTap(Gesture::Possible, maxTaps + 1, 1u, Vector2(50.0f, 50.0f)));
+  application.ProcessEvent(GenerateTap(Gesture::Started, maxTaps + 1, 1u, Vector2(50.0f, 50.0f)));
+  DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
+  data.Reset();
+
   TestGestureManager& gestureManager = application.GetGestureManager();
   gestureManager.Initialize();
 
-  detector.SetTapsRequired(4);
+  detector.SetMinimumTapsRequired(4);
 
   // Gesture detection should have been updated only
   DALI_TEST_EQUALS(true, gestureManager.WasCalled(TestGestureManager::UpdateType), TEST_LOCATION);
@@ -269,6 +324,16 @@ int UtcDaliTapGestureSetTapsRequired(void)
   // Reset values
   gestureManager.Initialize();
 
+  detector.SetMaximumTapsRequired(maxTaps);
+
+  // Gesture detection should NOT have been updated
+  DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::UpdateType), TEST_LOCATION);
+  DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::RegisterType), TEST_LOCATION);
+  DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::UnregisterType), TEST_LOCATION);
+
+  // Reset values
+  gestureManager.Initialize();
+
   // Create a second gesture detector that requires even less maximum touches
   TapGestureDetector secondDetector = TapGestureDetector::New();
   secondDetector.Attach(actor);
@@ -277,33 +342,36 @@ int UtcDaliTapGestureSetTapsRequired(void)
   DALI_TEST_EQUALS(true, gestureManager.WasCalled(TestGestureManager::UpdateType), TEST_LOCATION);
   DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::RegisterType), TEST_LOCATION);
   DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::UnregisterType), TEST_LOCATION);
-  END_TEST;
-}
 
-int UtcDaliTapGestureGetTapsRequired(void)
-{
-  TestApplication application;
+  // Reset values
+  gestureManager.Initialize();
+
+  // Delete the second detector so that our detection is updated again
+  secondDetector.Reset();
+  DALI_TEST_EQUALS(true, gestureManager.WasCalled(TestGestureManager::UpdateType), TEST_LOCATION);
+  DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::RegisterType), TEST_LOCATION);
+  DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::UnregisterType), TEST_LOCATION);
+
+  // Set the minimum to be greater than the maximum, should Assert
+  try
+  {
+    detector.SetMinimumTapsRequired( maxTaps );
+    detector.SetMaximumTapsRequired( minTaps );
+    DALI_TEST_CHECK( false ); // Should not get here
+  }
+  catch ( DaliException& e )
+  {
+    DALI_TEST_CHECK( true );
+  }
 
-  TapGestureDetector detector = TapGestureDetector::New();
-  DALI_TEST_EQUALS(1u, detector.GetTapsRequired(), TEST_LOCATION);
   END_TEST;
 }
 
-int UtcDaliTapGestureSetTouchesRequired(void)
+int UtcDaliTapGestureSetTapsRequiredMinMaxCheck(void)
 {
   TestApplication application;
 
-  TapGestureDetector detector = TapGestureDetector::New();
-
-  unsigned int max = 3;
-
-  DALI_TEST_CHECK(max != detector.GetTouchesRequired());
-
-  detector.SetTouchesRequired(max);
-
-  DALI_TEST_EQUALS(max, detector.GetTouchesRequired(), TEST_LOCATION);
-
-  // Attach an actor and change the maximum touches
+  // Attach an actor and change the required touches
 
   Actor actor = Actor::New();
   actor.SetSize(100.0f, 100.0f);
@@ -314,42 +382,31 @@ int UtcDaliTapGestureSetTouchesRequired(void)
   application.SendNotification();
   application.Render();
 
-  SignalData data;
-  GestureReceivedFunctor functor(data);
-
-  detector.Attach(actor);
-  detector.DetectedSignal().Connect( &application, functor );
-
-  TestGestureManager& gestureManager = application.GetGestureManager();
-  gestureManager.Initialize();
-
-  detector.SetTouchesRequired(4);
-
-  // Gesture detection should have been updated only
-  DALI_TEST_EQUALS(true, gestureManager.WasCalled(TestGestureManager::UpdateType), TEST_LOCATION);
-  DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::RegisterType), TEST_LOCATION);
-  DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::UnregisterType), TEST_LOCATION);
-
-  // Reset values
-  gestureManager.Initialize();
+  // Set the minimum to be greater than the maximum, should Assert
 
-  // Create a second gesture detector that requires even less maximum touches
-  TapGestureDetector secondDetector = TapGestureDetector::New();
-  secondDetector.Attach(actor);
+  try
+  {
+    TapGestureDetector detector = TapGestureDetector::New();
+    detector.SetMinimumTapsRequired( 7u );
+    detector.SetMaximumTapsRequired( 3u );
+    detector.Attach(actor);
+    DALI_TEST_CHECK( false ); // Should not get here
+  }
+  catch ( DaliException& e )
+  {
+    DALI_TEST_CHECK( true );
+  }
 
-  // Gesture detection should have been updated
-  DALI_TEST_EQUALS(true, gestureManager.WasCalled(TestGestureManager::UpdateType), TEST_LOCATION);
-  DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::RegisterType), TEST_LOCATION);
-  DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::UnregisterType), TEST_LOCATION);
   END_TEST;
 }
 
-int UtcDaliTapGestureGetTouchesRequired(void)
+int UtcDaliTapGestureGetTapsRequired(void)
 {
   TestApplication application;
 
   TapGestureDetector detector = TapGestureDetector::New();
-  DALI_TEST_EQUALS(1u, detector.GetTouchesRequired(), TEST_LOCATION);
+  DALI_TEST_EQUALS(1u, detector.GetMinimumTapsRequired(), TEST_LOCATION);
+  DALI_TEST_EQUALS(1u, detector.GetMaximumTapsRequired(), TEST_LOCATION);
   END_TEST;
 }
 
@@ -512,7 +569,7 @@ int UtcDaliTapGestureSignalReceptionRotatedActor(void)
 
   Actor actor = Actor::New();
   actor.SetSize(100.0f, 100.0f);
-  actor.SetRotation(Dali::Degree(90.0f), Vector3::ZAXIS);
+  actor.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS);
   Stage::GetCurrent().Add(actor);
 
   // Render and notify
@@ -535,7 +592,7 @@ int UtcDaliTapGestureSignalReceptionRotatedActor(void)
   DALI_TEST_EQUALS( Vector2(5.0f, 5.0f), data.receivedGesture.screenPoint, 0.1, TEST_LOCATION);
 
   // Rotate actor again and render
-  actor.SetRotation(Dali::Degree(180.0f), Vector3::ZAXIS);
+  actor.SetOrientation(Dali::Degree(180.0f), Vector3::ZAXIS);
   application.SendNotification();
   application.Render();
 
@@ -549,7 +606,7 @@ int UtcDaliTapGestureSignalReceptionRotatedActor(void)
   DALI_TEST_EQUALS( Vector2(5.0f, 5.0f), data.receivedGesture.screenPoint, 0.1, TEST_LOCATION);
 
   // Rotate actor again and render
-  actor.SetRotation(Dali::Degree(90.0f), Vector3::YAXIS);
+  actor.SetOrientation(Dali::Degree(90.0f), Vector3::YAXIS);
   application.SendNotification();
   application.Render();
 
@@ -577,7 +634,7 @@ int UtcDaliTapGestureSignalReceptionChildHit(void)
   child.SetSize(100.0f, 100.0f);
   child.SetAnchorPoint(AnchorPoint::CENTER);
   child.SetParentOrigin(ParentOrigin::CENTER);
-  child.SetRotation(Dali::Degree(90.0f), Vector3::ZAXIS);
+  child.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS);
   parent.Add(child);
 
   TouchEventFunctor touchFunctor;
@@ -745,9 +802,7 @@ int UtcDaliTapGestureSignalReceptionMultipleGestureDetectors(void)
     // Reset gestureManager statistics
     gestureManager.Initialize();
 
-    TapGestureDetector secondDetector = TapGestureDetector::New();
-    secondDetector.SetTapsRequired(2);
-    secondDetector.SetTouchesRequired(2);
+    TapGestureDetector secondDetector = TapGestureDetector::New( 2 );
     secondDetector.Attach(second);
     secondDetector.DetectedSignal().Connect(&application, functor);
 
@@ -756,8 +811,8 @@ int UtcDaliTapGestureSignalReceptionMultipleGestureDetectors(void)
     DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::UnregisterType), TEST_LOCATION);
 
     // Tap within second actor's area
-    application.ProcessEvent(GenerateTap(Gesture::Possible, 2u, 2u, Vector2(150.0f, 10.0f)));
-    application.ProcessEvent(GenerateTap(Gesture::Started, 2u, 2u, Vector2(150.0f, 10.0f)));
+    application.ProcessEvent(GenerateTap(Gesture::Possible, 2u, 1u, Vector2(150.0f, 10.0f)));
+    application.ProcessEvent(GenerateTap(Gesture::Started, 2u, 1u, Vector2(150.0f, 10.0f)));
     DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
     DALI_TEST_EQUALS(true, second == data.tappedActor, TEST_LOCATION);
 
@@ -857,26 +912,26 @@ int UtcDaliTapGestureSignalReceptionDifferentPossible(void)
   application.SendNotification();
   application.Render();
 
-  // Emit Started event, we should not receive the long press.
+  // Emit Started event, we should not receive the tap.
   application.ProcessEvent(GenerateTap(Gesture::Started, 1u, 1u, Vector2(50.0f, 10.0f)));
   DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
 
-  // LongPress possible in empty area.
+  // Tap possible in empty area.
   application.ProcessEvent(GenerateTap(Gesture::Possible, 1u, 1u, Vector2(50.0f, 10.0f)));
   DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
 
-  // Move actor in to the long press position.
+  // Move actor in to the tap position.
   actor.SetPosition( 0.0f, 0.0f );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Emit Started event, we should not receive the long press.
+  // Emit Started event, we should not receive the tap.
   application.ProcessEvent(GenerateTap(Gesture::Started, 1u, 1u, Vector2(50.0f, 10.0f)));
   DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
 
-  // Normal long press in actor's area for completeness.
+  // Normal tap in actor's area for completeness.
   application.ProcessEvent(GenerateTap(Gesture::Possible, 1u, 1u, Vector2(50.0f, 10.0f)));
   application.ProcessEvent(GenerateTap(Gesture::Started, 1u, 1u, Vector2(50.0f, 10.0f)));
   DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
@@ -911,7 +966,7 @@ int UtcDaliTapGestureEmitIncorrectStateClear(void)
   }
   catch ( Dali::DaliException& e )
   {
-    DALI_TEST_ASSERT( e, "false", TEST_LOCATION );
+    DALI_TEST_ASSERT( e, "Incorrect state", TEST_LOCATION );
   }
   END_TEST;
 }
@@ -944,7 +999,7 @@ int UtcDaliTapGestureEmitIncorrectStateContinuing(void)
   }
   catch ( Dali::DaliException& e )
   {
-    DALI_TEST_ASSERT( e, "false", TEST_LOCATION );
+    DALI_TEST_ASSERT( e, "Incorrect state", TEST_LOCATION );
   }
   END_TEST;
 }
@@ -977,7 +1032,7 @@ int UtcDaliTapGestureEmitIncorrectStateFinished(void)
   }
   catch ( Dali::DaliException& e )
   {
-    DALI_TEST_ASSERT( e, "false", TEST_LOCATION );
+    DALI_TEST_ASSERT( e, "Incorrect state", TEST_LOCATION );
   }
   END_TEST;
 }
@@ -1141,148 +1196,6 @@ int UtcDaliTapGestureActorRemovedWhilePossible(void)
   END_TEST;
 }
 
-int UtcDaliTapGestureSystemOverlay(void)
-{
-  TestApplication application;
-  Dali::Integration::Core& core = application.GetCore();
-  Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() );
-  systemOverlay.GetOverlayRenderTasks().CreateTask();
-
-  Actor actor = Actor::New();
-  actor.SetSize(100.0f, 100.0f);
-  actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  systemOverlay.Add(actor);
-
-  // Render and notify
-  application.SendNotification();
-  application.Render();
-
-  SignalData data;
-  GestureReceivedFunctor functor(data);
-
-  TapGestureDetector detector = TapGestureDetector::New();
-  detector.Attach(actor);
-  detector.DetectedSignal().Connect(&application, functor);
-
-  Vector2 screenCoords( 50.0f, 50.0f );
-
-  // Do a tap inside actor's area
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, screenCoords ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, screenCoords ) );
-  DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
-  END_TEST;
-}
-
-int UtcDaliTapGestureBehindTouchableSystemOverlay(void)
-{
-  TestApplication application;
-  Dali::Integration::Core& core = application.GetCore();
-  Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() );
-  systemOverlay.GetOverlayRenderTasks().CreateTask();
-
-  // SystemOverlay actor
-  Actor systemOverlayActor = Actor::New();
-  systemOverlayActor.SetSize(100.0f, 100.0f);
-  systemOverlayActor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  systemOverlay.Add(systemOverlayActor);
-
-  // Stage actor
-  Actor stageActor = Actor::New();
-  stageActor.SetSize(100.0f, 100.0f);
-  stageActor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(stageActor);
-
-  // Render and notify
-  application.SendNotification();
-  application.Render();
-
-  // Set system-overlay actor to touchable
-  TouchEventData touchData;
-  TouchEventDataFunctor touchFunctor( touchData );
-  systemOverlayActor.TouchedSignal().Connect(&application, touchFunctor);
-
-  // Set stage actor to receive the gesture
-  SignalData data;
-  GestureReceivedFunctor functor(data);
-
-  TapGestureDetector detector = TapGestureDetector::New();
-  detector.Attach(stageActor);
-  detector.DetectedSignal().Connect(&application, functor);
-
-  Vector2 screenCoords( 50.0f, 50.0f );
-
-  // Do a tap inside both actors' area
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, screenCoords ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, screenCoords ) );
-  DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
-  DALI_TEST_EQUALS( false, touchData.functorCalled, TEST_LOCATION );
-
-  data.Reset();
-  touchData.Reset();
-
-  // Do touch in the same area
-  application.ProcessEvent( touchFunctor.GenerateSingleTouch( TouchPoint::Down, screenCoords ) );
-  DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
-  DALI_TEST_EQUALS( true, touchData.functorCalled, TEST_LOCATION );
-
-  END_TEST;
-}
-
-int UtcDaliTapGestureTouchBehindGesturedSystemOverlay(void)
-{
-  TestApplication application;
-  Dali::Integration::Core& core = application.GetCore();
-  Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() );
-  systemOverlay.GetOverlayRenderTasks().CreateTask();
-
-  // SystemOverlay actor
-  Actor systemOverlayActor = Actor::New();
-  systemOverlayActor.SetSize(100.0f, 100.0f);
-  systemOverlayActor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  systemOverlay.Add(systemOverlayActor);
-
-  // Stage actor
-  Actor stageActor = Actor::New();
-  stageActor.SetSize(100.0f, 100.0f);
-  stageActor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(stageActor);
-
-  // Render and notify
-  application.SendNotification();
-  application.Render();
-
-  // Set stage actor to touchable
-  TouchEventData touchData;
-  TouchEventDataFunctor touchFunctor( touchData );
-  stageActor.TouchedSignal().Connect(&application, touchFunctor);
-
-  // Set system-overlay actor to have the gesture
-  SignalData data;
-  GestureReceivedFunctor functor(data);
-
-  TapGestureDetector detector = TapGestureDetector::New();
-  detector.Attach(systemOverlayActor);
-  detector.DetectedSignal().Connect(&application, functor);
-
-  Vector2 screenCoords( 50.0f, 50.0f );
-
-  // Do a tap inside both actors' area
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, screenCoords ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, screenCoords ) );
-  DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
-  DALI_TEST_EQUALS( false, touchData.functorCalled, TEST_LOCATION );
-
-  data.Reset();
-  touchData.Reset();
-
-  // Do touch in the same area
-  application.ProcessEvent( touchFunctor.GenerateSingleTouch( TouchPoint::Down, screenCoords ) );
-  DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
-  DALI_TEST_EQUALS( true, touchData.functorCalled, TEST_LOCATION );
-
-  END_TEST;
-}
-
 int UtcDaliTapGestureLayerConsumesTouch(void)
 {
   TestApplication application;