Revert "[3.0] Added test cases and removed dead code" 97/83197/1
authortaeyoon <taeyoon0.lee@samsung.com>
Tue, 9 Aug 2016 11:22:40 +0000 (20:22 +0900)
committertaeyoon <taeyoon0.lee@samsung.com>
Tue, 9 Aug 2016 11:22:55 +0000 (20:22 +0900)
This reverts commit 5c05262492f136744fd1d58c0f80fd1bf30516a2.

Change-Id: I7bbee044a4ffc53b0b257ca86841b43e68d279ec

14 files changed:
automated-tests/execute.sh
automated-tests/src/dali-toolkit/utc-Dali-AccessibilityManager.cpp
automated-tests/src/dali-toolkit/utc-Dali-ItemView.cpp
automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp
automated-tests/src/dali-toolkit/utc-Dali-ScrollViewEffect.cpp
automated-tests/src/dali-toolkit/utc-Dali-Slider.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp
dali-toolkit/internal/controls/model3d-view/model3d-view-impl.cpp
dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp
dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.h
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.h
dali-toolkit/internal/controls/scrollable/scrollable-impl.h
packaging/dali-toolkit.spec

index 989560f..bc108fa 100755 (executable)
@@ -138,7 +138,9 @@ else
             ret=$?
             if [ $ret -ne 6 ] ; then
                 if [ $opt_debug -ne 0 ] ; then
-                    gdb --args build/src/$mod/tct-$mod-core $1
+                    if [ $ret -eq 0 ] ; then
+                        gdb --args build/src/$mod/tct-$mod-core $1
+                    fi
                 else
                     echo $output
                     if [ $ret -eq 0 ] ; then echo -e "\nPassed" ; fi
index 6cdb503..238f67f 100644 (file)
@@ -1282,16 +1282,6 @@ int UtcDaliAccessibilityManagerActionActivateSignalP(void)
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
-  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
-  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
-  accAdaptor.HandleActionEnableEvent();
-
-  Dali::Toolkit::PushButton button = Dali::Toolkit::PushButton::New();
-  button.SetSize(480, 800);
-  Stage::GetCurrent().Add(button);
-  manager.SetFocusOrder( button, 1 );
-  manager.SetCurrentFocusActor( button );
-
   manager.ActionActivateSignal().Connect( &callback, &AccessibilityManagerSignalHandler::Callback );
 
   Dali::AccessibilityAdaptor accessibilityAdaptor = Dali::AccessibilityAdaptor::Get();
@@ -1540,11 +1530,11 @@ int UtcDaliAccessibilityManagerActionDownSignalP(void)
 
   manager.ActionDownSignal().Connect( &callback, &AccessibilityManagerSignalHandler::Callback );
 
-  Dali::Toolkit::PushButton button = Dali::Toolkit::PushButton::New();
-  button.SetSize(480, 800);
-  Stage::GetCurrent().Add(button);
-  manager.SetFocusOrder( button, 1 );
-  manager.SetCurrentFocusActor( button );
+  DummyControl dummyControl = DummyControl::New(true);
+  dummyControl.SetSize(480, 800);
+  manager.SetFocusOrder( dummyControl, 1 );
+  Stage::GetCurrent().Add( dummyControl );
+  manager.SetCurrentFocusActor( dummyControl );
 
   accessibilityAdaptor.HandleActionDownEvent();
 
@@ -2064,19 +2054,13 @@ int UtcDaliAccessibilityManagerActionZoomSignalP(void)
 
   AccessibilityManagerSignalHandler callback;
 
-  AccessibilityManager manager = AccessibilityManager::Get();
-  DALI_TEST_CHECK( manager );
-
-  Dali::Toolkit::PushButton button = Dali::Toolkit::PushButton::New();
-  button.SetSize(480, 800);
-  Stage::GetCurrent().Add(button);
-  manager.SetFocusOrder( button, 1 );
-  manager.SetCurrentFocusActor( button );
-
   Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
   Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
   accAdaptor.HandleActionEnableEvent();
 
+  AccessibilityManager manager = AccessibilityManager::Get();
+  DALI_TEST_CHECK( manager );
+
   manager.ActionZoomSignal().Connect( &callback, &AccessibilityManagerSignalHandler::Callback );
 
   Dali::AccessibilityAdaptor accessibilityAdaptor = Dali::AccessibilityAdaptor::Get();
