[dali_2.3.26] Merge branch 'devel/master'
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-PanGestureRecognizer.cpp
index 64b4052..c6ee297 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
  *
  */
 
-#include <iostream>
-
-#include <stdlib.h>
-#include <dali/public-api/dali-core.h>
-#include <dali/integration-api/input-options.h>
+#include <dali-test-suite-utils.h>
 #include <dali/integration-api/events/touch-event-integ.h>
+#include <dali/integration-api/input-options.h>
 #include <dali/integration-api/render-task-list-integ.h>
-#include <dali/internal/event/events/pan-gesture-event.h>
-#include <dali-test-suite-utils.h>
-#include <test-touch-utils.h>
+#include <dali/public-api/dali-core.h>
+#include <stdlib.h>
+
+#include <chrono>
+#include <iostream>
 
 using namespace Dali;
 
 ///////////////////////////////////////////////////////////////////////////////
 namespace
 {
-
 struct SignalData
 {
   SignalData()
   : functorCalled(false),
     voidFunctorCalled(false),
     receivedGesture()
-  {}
+  {
+  }
 
   void Reset()
   {
-    functorCalled = false;
+    functorCalled     = false;
     voidFunctorCalled = false;
 
-    receivedGesture.state = Gesture::Started;
+    receivedGesture.Reset();
 
     pannedActor.Reset();
   }
 
-  bool functorCalled;
-  bool voidFunctorCalled;
+  bool       functorCalled;
+  bool       voidFunctorCalled;
   PanGesture receivedGesture;
-  Actor pannedActor;
+  Actor      pannedActor;
 };
 
 // Functor that sets the data when called
 struct GestureReceivedFunctor
 {
-  GestureReceivedFunctor(SignalData& data) : signalData(data) { }
+  GestureReceivedFunctor(SignalData& data)
+  : signalData(data)
+  {
+  }
 
   void operator()(Actor actor, const PanGesture& pan)
   {
-    signalData.functorCalled = true;
+    signalData.functorCalled   = true;
     signalData.receivedGesture = pan;
-    signalData.pannedActor = actor;
+    signalData.pannedActor     = actor;
   }
 
   void operator()()
@@ -76,41 +78,47 @@ struct GestureReceivedFunctor
   SignalData& signalData;
 };
 
-
-Integration::TouchEvent GenerateSingleTouch( PointState::Type state, const Vector2& screenPosition, uint32_t time )
+Integration::TouchEvent GenerateSingleTouch(PointState::Type state, const Vector2& screenPosition, uint32_t time)
 {
   Integration::TouchEvent touchEvent;
-  Integration::Point point;
-  point.SetState( state );
-  point.SetScreenPosition( screenPosition );
-  point.SetDeviceClass( Device::Class::TOUCH );
-  point.SetDeviceSubclass( Device::Subclass::NONE );
-  touchEvent.points.push_back( point );
+  Integration::Point      point;
+  point.SetState(state);
+  point.SetScreenPosition(screenPosition);
+  point.SetDeviceClass(Device::Class::TOUCH);
+  point.SetDeviceSubclass(Device::Subclass::NONE);
+  touchEvent.points.push_back(point);
   touchEvent.time = time;
   return touchEvent;
 }
 
-Integration::TouchEvent GenerateDoubleTouch( PointState::Type stateA, const Vector2& screenPositionA, PointState::Type stateB, const Vector2& screenPositionB, uint32_t time )
+Integration::TouchEvent GenerateDoubleTouch(PointState::Type stateA, const Vector2& screenPositionA, PointState::Type stateB, const Vector2& screenPositionB, uint32_t time)
 {
   Integration::TouchEvent touchEvent;
-  Integration::Point point;
-  point.SetState( stateA );
-  point.SetScreenPosition( screenPositionA );
-  point.SetDeviceClass( Device::Class::TOUCH );
-  point.SetDeviceSubclass( Device::Subclass::NONE );
-  touchEvent.points.push_back( point );
-  point.SetScreenPosition( screenPositionB );
-  point.SetState( stateB);
-  touchEvent.points.push_back( point );
+  Integration::Point      point;
+  point.SetState(stateA);
+  point.SetScreenPosition(screenPositionA);
+  point.SetDeviceClass(Device::Class::TOUCH);
+  point.SetDeviceSubclass(Device::Subclass::NONE);
+  touchEvent.points.push_back(point);
+  point.SetScreenPosition(screenPositionB);
+  point.SetState(stateB);
+  touchEvent.points.push_back(point);
   touchEvent.time = time;
   return touchEvent;
 }
 
+uint32_t GetMilliSeconds()
+{
+  // Get the time of a monotonic clock since its epoch.
+  auto epoch = std::chrono::steady_clock::now().time_since_epoch();
 
-} // anon namespace
+  auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(epoch);
 
-///////////////////////////////////////////////////////////////////////////////
+  return static_cast<uint32_t>(duration.count());
+}
+} // namespace
 
