X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali%2Futc-Dali-PanGestureDetector.cpp;h=dc0a402263175aa0d1265af695a20ed4e13e36be;hb=197334092bf0d0a91cd3b28db7d346e2a024cb64;hp=0767ab2dc64efd100a85285ac8acb62e868d85ad;hpb=4dfbc238a8f0f3aeb9de6a800aaea460972a6b40;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp b/automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp index 0767ab2..dc0a402 100644 --- a/automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp +++ b/automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. @@ -21,8 +21,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -174,26 +173,6 @@ struct PanConstraint ConstraintData& constraintData; }; -// Generate a PanGestureEvent to send to Core -Integration::PanGestureEvent GeneratePan( - Gesture::State state, - Vector2 previousPosition, - Vector2 currentPosition, - unsigned long timeDelta, - unsigned int numberOfTouches = 1, - unsigned int time = 1u) -{ - Integration::PanGestureEvent pan(state); - - pan.previousPosition = previousPosition; - pan.currentPosition = currentPosition; - pan.timeDelta = timeDelta; - pan.numberOfTouches = numberOfTouches; - pan.time = time; - - return pan; -} - // Generate a PanGesture PanGesture GeneratePan( unsigned int time, Gesture::State state, @@ -223,67 +202,6 @@ PanGesture GeneratePan( unsigned int time, return pan; } -/** - * Helper to generate PanGestureEvent - * - * @param[in] application Application instance - * @param[in] state The Gesture State - * @param[in] pos The current position of touch. - */ -static void SendPan(TestApplication& application, Gesture::State state, const Vector2& pos) -{ - static Vector2 last; - static int LastTime = 0; - - if( (state == Gesture::Started) || - (state == Gesture::Possible) ) - { - last.x = pos.x; - last.y = pos.y; - } - - application.ProcessEvent(GeneratePan(state, last, pos, PAN_EVENT_TIME_DELTA)); - - last.x = pos.x; - last.y = pos.y; - LastTime += PAN_EVENT_TIME_DELTA; -} - -static Vector2 PerformSwipeGestureSwipe(TestApplication& application, Vector2 startPosition, Vector2 direction, int frames, int eventsPerFrame, - bool start, bool finish, unsigned int renderInterval = TestApplication::DEFAULT_RENDER_INTERVAL) -{ - // Now do a pan starting from (start) and heading (direction) - Vector2 pos(startPosition); - - if( start ) - { - SendPan(application, Gesture::Possible, pos); - SendPan(application, Gesture::Started, pos); - application.SendNotification(); - application.Render(renderInterval); - } - - for(int i = 0;i