index 8be97fe..b1fd832 100644 (file)
 // Need to override adaptor classes for toolkit test harness, so include
 // test harness headers before dali headers.
 #include <dali-toolkit-test-suite-utils.h>
-#include <dali-toolkit/dali-toolkit.h>
-#include <dali/integration-api/events/touch-event-integ.h>
-#include <dali/integration-api/events/pan-gesture-event.h>
 
+#include <dali-toolkit/dali-toolkit.h>
 
 using namespace Dali;
 using namespace Toolkit;
@@ -61,48 +59,6 @@ static void OnLayoutActivated()
   gOnLayoutActivatedCalled = true;
 }
 
-// Generate a PanGestureEvent to send to Core
-Integration::PanGestureEvent GeneratePan(
-    Gesture::State state,
-    const Vector2& previousPosition,
-    const Vector2& currentPosition,
-    unsigned long timeDelta,
-    unsigned int numberOfTouches = 1)
-{
-  Integration::PanGestureEvent pan(state);
-
-  pan.previousPosition = previousPosition;
-  pan.currentPosition = currentPosition;
-  pan.timeDelta = timeDelta;
-  pan.numberOfTouches = numberOfTouches;
-
-  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(ToolkitTestApplication& application, Gesture::State state, const Vector2& pos)
-{
-  static Vector2 last;
-
-  if( (state == Gesture::Started) ||
-      (state == Gesture::Possible) )
-  {
-    last.x = pos.x;
-    last.y = pos.y;
-  }
-
-  application.ProcessEvent(GeneratePan(state, last, pos, RENDER_FRAME_INTERVAL));
-
-  last.x = pos.x;
-  last.y = pos.y;
-}
-
 /*
  * Simulate time passed by.
  *
@@ -970,126 +926,3 @@ int UtcDaliItemViewSetGetProperty(void)
   END_TEST;
 }
 
-
-int UtcDaliItemViewOvershootVertical(void)
-{
-  ToolkitTestApplication application;
-  Dali::Stage stage = Dali::Stage::GetCurrent();
-
-  // Create the ItemView actor
-  TestItemFactory factory;
-  ItemView view = ItemView::New(factory);
-
-  // Create a grid layout and add it to ItemView
-  ItemLayoutPtr gridLayout = DefaultItemLayout::New( DefaultItemLayout::GRID );
-  view.AddLayout(*gridLayout);
-  stage.Add(view);
-
-  // Activate the grid layout so that the items will be created and added to ItemView
-  Vector3 stageSize(stage.GetSize());
-  view.ActivateLayout(0, stageSize, 0.5f);
-
-  view.SetProperty( Scrollable::Property::OVERSHOOT_ENABLED, true );
-  DALI_TEST_EQUALS( view.GetProperty(Scrollable::Property::OVERSHOOT_ENABLED).Get<bool>(), true, TEST_LOCATION );
-
-  view.SetProperty( Scrollable::Property::OVERSHOOT_SIZE, Vector2(30, 30) );
-
-  Wait(application);
-
-  // Do a pan starting from 100,100 and moving down
-  Vector2 pos(100.0f, 100.0f);
-  SendPan(application, Gesture::Possible, pos);
-  SendPan(application, Gesture::Started, pos);
-  pos.y += 5.0f;
-  Wait(application, 100);
-
-  for(int i = 0;i<200;i++)
-  {
-    SendPan(application, Gesture::Continuing, pos);
-    pos.y += 5.0f;
-    Wait(application);
-  }
-
-  SendPan(application, Gesture::Finished, pos);
-  Wait(application, 100);
-
-  // Do a pan starting from 100,100 and moving up
-  pos = Vector2(100.0f, 300.0f);
-  SendPan(application, Gesture::Possible, pos);
-  SendPan(application, Gesture::Started, pos);
-  pos.y -= 5.0f;
-  Wait(application, 100);
-
-  for(int i = 0;i<200;i++)
-  {
-    SendPan(application, Gesture::Continuing, pos);
-    pos.y -= 5.0f;
-    Wait(application);
-  }
-
-  SendPan(application, Gesture::Finished, pos);
-  Wait(application, 100);
-  END_TEST;
-}
-
-int UtcDaliItemViewOvershootHorizontal(void)
-{
-  ToolkitTestApplication application;
-  Dali::Stage stage = Dali::Stage::GetCurrent();
-
-  // Create the ItemView actor
-  TestItemFactory factory;
-  ItemView view = ItemView::New(factory);
-
-  // Create a grid layout and add it to ItemView
-  ItemLayoutPtr gridLayout = DefaultItemLayout::New( DefaultItemLayout::SPIRAL );
-  view.AddLayout(*gridLayout);
-  stage.Add(view);
-
-  // Activate the grid layout so that the items will be created and added to ItemView
-  Vector3 stageSize(stage.GetSize());
-  view.ActivateLayout(0, stageSize, 0.5f);
-
-  view.SetProperty( Scrollable::Property::OVERSHOOT_ENABLED, true );
-  DALI_TEST_EQUALS( view.GetProperty(Scrollable::Property::OVERSHOOT_ENABLED).Get<bool>(), true, TEST_LOCATION );
-
-  view.SetProperty( Scrollable::Property::OVERSHOOT_SIZE, Vector2(30, 30) );
-
-  Wait(application);
-
-  // Do a pan starting from 100,100 and moving left
-  Vector2 pos(100.0f, 100.0f);
-  SendPan(application, Gesture::Possible, pos);
-  SendPan(application, Gesture::Started, pos);
-  pos.x -= 5.0f;
-  Wait(application, 100);
-
-  for(int i = 0;i<200;i++)
-  {
-    SendPan(application, Gesture::Continuing, pos);
-    pos.x -= 5.0f;
-    Wait(application);
-  }
-
-  SendPan(application, Gesture::Finished, pos);
-  Wait(application, 100);
-
-  // Do a pan starting from 100,100 and moving right
-  pos = Vector2(100.0f, 100.0f);
-  SendPan(application, Gesture::Possible, pos);
-  SendPan(application, Gesture::Started, pos);
-  pos.x += 5.0f;
-  Wait(application, 100);
-
-  for(int i = 0;i<200;i++)
-  {
-    SendPan(application, Gesture::Continuing, pos);
-    pos.x += 5.0f;
-    Wait(application);
-  }
-
-  SendPan(application, Gesture::Finished, pos);
-  Wait(application, 100);
-
-  END_TEST;
-}
index 3b4038e..ee941cc 100644 (file)
@@ -44,24 +44,10 @@ static void TestCallback(BaseHandle handle)
   gObjectCreatedCallBackCalled = true;
 }
 
-struct CallbackFunctor
-{
-  CallbackFunctor(bool* callbackFlag)
-  : mCallbackFlag( callbackFlag )
-  {
-  }
-
-  void operator()()
-  {
-    *mCallbackFlag = true;
-  }
-  bool* mCallbackFlag;
-};
 
 const int MILLISECONDS_PER_SECOND = 1000;
 const int RENDER_FRAME_INTERVAL = 16;                           ///< Duration of each frame in ms. (at approx 60FPS)
 const int RENDER_ANIMATION_TEST_DURATION_MS = 1000;             ///< 1000ms to test animation
-
 const int RENDER_DELAY_SCROLL = 1000;                           ///< duration to wait for any scroll to complete.
 
 // For Clamp Signal testing...
@@ -325,10 +311,10 @@ int UtcDaliScrollViewDestructorP(void)
   END_TEST;
 }
 
-int UtcDaliToolkitScrollViewNewP1(void)
+int UtcDaliToolkitScrollViewNewP(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" UtcDaliToolkitScrollViewNewP1");
+  tet_infoline(" UtcDaliToolkitScrollViewNewP");
 
   ScrollView scrollView;
 
@@ -355,25 +341,6 @@ int UtcDaliToolkitScrollViewNewP1(void)
   END_TEST;
 }
 
-int UtcDaliToolkitScrollViewNewP2(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliToolkitScrollViewNewP2 - create thru type registry");
-
-  ScrollView scrollView;
-  DALI_TEST_CHECK( !scrollView );
-
-  TypeRegistry typeRegistry = TypeRegistry::Get();
-  TypeInfo scrollViewType = typeRegistry.GetTypeInfo("ScrollView");
-  BaseHandle handle = scrollViewType.CreateInstance();
-  DALI_TEST_CHECK( handle );
-
-  scrollView = ScrollView::DownCast(handle);
-  DALI_TEST_CHECK( scrollView );
-
-  END_TEST;
-}
-
 int UtcDaliToolkitScrollViewDownCastP(void)
 {
   ToolkitTestApplication application;
@@ -427,9 +394,6 @@ int UtcDaliToolkitScrollViewScrollToPositionWithDirectionBiasP(void)
 
   scrollView.SetWrapMode(true);
 
-  Property::Value wrapMode = scrollView.GetProperty( Toolkit::ScrollView::Property::WRAP_ENABLED );
-  DALI_TEST_EQUALS( wrapMode.Get<bool>(), true, TEST_LOCATION );
-
   const Vector2 target = Vector2(50.0f, 50.0f);
   const Vector2 target2 = Vector2(150.0f, 150.0f);
 
@@ -821,7 +785,7 @@ int UtcDaliToolkitScrollViewSignalsStartComplete(void)
   END_TEST;
 }
 
-int UtcDaliToolkitScrollViewSignalsUpdate01(void)
+int UtcDaliToolkitScrollViewSignalsUpdate(void)
 {
   ToolkitTestApplication application;
   tet_infoline(" UtcDaliToolkitScrollViewSignalsUpdate");
@@ -881,73 +845,6 @@ int UtcDaliToolkitScrollViewSignalsUpdate01(void)
   END_TEST;
 }
 
-int UtcDaliToolkitScrollViewSignalsUpdate02(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliToolkitScrollViewSignalsUpdate");
-
-  gOnScrollStartCalled = false;
-  gOnScrollUpdateCalled = false;
-  gOnScrollCompleteCalled = false;
-
-  ScrollView scrollView = ScrollView::New();
-  Stage::GetCurrent().Add( scrollView );
-  Vector2 stageSize = Stage::GetCurrent().GetSize();
-  scrollView.SetSize(stageSize);
-  scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT);
-  scrollView.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-
-  // Position rulers.
-  RulerPtr rulerX = new DefaultRuler();
-  RulerPtr rulerY = new DefaultRuler();
-  rulerX->SetDomain( RulerDomain(0.0f, 1000.0f, false) );
-  rulerY->SetDomain( RulerDomain(0.0f, 1000.0f, false) );
-  scrollView.SetRulerX(rulerX);
-  scrollView.SetRulerY(rulerY);
-  Dali::ConnectionTracker tracker;
-  bool scrollStarted=false;
-  bool scrollUpdated=false;
-  bool scrollCompleted=false;
-  DALI_TEST_CHECK(scrollView.ConnectSignal( &tracker, "scrollStarted", CallbackFunctor(&scrollStarted) ));
-  DALI_TEST_CHECK(scrollView.ConnectSignal( &tracker, "scrollUpdated", CallbackFunctor(&scrollUpdated) ));
-  DALI_TEST_CHECK(scrollView.ConnectSignal( &tracker, "scrollCompleted", CallbackFunctor(&scrollCompleted) ));
-
-  Actor image = Actor::New();
-  image.SetSize(stageSize);
-  image.SetParentOrigin(ParentOrigin::TOP_LEFT);
-  image.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  scrollView.Add(image);
-
-  Wait(application);
-
-  // Do a pan starting from 100,100 and moving down diagonally.
-  Vector2 pos(100.0f, 100.0f);
-  SendPan(application, Gesture::Possible, pos);
-  SendPan(application, Gesture::Started, pos);
-  pos.x += 5.0f;
-  pos.y += 5.0f;
-  Wait(application, 100);
-
-  for(int i = 0;i<20;i++)
-  {
-    SendPan(application, Gesture::Continuing, pos);
-    pos.x += 5.0f;
-    pos.y += 5.0f;
-    Wait(application);
-  }
-
-  SendPan(application, Gesture::Finished, pos);
-  Wait(application, RENDER_DELAY_SCROLL);
-
-  DALI_TEST_CHECK(scrollStarted);
-  DALI_TEST_CHECK(scrollUpdated);
-  DALI_TEST_CHECK(scrollCompleted);
-
-  Stage::GetCurrent().Remove( scrollView );
-
-  END_TEST;
-}
-
 static Vector2 PerformGestureDiagonalSwipe(ToolkitTestApplication& application, Vector2 start, Vector2 direction, int frames, bool finish = true)
 {
   gOnScrollStartCalled = false;
@@ -2388,9 +2285,6 @@ int UtcDaliToolkitScrollViewConstraintsWrap(void)
   Wait(application, RENDER_DELAY_SCROLL);
   DALI_TEST_EQUALS( scrollView.GetCurrentScrollPosition(), target2, TEST_LOCATION );
 
-  scrollView.Remove(a);
-  Wait(application);
-
   END_TEST;
 }
 
index 023224f..15799d9 100644 (file)
@@ -100,28 +100,21 @@ int UtcDaliSliderDownCast(void)
   END_TEST;
 }
 
-static bool gSliderValueChangedCallBackCalled=false;
+static bool gSliderValueChangedCallBackCalled;
 static bool OnSliderValueChanged( Slider slider, float value )
 {
   gSliderValueChangedCallBackCalled = true;
   return true;
 }
 
-static bool gSliderMarkCallBackCalled=false;
+static bool gSliderMarkCallBackCalled;
 static bool OnSliderMark( Slider slider, int value )
 {
   gSliderMarkCallBackCalled = true;
   return true;
 }
 
-static bool gSliderSlidingFinishedCallBackCalled=false;
-static bool OnSlidingFinished( Slider slider, float value )
-{
-  gSliderSlidingFinishedCallBackCalled = true;
-  return true;
-}
-
-int UtcDaliSliderSignals1(void)
+int UtcDaliSliderSignals(void)
 {
   ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
   tet_infoline(" UtcDaliSliderSignals");
@@ -147,55 +140,42 @@ int UtcDaliSliderSignals1(void)
 
   slider.ValueChangedSignal().Connect( &OnSliderValueChanged );
   slider.MarkReachedSignal().Connect( &OnSliderMark );
-  slider.SlidingFinishedSignal().Connect( &OnSlidingFinished );
 
   application.SendNotification();
   application.Render();
 
   gSliderValueChangedCallBackCalled = false;
   gSliderMarkCallBackCalled = false;
-  gSliderSlidingFinishedCallBackCalled = false;
 
-  {
-    Dali::Integration::TouchEvent event = Dali::Integration::TouchEvent();
-    Integration::Point pointDown;
-    pointDown.SetState( PointState::DOWN );
-    pointDown.SetScreenPosition( Vector2( 10.0f, 10.0f ) );
-    event.AddPoint( pointDown );
-
-    application.ProcessEvent( event );
-    application.SendNotification();
-    application.Render();
-  }
+  Dali::Integration::TouchEvent event;
+
+  event = Dali::Integration::TouchEvent();
+
+  Integration::Point pointDown;
+  pointDown.SetState( PointState::DOWN );
+  pointDown.SetScreenPosition( Vector2( 10.0f, 10.0f ) );
+  event.AddPoint( pointDown );
 
   for( int i = 0; i < 5; ++i )
   {
-    Dali::Integration::TouchEvent event = Dali::Integration::TouchEvent();
     Integration::Point pointMotion;
     pointMotion.SetState( PointState::MOTION );
     pointMotion.SetScreenPosition( Vector2( 10.0f + i * 10.0f, 10.0f ) );
     event.AddPoint( pointMotion );
-
-    application.ProcessEvent( event );
-    application.SendNotification();
-    application.Render();
   }
 
-  {
-    Dali::Integration::TouchEvent event = Dali::Integration::TouchEvent();
-    Integration::Point pointUp;
-    pointUp.SetState( PointState::UP );
-    pointUp.SetScreenPosition( Vector2( 10.0f, 10.0f ) );
-    event.AddPoint( pointUp );
-
-    application.ProcessEvent( event );
-    application.SendNotification();
-    application.Render();
-  }
+  Integration::Point pointUp;
+  pointUp.SetState( PointState::UP );
+  pointUp.SetScreenPosition( Vector2( 10.0f, 10.0f ) );
+  event.AddPoint( pointUp );
+
+  application.ProcessEvent( event );
+
+  application.SendNotification();
+  application.Render();
 
   DALI_TEST_CHECK(gSliderValueChangedCallBackCalled);
   DALI_TEST_CHECK(gSliderMarkCallBackCalled);
-  DALI_TEST_CHECK(gSliderSlidingFinishedCallBackCalled);
   END_TEST;
 }
 
index 3cef498..1bcbe2b 100644 (file)
@@ -20,8 +20,6 @@
 #include <dali/devel-api/rendering/renderer.h>
 #include <dali/integration-api/events/key-event-integ.h>
 #include <dali/integration-api/events/tap-gesture-event.h>
-#include <dali/integration-api/events/touch-event-integ.h>
-#include <dali/integration-api/events/pan-gesture-event.h>
 #include <dali-toolkit-test-suite-utils.h>
 #include <dali-toolkit/dali-toolkit.h>
 
@@ -96,8 +94,6 @@ const Vector4 PLACEHOLDER_TEXT_COLOR( 0.8f, 0.8f, 0.8f, 0.8f );
 const Dali::Vector4 LIGHT_BLUE( 0.75f, 0.96f, 1.f, 1.f ); // The text highlight color.
 
 const unsigned int CURSOR_BLINK_INTERVAL = 500u; // Cursor blink interval
-const float RENDER_FRAME_INTERVAL = 16.66f;
-
 const float TO_MILLISECONDS = 1000.f;
 const float TO_SECONDS = 1.f / TO_MILLISECONDS;
 
@@ -107,105 +103,6 @@ const float SCROLL_SPEED = 300.f;
 static bool gTextChangedCallBackCalled;
 static bool gMaxCharactersCallBackCalled;
 
-static void LoadBitmapResource(TestPlatformAbstraction& platform, int width, int height)
-{
-  Integration::ResourceRequest* request = platform.GetRequest();
-  Integration::Bitmap* bitmap = Integration::Bitmap::New( Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::OWNED_DISCARD );
-  Integration::ResourcePointer resource(bitmap);
-  bitmap->GetPackedPixelsProfile()->ReserveBuffer(Pixel::RGBA8888, width, height, width, height);
-
-  if(request)
-  {
-    platform.SetResourceLoaded(request->GetId(), request->GetType()->id, resource);
-  }
-}
-
-static void LoadMarkerImages(ToolkitTestApplication& app, TextField textField)
-{
-  int width(40);
-  int height(40);
-  LoadBitmapResource( app.GetPlatform(), width, height );
-
-  Property::Map propertyMap;
-  propertyMap["filename"] = "image.png";
-  propertyMap["width"] = width;
-  propertyMap["height"] = height;
-  textField.SetProperty( Toolkit::TextField::Property::SELECTION_HANDLE_IMAGE_LEFT, propertyMap );
-  textField.SetProperty( Toolkit::TextField::Property::SELECTION_HANDLE_IMAGE_RIGHT, propertyMap );
-  textField.SetProperty( Toolkit::TextField::Property::SELECTION_HANDLE_PRESSED_IMAGE_LEFT, propertyMap );
-  textField.SetProperty( Toolkit::TextField::Property::SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, propertyMap );
-  textField.SetProperty( Toolkit::TextField::Property::SELECTION_HANDLE_MARKER_IMAGE_LEFT, propertyMap );
-  textField.SetProperty( Toolkit::TextField::Property::SELECTION_HANDLE_MARKER_IMAGE_RIGHT, propertyMap );
-  textField.SetProperty( Toolkit::TextField::Property::GRAB_HANDLE_IMAGE, propertyMap );
-  textField.SetProperty( Toolkit::TextField::Property::GRAB_HANDLE_PRESSED_IMAGE, propertyMap );
-}
-
-// Generate a PanGestureEvent to send to Core
-static Integration::PanGestureEvent GeneratePan(
-    Gesture::State state,
-    const Vector2& previousPosition,
-    const Vector2& currentPosition,
-    unsigned long timeDelta,
-    unsigned int numberOfTouches = 1)
-{
-  Integration::PanGestureEvent pan(state);
-
-  pan.previousPosition = previousPosition;
-  pan.currentPosition = currentPosition;
-  pan.timeDelta = timeDelta;
-  pan.numberOfTouches = numberOfTouches;
-
-  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(ToolkitTestApplication& application, Gesture::State state, const Vector2& pos)
-{
-  static Vector2 last;
-
-  if( (state == Gesture::Started) ||
-      (state == Gesture::Possible) )
-  {
-    last.x = pos.x;
-    last.y = pos.y;
-  }
-
-  application.ProcessEvent(GeneratePan(state, last, pos, 16));
-
-  last.x = pos.x;
-  last.y = pos.y;
-}
-
-/*
- * Simulate time passed by.
- *
- * @note this will always process at least 1 frame (1/60 sec)
- *
- * @param application Test application instance
- * @param duration Time to pass in milliseconds.
- * @return The actual time passed in milliseconds
- */
-static int Wait(ToolkitTestApplication& application, int duration = 0)
-{
-  int time = 0;
-
-  for(int i = 0; i <= ( duration / RENDER_FRAME_INTERVAL); i++)
-  {
-    application.SendNotification();
-    application.Render(RENDER_FRAME_INTERVAL);
-    time += RENDER_FRAME_INTERVAL;
-  }
-
-  return time;
-}
-
-
 static void TestTextChangedCallback( TextField control )
 {
   tet_infoline(" TestTextChangedCallback");
@@ -796,7 +693,6 @@ int utcDaliTextFieldEvent02(void)
   TextField field = TextField::New();
   field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
   DALI_TEST_CHECK( field );
-  LoadMarkerImages(application, field);
 
   Stage::GetCurrent().Add( field );
 
@@ -948,7 +844,6 @@ int utcDaliTextFieldEvent03(void)
 
   // Avoid a crash when core load gl resources.
   application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
-  LoadMarkerImages(application, field);
 
   // Render and notify
   application.SendNotification();
@@ -985,132 +880,3 @@ int utcDaliTextFieldEvent03(void)
 
   END_TEST;
 }
-
-int utcDaliTextFieldEvent04(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldEvent04");
-
-  // Checks if the highlight actor is created.
-
-  TextField field = TextField::New();
-  DALI_TEST_CHECK( field );
-  Stage::GetCurrent().Add( field );
-  LoadMarkerImages(application, field);
-  // Render and notify
-  application.SendNotification();
-  application.Render();
-
-  field.SetProperty( TextField::Property::TEXT, "This is a long text for the size of the text-field." );
-  field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
-  field.SetSize( 300.f, 50.f );
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-
-  // Avoid a crash when core load gl resources.
-  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
-  // Render and notify
-  application.SendNotification();
-  application.Render();
-
-  // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
-  // Render and notify
-  application.SendNotification();
-  application.Render();
-
-
-  // Tap first to get the focus.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
-
-  // Render and notify
-  application.SendNotification();
-  application.Render();
-
-  // Double tap to select a word.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 2u, 1u, Vector2( 1.f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 2u, 1u, Vector2( 1.f, 25.0f ) ) );
-
-  // Render and notify
-  application.SendNotification();
-  application.Render();
-
-  // Tap grab handle
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 0.f, 40.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 0.f, 40.0f ) ) );
-  END_TEST;
-}
-
-int utcDaliTextFieldEvent05(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldEvent05");
-
-  // Checks if the highlight actor is created.
-
-  TextField field = TextField::New();
-  DALI_TEST_CHECK( field );
-  Stage::GetCurrent().Add( field );
-  LoadMarkerImages(application, field);
-  // Render and notify
-  application.SendNotification();
-  application.Render();
-
-  field.SetProperty( TextField::Property::TEXT, "This is a long text for the size of the text-field." );
-  field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
-  field.SetSize( 300.f, 50.f );
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-
-  // Avoid a crash when core load gl resources.
-  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
-  // Render and notify
-  application.SendNotification();
-  application.Render();
-
-  // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
-  // Render and notify
-  application.SendNotification();
-  application.Render();
-
-
-  // Tap first to get the focus.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
-
-  // Render and notify
-  application.SendNotification();
-  application.Render();
-
-  // Double tap to select a word.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 2u, 1u, Vector2( 1.f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 2u, 1u, Vector2( 1.f, 25.0f ) ) );
-
-  // Render and notify
-  application.SendNotification();
-  application.Render();
-
-  // drag grab handle right
-  Vector2 pos(0.0f, 40.0f);
-  SendPan(application, Gesture::Possible, pos);
-  SendPan(application, Gesture::Started, pos);
-  pos.x += 5.0f;
-  Wait(application, 100);
-
-  for(int i = 0;i<20;i++)
-  {
-    SendPan(application, Gesture::Continuing, pos);
-    pos.x += 5.0f;
-    Wait(application);
-  }
-
-  SendPan(application, Gesture::Finished, pos);
-  Wait(application, RENDER_FRAME_INTERVAL);
-
-  Actor offscreenRoot = field.GetChildAt( 1u );
-  END_TEST;
-}
index be409da..d395fb2 100644 (file)
@@ -247,6 +247,21 @@ const char* NRMMAP_FRAGMENT_SHADER = MAKE_SHADER(
 
 using namespace Dali;
 
+void LookAt(Matrix& result, const Vector3& eye, const Vector3& target, const Vector3& up)
+{
+  Vector3 vZ = target - eye;
+  vZ.Normalize();
+
+  Vector3 vX = up.Cross(vZ);
+  vX.Normalize();
+
+  Vector3 vY = vZ.Cross(vX);
+  vY.Normalize();
+
+  result.SetInverseTransformComponents(vX, vY, vZ, eye);
+}
+
+
 Model3dView::Model3dView()
   : Control( ControlBehaviour( ACTOR_BEHAVIOUR_NONE ) )
 {
index 76b0bba..2f13c17 100644 (file)
@@ -1440,6 +1440,16 @@ void ItemView::CalculateDomainSize(const Vector3& layoutSize)
   }
 }
 