+///////////////////////////////////////////////////////////////////////////////
 
 int UtcDaliPanGestureRecognizerBasicNoAction(void)
 {
@@ -119,9 +127,9 @@ int UtcDaliPanGestureRecognizerBasicNoAction(void)
   PanGestureDetector detector = PanGestureDetector::New();
 
   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();
@@ -129,13 +137,13 @@ int UtcDaliPanGestureRecognizerBasicNoAction(void)
 
   detector.Attach(actor);
 
-  SignalData data;
+  SignalData             data;
   GestureReceivedFunctor functor(data);
   detector.DetectedSignal().Connect(&application, functor);
 
-  application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 20.0f ), 150 ) );
+  application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, Vector2(20.0f, 20.0f), 150));
 
-  application.ProcessEvent( GenerateSingleTouch( PointState::UP, Vector2( 20.0f, 20.0f ), 200 ) );
+  application.ProcessEvent(GenerateSingleTouch(PointState::UP, Vector2(20.0f, 20.0f), 200));
 
   application.SendNotification();
 
@@ -151,9 +159,9 @@ int UtcDaliPanGestureRecognizerBasic(void)
   PanGestureDetector detector = PanGestureDetector::New();
 
   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();
@@ -161,13 +169,13 @@ int UtcDaliPanGestureRecognizerBasic(void)
 
   detector.Attach(actor);
 
-  SignalData data;
+  SignalData             data;
   GestureReceivedFunctor functor(data);
   detector.DetectedSignal().Connect(&application, functor);
 
-  application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 20.0f ), 150 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 40.0f ), 151 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 60.0f ), 152 ) );
+  application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, Vector2(20.0f, 20.0f), 150));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 40.0f), 151));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 60.0f), 152));
 
   application.SendNotification();
 
@@ -183,9 +191,9 @@ int UtcDaliPanGestureRecognizerBasicInterrupted(void)
   PanGestureDetector detector = PanGestureDetector::New();
 
   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();
@@ -193,13 +201,13 @@ int UtcDaliPanGestureRecognizerBasicInterrupted(void)
 
   detector.Attach(actor);
 
-  SignalData data;
+  SignalData             data;
   GestureReceivedFunctor functor(data);
   detector.DetectedSignal().Connect(&application, functor);
 
-  application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 20.0f ), 150 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 25.0f ), 151 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::INTERRUPTED, Vector2( 20.0f, 30.0f ), 152 ) );
+  application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, Vector2(20.0f, 20.0f), 150));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 25.0f), 151));
+  application.ProcessEvent(GenerateSingleTouch(PointState::INTERRUPTED, Vector2(20.0f, 30.0f), 152));
 
   application.SendNotification();
 
@@ -215,9 +223,9 @@ int UtcDaliPanGestureRecognizerBasicShortest(void)
   PanGestureDetector detector = PanGestureDetector::New();
 
   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();
@@ -225,13 +233,13 @@ int UtcDaliPanGestureRecognizerBasicShortest(void)
 
   detector.Attach(actor);
 
-  SignalData data;
+  SignalData             data;
   GestureReceivedFunctor functor(data);
   detector.DetectedSignal().Connect(&application, functor);
 
