Merge "Fix for ItemView OVERSHOOT_SIZE" into devel/master
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-ScrollView.cpp
index 3b4038e..fdd32b5 100644 (file)
@@ -439,7 +439,7 @@ int UtcDaliToolkitScrollViewScrollToPositionWithDirectionBiasP(void)
 
   scrollView.ScrollTo( target2, 0.25f, Dali::Toolkit::DirectionBiasLeft, Dali::Toolkit::DirectionBiasLeft );
   Wait(application, RENDER_DELAY_SCROLL);
-  DALI_TEST_EQUALS( scrollView.GetCurrentScrollPosition(), Vector2::ZERO, TEST_LOCATION );
+  DALI_TEST_EQUALS( scrollView.GetCurrentScrollPosition(), target2, TEST_LOCATION );
 
   scrollView.ScrollTo( target, 0.0f );
   Wait(application, RENDER_DELAY_SCROLL);
@@ -508,7 +508,7 @@ int UtcDaliToolkitScrollViewScrollToPositionWithAlphaFunctionAndDirectionBiasP(v
 
   scrollView.ScrollTo( target2, 0.25f, AlphaFunction::LINEAR, Dali::Toolkit::DirectionBiasLeft, Dali::Toolkit::DirectionBiasLeft );
   Wait(application, RENDER_DELAY_SCROLL);
-  DALI_TEST_EQUALS( scrollView.GetCurrentScrollPosition(), Vector2::ZERO, TEST_LOCATION );
+  DALI_TEST_EQUALS( scrollView.GetCurrentScrollPosition(), target2, TEST_LOCATION );
 
   scrollView.ScrollTo( target, 0.0f );
   Wait(application, RENDER_DELAY_SCROLL);
@@ -1198,6 +1198,11 @@ int UtcDaliToolkitScrollViewOvershoot(void)
   // Set up a scrollView...
   ScrollView scrollView = ScrollView::New();
   scrollView.SetOvershootEnabled(true);
+
+  Vector2 overshootSize = Vector2(100.0f,100.0f);
+  scrollView.SetProperty( Scrollable::Property::OVERSHOOT_SIZE, overshootSize );
+  DALI_TEST_EQUALS( scrollView.GetProperty(Scrollable::Property::OVERSHOOT_SIZE).Get<Vector2>(), overshootSize, TEST_LOCATION );
+
   Stage::GetCurrent().Add( scrollView );
   Vector2 stageSize = Stage::GetCurrent().GetSize();
   scrollView.SetSize(stageSize);