+Vector2 ItemView::GetDomainSize() const
+{
+  Actor self = Self();
+
+  float minScrollPosition = self.GetProperty<float>(Toolkit::Scrollable::Property::SCROLL_POSITION_MIN_Y);
+  float maxScrollPosition = self.GetProperty<float>(Toolkit::Scrollable::Property::SCROLL_POSITION_MAX_Y);
+
+  return Vector2(0.0f, fabs(GetScrollPosition(minScrollPosition, self.GetCurrentSize()) - GetScrollPosition(-maxScrollPosition, self.GetCurrentSize())));
+}
+
 bool ItemView::IsLayoutScrollable(const Vector3& layoutSize)
 {
   Actor self = Self();
index c076dce..3d31e1c 100644 (file)
@@ -216,6 +216,11 @@ public:
   void ReplaceItems(const ItemContainer& replacementItems, float durationSeconds);
 
   /**
+   * @copydoc Toolkit::Scrollable::GetDomainSize
+   */
+  Vector2 GetDomainSize() const;
+
+  /**
    * @copydoc Toolkit::Scrollable::GetCurrentScrollPosition
    */
   Vector2 GetCurrentScrollPosition() const;
index 853abe2..4cc2393 100644 (file)
@@ -1175,6 +1175,19 @@ Vector2 ScrollView::GetCurrentScrollPosition() const
   return -GetPropertyPosition();
 }
 