-  application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 20.0f ), 150 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 40.0f ), 151 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::UP, Vector2( 20.0f, 40.0f ), 155 ) );
+  application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, Vector2(20.0f, 20.0f), 150));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 40.0f), 151));
+  application.ProcessEvent(GenerateSingleTouch(PointState::UP, Vector2(20.0f, 40.0f), 155));
 
   application.SendNotification();
 
@@ -247,9 +255,9 @@ int UtcDaliPanGestureRecognizerBasicFailToStart(void)
   PanGestureDetector detector = PanGestureDetector::New();
 
   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();
@@ -257,13 +265,13 @@ int UtcDaliPanGestureRecognizerBasicFailToStart(void)
 
   detector.Attach(actor);
 
-  SignalData data;
+  SignalData             data;
   GestureReceivedFunctor functor(data);
   detector.DetectedSignal().Connect(&application, functor);
 
-  application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 20.0f ), 150 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 40.0f ), 151 ) );
-  application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 20.0f, 50.0f ), PointState::DOWN, Vector2( 40.0f, 40.0f ), 153 ) );
+  application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, Vector2(20.0f, 20.0f), 150));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 40.0f), 151));
+  application.ProcessEvent(GenerateDoubleTouch(PointState::MOTION, Vector2(20.0f, 50.0f), PointState::DOWN, Vector2(40.0f, 40.0f), 153));
 
   application.SendNotification();
 
@@ -279,9 +287,9 @@ int UtcDaliPanGestureRecognizerBasicStationary(void)
   PanGestureDetector detector = PanGestureDetector::New();
 
   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();
@@ -289,15 +297,15 @@ int UtcDaliPanGestureRecognizerBasicStationary(void)
 
   detector.Attach(actor);
 
-  SignalData data;
+  SignalData             data;
   GestureReceivedFunctor functor(data);
   detector.DetectedSignal().Connect(&application, functor);
 
-  application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 20.0f ), 150 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 40.0f ), 151 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 50.0f ), 152 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::STATIONARY, Vector2( 20.0f, 50.0f ), 153 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 55.0f ), 154 ) );
+  application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, Vector2(20.0f, 20.0f), 150));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 40.0f), 151));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 50.0f), 152));
+  application.ProcessEvent(GenerateSingleTouch(PointState::STATIONARY, Vector2(20.0f, 50.0f), 153));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 55.0f), 154));
 
   application.SendNotification();
 
@@ -316,9 +324,9 @@ int UtcDaliPanGestureRecognizerNewParametersFail(void)
   detector.SetMinimumTouchesRequired(2);
 
   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();
@@ -326,13 +334,13 @@ int UtcDaliPanGestureRecognizerNewParametersFail(void)
 
   detector.Attach(actor);
 
-  SignalData data;
+  SignalData             data;
   GestureReceivedFunctor functor(data);
   detector.DetectedSignal().Connect(&application, functor);
 
-  application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 20.0f ), 150 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 40.0f ), 151 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 60.0f ), 152 ) );
+  application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, Vector2(20.0f, 20.0f), 150));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 40.0f), 151));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 60.0f), 152));
 
   application.SendNotification();
 
@@ -351,9 +359,9 @@ int UtcDaliPanGestureRecognizerNewParametersSuccess(void)
   detector.SetMinimumTouchesRequired(2);
 
   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();
@@ -361,13 +369,13 @@ int UtcDaliPanGestureRecognizerNewParametersSuccess(void)
 
   detector.Attach(actor);
 
-  SignalData data;
+  SignalData             data;
   GestureReceivedFunctor functor(data);
   detector.DetectedSignal().Connect(&application, functor);
 