+Vector2 ScrollView::GetDomainSize() const
+{
+  Vector3 size = Self().GetCurrentSize();
+
+  const RulerDomain& xDomain = GetRulerX()->GetDomain();
+  const RulerDomain& yDomain = GetRulerY()->GetDomain();
+
+  Vector2 domainSize;
+  domainSize.x = xDomain.max - xDomain.min - size.x;
+  domainSize.y = yDomain.max - yDomain.min - size.y;
+  return domainSize;
+}
+
 void ScrollView::TransformTo(const Vector2& position,
                              DirectionBias horizontalBias, DirectionBias verticalBias)
 {
index 998f6c3..b9db77d 100644 (file)
@@ -364,6 +364,11 @@ public:
   Vector2 GetCurrentScrollPosition() const;
 
   /**
+   * @copydoc Toolkit::Scrollable::GetDomainSize
+   */
+  Vector2 GetDomainSize() const;
+
+  /**
    * @copydoc ScrollTo(const Vector2&)
    */
   void TransformTo(const Vector2& position,
index 660606c..0d5d045 100644 (file)
@@ -55,6 +55,12 @@ public:
   void SetOvershootEnabled(bool enable);
 
   /**
+   * Gets the size of the domain (minimum/maximum extents for each axis to scroll to)
+   * @return the domain size
+   */
+  virtual Vector2 GetDomainSize() const = 0;
+
+  /**
    * Adds actor as an Overlay to Scrollable
    * This method is called by Add-on UI components
    * such as scroll bars, page indicators.
index 04181b0..7ec107a 100644 (file)
@@ -82,11 +82,6 @@ PREFIX="/usr"
 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
 
-%if 0%{?enable_coverage}
-CXXFLAGS+=" --coverage "
-LDFLAGS+=" --coverage "
-%endif
-
 libtoolize --force
 cd %{_builddir}/dali-toolkit-%{version}/build/tizen
 autoreconf --install