-  application.ProcessEvent( GenerateDoubleTouch( PointState::DOWN, Vector2( 20.0f, 50.0f ), PointState::DOWN, Vector2( 20.0f, 40.0f ), 150 ) );
-  application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 40.0f, 50.0f ), PointState::MOTION, Vector2( 40.0f, 40.0f ), 151 ) );
-  application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 50.0f, 50.0f ), PointState::MOTION, Vector2( 50.0f, 40.0f ), 152 ) );
+  application.ProcessEvent(GenerateDoubleTouch(PointState::DOWN, Vector2(20.0f, 50.0f), PointState::DOWN, Vector2(20.0f, 40.0f), 150));
+  application.ProcessEvent(GenerateDoubleTouch(PointState::MOTION, Vector2(40.0f, 50.0f), PointState::MOTION, Vector2(40.0f, 40.0f), 151));
+  application.ProcessEvent(GenerateDoubleTouch(PointState::MOTION, Vector2(50.0f, 50.0f), PointState::MOTION, Vector2(50.0f, 40.0f), 152));
 
   application.SendNotification();
 
@@ -386,9 +394,9 @@ int UtcDaliPanGestureRecognizerNewParametersEndFewerTouches01(void)
   detector.SetMinimumTouchesRequired(2);
 
   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();
@@ -396,14 +404,14 @@ int UtcDaliPanGestureRecognizerNewParametersEndFewerTouches01(void)
 
   detector.Attach(actor);
 
-  SignalData data;
+  SignalData             data;
   GestureReceivedFunctor functor(data);
   detector.DetectedSignal().Connect(&application, functor);
 
-  application.ProcessEvent( GenerateDoubleTouch( PointState::DOWN, Vector2( 20.0f, 50.0f ), PointState::DOWN, Vector2( 20.0f, 40.0f ), 150 ) );
-  application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 40.0f, 50.0f ), PointState::MOTION, Vector2( 40.0f, 40.0f ), 151 ) );
-  application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 50.0f, 50.0f ), PointState::MOTION, Vector2( 50.0f, 40.0f ), 152 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::STATIONARY, Vector2( 50.0f, 50.0f ), 153 ) );
+  application.ProcessEvent(GenerateDoubleTouch(PointState::DOWN, Vector2(20.0f, 50.0f), PointState::DOWN, Vector2(20.0f, 40.0f), 150));
+  application.ProcessEvent(GenerateDoubleTouch(PointState::MOTION, Vector2(40.0f, 50.0f), PointState::MOTION, Vector2(40.0f, 40.0f), 151));
+  application.ProcessEvent(GenerateDoubleTouch(PointState::MOTION, Vector2(50.0f, 50.0f), PointState::MOTION, Vector2(50.0f, 40.0f), 152));
+  application.ProcessEvent(GenerateSingleTouch(PointState::STATIONARY, Vector2(50.0f, 50.0f), 153));
 
   application.SendNotification();
 
@@ -422,9 +430,9 @@ int UtcDaliPanGestureRecognizerNewParametersEndFewerTouches02(void)
   detector.SetMinimumTouchesRequired(2);
 
   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();
@@ -432,14 +440,14 @@ int UtcDaliPanGestureRecognizerNewParametersEndFewerTouches02(void)
 
   detector.Attach(actor);
 
-  SignalData data;
+  SignalData             data;
   GestureReceivedFunctor functor(data);
   detector.DetectedSignal().Connect(&application, functor);
 
-  application.ProcessEvent( GenerateDoubleTouch( PointState::DOWN, Vector2( 20.0f, 50.0f ), PointState::DOWN, Vector2( 20.0f, 40.0f ), 150 ) );
-  application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 40.0f, 50.0f ), PointState::MOTION, Vector2( 40.0f, 40.0f ), 151 ) );
-  application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 50.0f, 50.0f ), PointState::MOTION, Vector2( 50.0f, 40.0f ), 152 ) );
-  application.ProcessEvent( GenerateDoubleTouch( PointState::STATIONARY, Vector2( 50.0f, 50.0f ), PointState::UP, Vector2( 50.0f, 40.0f ), 153 ) );
+  application.ProcessEvent(GenerateDoubleTouch(PointState::DOWN, Vector2(20.0f, 50.0f), PointState::DOWN, Vector2(20.0f, 40.0f), 150));
+  application.ProcessEvent(GenerateDoubleTouch(PointState::MOTION, Vector2(40.0f, 50.0f), PointState::MOTION, Vector2(40.0f, 40.0f), 151));
+  application.ProcessEvent(GenerateDoubleTouch(PointState::MOTION, Vector2(50.0f, 50.0f), PointState::MOTION, Vector2(50.0f, 40.0f), 152));
+  application.ProcessEvent(GenerateDoubleTouch(PointState::STATIONARY, Vector2(50.0f, 50.0f), PointState::UP, Vector2(50.0f, 40.0f), 153));
 
   application.SendNotification();
 
@@ -458,9 +466,9 @@ int UtcDaliPanGestureRecognizerNewParametersNoStart(void)
   detector.SetMinimumTouchesRequired(2);
 
   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();
@@ -468,13 +476,13 @@ int UtcDaliPanGestureRecognizerNewParametersNoStart(void)
 
   detector.Attach(actor);
 
-  SignalData data;
+  SignalData             data;
   GestureReceivedFunctor functor(data);
   detector.DetectedSignal().Connect(&application, functor);
 
-  application.ProcessEvent( GenerateDoubleTouch( PointState::DOWN, Vector2( 20.0f, 50.0f ), PointState::DOWN, Vector2( 20.0f, 40.0f ), 150 ) );
-  application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 40.0f, 50.0f ), PointState::MOTION, Vector2( 40.0f, 40.0f ), 151 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::UP, Vector2( 50.0f, 50.0f ), 153 ) );
+  application.ProcessEvent(GenerateDoubleTouch(PointState::DOWN, Vector2(20.0f, 50.0f), PointState::DOWN, Vector2(20.0f, 40.0f), 150));
+  application.ProcessEvent(GenerateDoubleTouch(PointState::MOTION, Vector2(40.0f, 50.0f), PointState::MOTION, Vector2(40.0f, 40.0f), 151));
+  application.ProcessEvent(GenerateSingleTouch(PointState::UP, Vector2(50.0f, 50.0f), 153));
 
   application.SendNotification();
 
@@ -493,9 +501,46 @@ int UtcDaliPanGestureRecognizerNewParametersSlowRelease(void)
   detector.SetMinimumTouchesRequired(2);
 
   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();
+  application.Render();
+
+  detector.Attach(actor);
+
+  SignalData             data;
+  GestureReceivedFunctor functor(data);
+  detector.DetectedSignal().Connect(&application, functor);
+
+  application.ProcessEvent(GenerateDoubleTouch(PointState::DOWN, Vector2(20.0f, 50.0f), PointState::DOWN, Vector2(20.0f, 40.0f), 150));
+  application.ProcessEvent(GenerateDoubleTouch(PointState::MOTION, Vector2(40.0f, 50.0f), PointState::MOTION, Vector2(40.0f, 40.0f), 151));
+  application.ProcessEvent(GenerateDoubleTouch(PointState::MOTION, Vector2(50.0f, 50.0f), PointState::MOTION, Vector2(50.0f, 40.0f), 152));
+  application.ProcessEvent(GenerateDoubleTouch(PointState::MOTION, Vector2(60.0f, 50.0f), PointState::MOTION, Vector2(60.0f, 40.0f), 153));
+  application.ProcessEvent(GenerateDoubleTouch(PointState::MOTION, Vector2(70.0f, 50.0f), PointState::MOTION, Vector2(70.0f, 40.0f), 154));
+  application.ProcessEvent(GenerateSingleTouch(PointState::UP, Vector2(70.0f, 50.0f), 155));
+
+  application.SendNotification();
+
+  DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
+
+  END_TEST;
+}
+
+int UtcDaliPanGestureRecognizerNewParamsMaxMotionEventAge(void)
+{
+  TestApplication application;
+
+  PanGestureDetector detector = PanGestureDetector::New();
+
+  detector.SetMaximumMotionEventAge(1000);
+
+  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();
@@ -503,21 +548,45 @@ int UtcDaliPanGestureRecognizerNewParametersSlowRelease(void)
 
   detector.Attach(actor);
 
-  SignalData data;
+  SignalData             data;
   GestureReceivedFunctor functor(data);
   detector.DetectedSignal().Connect(&application, functor);
 
-  application.ProcessEvent( GenerateDoubleTouch( PointState::DOWN, Vector2( 20.0f, 50.0f ), PointState::DOWN, Vector2( 20.0f, 40.0f ), 150 ) );
-  application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 40.0f, 50.0f ), PointState::MOTION, Vector2( 40.0f, 40.0f ), 151 ) );
-  application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 50.0f, 50.0f ), PointState::MOTION, Vector2( 50.0f, 40.0f ), 152 ) );
-  application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 60.0f, 50.0f ), PointState::MOTION, Vector2( 60.0f, 40.0f ), 153 ) );
-  application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 70.0f, 50.0f ), PointState::MOTION, Vector2( 70.0f, 40.0f ), 154 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::UP, Vector2( 70.0f, 50.0f ), 155 ) );
+  uint32_t currentTime = GetMilliSeconds();
+  application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, Vector2(20.0f, 20.0f), currentTime));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 40.0f), currentTime));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 60.0f), currentTime));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 70.0f), currentTime));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 80.0f), currentTime));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 90.0f), currentTime));
 
   application.SendNotification();
 
   DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
 
+  data.Reset();
+
+  // Update current time
+  currentTime = GetMilliSeconds();
+
+  tet_infoline("Test fast enough motion\n");
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 80.0f), currentTime - 100));
+
+  DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
+
+  data.Reset();
+
+  // Update current time
+  currentTime = GetMilliSeconds();
+
+  tet_infoline("Test super heavy motion\n");
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 80.0f), currentTime - 10000));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 70.0f), currentTime - 9000));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 60.0f), currentTime - 8000));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 50.0f), currentTime - 7000));
+
+  DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
+
   END_TEST;
 }
 
@@ -528,9 +597,9 @@ int UtcDaliPanGestureRecognizerOtherEvent(void)
   PanGestureDetector detector = PanGestureDetector::New();
 
   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();
@@ -538,15 +607,15 @@ int UtcDaliPanGestureRecognizerOtherEvent(void)
 
   detector.Attach(actor);
 
-  SignalData data;
+  SignalData             data;
   GestureReceivedFunctor functor(data);
   detector.DetectedSignal().Connect(&application, functor);
 
-  application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 20.0f ), 150 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 40.0f ), 151 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 60.0f ), 152 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 60.0f ), 153 ) );      // Exercise default case in Started case. Not sure if realistic
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 65.0f ), 154 ) );
+  application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, Vector2(20.0f, 20.0f), 150));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 40.0f), 151));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 60.0f), 152));
+  application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, Vector2(20.0f, 60.0f), 153)); // Exercise default case in STARTED case. Not sure if realistic
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 65.0f), 154));
 
   application.SendNotification();
 
@@ -562,9 +631,9 @@ int UtcDaliPanGestureRecognizerSlowMoving(void)
   PanGestureDetector detector = PanGestureDetector::New();
 
   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();
@@ -572,16 +641,16 @@ int UtcDaliPanGestureRecognizerSlowMoving(void)
 
   detector.Attach(actor);
 
-  SignalData data;
+  SignalData             data;
   GestureReceivedFunctor functor(data);
   detector.DetectedSignal().Connect(&application, functor);
 
-  application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 20.0f ), 150 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 40.0f ), 251 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 60.0f ), 352 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 70.0f ), 453 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 80.0f ), 554 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 90.0f ), 655 ) );
+  application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, Vector2(20.0f, 20.0f), 150));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 40.0f), 251));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 60.0f), 352));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 70.0f), 453));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 80.0f), 554));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 90.0f), 655));
 
   application.SendNotification();
 
@@ -596,13 +665,49 @@ int UtcDaliPanGestureRecognizerNewParamsMinNum(void)
 
   Integration::SetPanGestureMinimumPanEvents(8);
 
+  PanGestureDetector detector = PanGestureDetector::New();
+
+  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();
+
+  detector.Attach(actor);
+
+  SignalData             data;
+  GestureReceivedFunctor functor(data);
+  detector.DetectedSignal().Connect(&application, functor);
+
+  application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, Vector2(20.0f, 20.0f), 150));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 40.0f), 251));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 60.0f), 352));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 70.0f), 453));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 80.0f), 554));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 90.0f), 655));
+
+  application.SendNotification();
+
+  DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
+
+  END_TEST;
+}
+
+int UtcDaliPanGestureRecognizerUpdateParamsMinNum(void)
+{
+  TestApplication application;
+
+  Integration::SetPanGestureMinimumPanEvents(8);
 
   PanGestureDetector detector = PanGestureDetector::New();
 
   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();
@@ -610,16 +715,34 @@ int UtcDaliPanGestureRecognizerNewParamsMinNum(void)
 
   detector.Attach(actor);
 
-  SignalData data;
+  SignalData             data;
   GestureReceivedFunctor functor(data);
   detector.DetectedSignal().Connect(&application, functor);
 
-  application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 20.0f ), 150 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 40.0f ), 251 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 60.0f ), 352 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 70.0f ), 453 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 80.0f ), 554 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 90.0f ), 655 ) );
+  application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, Vector2(20.0f, 20.0f), 150));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 40.0f), 251));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 60.0f), 352));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 70.0f), 453));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 80.0f), 554));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 90.0f), 655));
+
+  application.SendNotification();
+
+  DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
+  application.ProcessEvent(GenerateSingleTouch(PointState::UP, Vector2(20.0f, 90.0f), 756));
+  application.SendNotification();
+  data.Reset();
+
+  Integration::SetPanGestureMinimumPanEvents(10);
+
+  application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, Vector2(20.0f, 20.0f), 150));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 40.0f), 251));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 60.0f), 352));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 70.0f), 453));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 80.0f), 554));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 90.0f), 655));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 100.0f), 756));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 110.0f), 857));
 
   application.SendNotification();
 
@@ -628,6 +751,7 @@ int UtcDaliPanGestureRecognizerNewParamsMinNum(void)
   END_TEST;
 }
 
+
 int UtcDaliPanGestureRecognizerNewParamsMinDistance(void)
 {
   TestApplication application;
@@ -637,9 +761,9 @@ int UtcDaliPanGestureRecognizerNewParamsMinDistance(void)
   PanGestureDetector detector = PanGestureDetector::New();
 
   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();
@@ -647,16 +771,72 @@ int UtcDaliPanGestureRecognizerNewParamsMinDistance(void)
 
   detector.Attach(actor);
 
-  SignalData data;
+  SignalData             data;
   GestureReceivedFunctor functor(data);
   detector.DetectedSignal().Connect(&application, functor);
 
-  application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 20.0f ), 150 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 40.0f ), 251 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 60.0f ), 352 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 70.0f ), 453 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 80.0f ), 554 ) );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 90.0f ), 655 ) );
+  application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, Vector2(20.0f, 20.0f), 150));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 40.0f), 251));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 60.0f), 352));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 70.0f), 453));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 80.0f), 554));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 90.0f), 655));
+
+  application.SendNotification();
+
+  DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
+
+  END_TEST;
+}
+
+int UtcDaliPanGestureRecognizerUpdateParamsMinDistance(void)
+{
+  TestApplication application;
+
+  Integration::SetPanGestureMinimumDistance(100);
+
+  PanGestureDetector detector = PanGestureDetector::New();
+
+  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();
+
+  detector.Attach(actor);
+
+  SignalData             data;
+  GestureReceivedFunctor functor(data);
+  detector.DetectedSignal().Connect(&application, functor);
+
+  application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, Vector2(20.0f, 20.0f), 150));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 40.0f), 251));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 60.0f), 352));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 70.0f), 453));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 80.0f), 554));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 90.0f), 655));
+
+  application.SendNotification();
+
+  DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
+  application.ProcessEvent(GenerateSingleTouch(PointState::UP, Vector2(20.0f, 90.0f), 756));
+  application.SendNotification();
+  data.Reset();
+
+  Integration::SetPanGestureMinimumDistance(130);
+
+  application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, Vector2(20.0f, 20.0f), 150));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 40.0f), 251));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 60.0f), 352));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 70.0f), 453));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 80.0f), 554));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 90.0f), 655));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 100.0f),756));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 110.0f),857));
+  application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(20.0f, 120.0f),858));
 
   application.SendNotification();