X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-ScrollBar.cpp;h=ea50a3035c772a223b50da1823998a3a2f3456d0;hp=a56ca7c0d82f8e4b00dd7fbe018e76b5e5d57f8e;hb=afe38927f068846eaa02c374430da05f6209a6f9;hpb=df89f9f230cadaac7be4007d1b1a7cf7dc893011 diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ScrollBar.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ScrollBar.cpp index a56ca7c..ea50a30 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ScrollBar.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ScrollBar.cpp @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -117,6 +118,20 @@ static void OnPanFinished() gOnPanFinishedCalled = true; } +struct CallbackFunctor +{ + CallbackFunctor(bool* callbackFlag) + : mCallbackFlag( callbackFlag ) + { + } + + void operator()() + { + *mCallbackFlag = true; + } + bool* mCallbackFlag; +}; + /** * Invoked when the current scroll position of the scrollable content goes above or below the values * specified by SCROLL_POSITION_INTERVALS property. @@ -212,9 +227,47 @@ int UtcDaliToolkitScrollBarNewP(void) DALI_TEST_CHECK( vertical ); DALI_TEST_CHECK( vertical.GetScrollDirection() == ScrollBar::Vertical ); + Property::Value value = vertical.GetProperty(ScrollBar::Property::SCROLL_DIRECTION); + std::string scrollDirection = value.Get(); + DALI_TEST_EQUALS( scrollDirection, "Vertical", TEST_LOCATION ); + ScrollBar horizontal = ScrollBar::New(ScrollBar::Horizontal); DALI_TEST_CHECK( horizontal ); DALI_TEST_CHECK( horizontal.GetScrollDirection() == ScrollBar::Horizontal ); + value = vertical.GetProperty(ScrollBar::Property::SCROLL_DIRECTION); + scrollDirection = value.Get(); + DALI_TEST_EQUALS( scrollDirection, "Horizontal", TEST_LOCATION ); + + END_TEST; +} + +int UtcDaliToolkitScrollBarCreateP(void) +{ + ToolkitTestApplication application; + + TypeRegistry typeRegistry = TypeRegistry::Get(); + DALI_TEST_CHECK( typeRegistry ); + + TypeInfo typeInfo = typeRegistry.GetTypeInfo( "ScrollBar" ); + DALI_TEST_CHECK( typeInfo ); + + BaseHandle handle = typeInfo.CreateInstance(); + DALI_TEST_CHECK( handle ); + + ScrollBar scrollBar = ScrollBar::DownCast( handle ); + DALI_TEST_CHECK( scrollBar ); + + scrollBar.SetProperty(ScrollBar::Property::SCROLL_DIRECTION, "Vertical"); + scrollBar.SetProperty(ScrollBar::Property::INDICATOR_HEIGHT_POLICY, "Fixed"); + + DALI_TEST_EQUALS( scrollBar.GetScrollDirection(), Toolkit::ScrollBar::Vertical, TEST_LOCATION ); + DALI_TEST_EQUALS( scrollBar.GetIndicatorHeightPolicy(), Toolkit::ScrollBar::Fixed, TEST_LOCATION ); + + scrollBar.SetProperty(ScrollBar::Property::SCROLL_DIRECTION, "Horizontal"); + scrollBar.SetProperty(ScrollBar::Property::INDICATOR_HEIGHT_POLICY, "Variable"); + + DALI_TEST_EQUALS( scrollBar.GetScrollDirection(), Toolkit::ScrollBar::Horizontal, TEST_LOCATION ); + DALI_TEST_EQUALS( scrollBar.GetIndicatorHeightPolicy(), Toolkit::ScrollBar::Variable, TEST_LOCATION ); END_TEST; } @@ -265,15 +318,15 @@ int UtcDaliToolkitScrollBarSetScrollPropertySourceP(void) Stage::GetCurrent().Add( sourceActor ); // Register the scroll properties - Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "source-position", 0.0f ); - Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "source-position-min", 0.0f ); - Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "source-position-max", 100.0f ); - Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "source-content-size", 500.0f ); + Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f ); + Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "sourcePositionMin", 0.0f ); + Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "sourcePositionMax", 100.0f ); + Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "sourceContentSize", 500.0f ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position" ), propertyScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-min" ), propertyMinScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-max" ), propertyMaxScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-content-size" ), propertyScrollContentSize, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePosition" ), propertyScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMin" ), propertyMinScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMax" ), propertyMaxScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourceContentSize" ), propertyScrollContentSize, TEST_LOCATION ); // Set the source of the scroll position properties. scrollBar.SetScrollPropertySource(sourceActor, propertyScrollPosition, propertyMinScrollPosition, propertyMaxScrollPosition, propertyScrollContentSize); @@ -343,15 +396,15 @@ int UtcDaliToolkitScrollBarSetScrollPropertySourceP(void) Stage::GetCurrent().Add( newSourceActor ); // Register the scroll properties - Property::Index newPropertyScrollPosition = newSourceActor.RegisterProperty( "source-position", 0.0f ); - Property::Index newPropertyMinScrollPosition = newSourceActor.RegisterProperty( "source-position-min", 0.0f ); - Property::Index newPropertyMaxScrollPosition = newSourceActor.RegisterProperty( "source-position-max", 200.0f ); - Property::Index newPropertyScrollContentSize = newSourceActor.RegisterProperty( "source-content-size", 400.0f ); + Property::Index newPropertyScrollPosition = newSourceActor.RegisterProperty( "sourcePosition", 0.0f ); + Property::Index newPropertyMinScrollPosition = newSourceActor.RegisterProperty( "sourcePositionMin", 0.0f ); + Property::Index newPropertyMaxScrollPosition = newSourceActor.RegisterProperty( "sourcePositionMax", 200.0f ); + Property::Index newPropertyScrollContentSize = newSourceActor.RegisterProperty( "sourceContentSize", 400.0f ); - DALI_TEST_EQUALS( newSourceActor.GetPropertyIndex( "source-position" ), newPropertyScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( newSourceActor.GetPropertyIndex( "source-position-min" ), newPropertyMinScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( newSourceActor.GetPropertyIndex( "source-position-max" ), newPropertyMaxScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( newSourceActor.GetPropertyIndex( "source-content-size" ), newPropertyScrollContentSize, TEST_LOCATION ); + DALI_TEST_EQUALS( newSourceActor.GetPropertyIndex( "sourcePosition" ), newPropertyScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( newSourceActor.GetPropertyIndex( "sourcePositionMin" ), newPropertyMinScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( newSourceActor.GetPropertyIndex( "sourcePositionMax" ), newPropertyMaxScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( newSourceActor.GetPropertyIndex( "sourceContentSize" ), newPropertyScrollContentSize, TEST_LOCATION ); // Change the source of the scroll position properties to be the new source actor. scrollBar.SetScrollPropertySource(newSourceActor, newPropertyScrollPosition, newPropertyMinScrollPosition, newPropertyMaxScrollPosition, newPropertyScrollContentSize); @@ -513,15 +566,15 @@ int UtcDaliToolkitScrollBarSetScrollPositionIntervalsP(void) Stage::GetCurrent().Add( sourceActor ); // Register the scroll properties - Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "source-position", 0.0f ); - Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "source-position-min", 0.0f ); - Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "source-position-max", 800.0f ); - Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "source-content-size", 2000.0f ); + Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f ); + Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "sourcePositionMin", 0.0f ); + Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "sourcePositionMax", 800.0f ); + Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "sourceContentSize", 2000.0f ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position" ), propertyScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-min" ), propertyMinScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-max" ), propertyMaxScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-content-size" ), propertyScrollContentSize, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePosition" ), propertyScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMin" ), propertyMinScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMax" ), propertyMaxScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourceContentSize" ), propertyScrollContentSize, TEST_LOCATION ); // Set the source of the scroll position properties. scrollBar.SetScrollPropertySource(sourceActor, propertyScrollPosition, propertyMinScrollPosition, propertyMaxScrollPosition, propertyScrollContentSize); @@ -675,15 +728,15 @@ int UtcDaliToolkitScrollBarSetIndicatorHeightPolicyP(void) Stage::GetCurrent().Add( sourceActor ); // Register the scroll properties - Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "source-position", 0.0f ); - Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "source-position-min", 0.0f ); - Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "source-position-max", 100.0f ); - Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "source-content-size", 500.0f ); + Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f ); + Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "sourcePositionMin", 0.0f ); + Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "sourcePositionMax", 100.0f ); + Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "sourceContentSize", 500.0f ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position" ), propertyScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-min" ), propertyMinScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-max" ), propertyMaxScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-content-size" ), propertyScrollContentSize, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePosition" ), propertyScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMin" ), propertyMinScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMax" ), propertyMaxScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourceContentSize" ), propertyScrollContentSize, TEST_LOCATION ); // Set the source of the scroll position properties. scrollBar.SetScrollPropertySource(sourceActor, propertyScrollPosition, propertyMinScrollPosition, propertyMaxScrollPosition, propertyScrollContentSize); @@ -704,6 +757,9 @@ int UtcDaliToolkitScrollBarSetIndicatorHeightPolicyP(void) scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed); scrollBar.SetIndicatorFixedHeight(50.0f); + Property::Value value = scrollBar.GetProperty(ScrollBar::Property::INDICATOR_HEIGHT_POLICY); + DALI_TEST_EQUALS(value.Get(), "Fixed", TEST_LOCATION ); + // Render and notify application.SendNotification(); application.Render(); @@ -714,6 +770,8 @@ int UtcDaliToolkitScrollBarSetIndicatorHeightPolicyP(void) // Set the indicator height to be variable scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Variable); + value = scrollBar.GetProperty(ScrollBar::Property::INDICATOR_HEIGHT_POLICY); + DALI_TEST_EQUALS(value.Get(), "Variable", TEST_LOCATION ); // Render and notify application.SendNotification(); @@ -1344,7 +1402,10 @@ int UtcDaliToolkitScrollBarPanFinishedSignalP(void) Stage::GetCurrent().Add( scrollBar ); // Connect the pan finished signal + ConnectionTracker connectionTracker; + bool panFinished = false; scrollBar.PanFinishedSignal().Connect( &OnPanFinished ); + scrollBar.ConnectSignal( &connectionTracker, "panFinished", CallbackFunctor(&panFinished)); // Render and notify application.SendNotification(); @@ -1355,15 +1416,15 @@ int UtcDaliToolkitScrollBarPanFinishedSignalP(void) Stage::GetCurrent().Add( sourceActor ); // Register the scroll properties - Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "source-position", 0.0f ); - Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "source-position-min", 0.0f ); - Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "source-position-max", 100.0f ); - Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "source-content-size", 500.0f ); + Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f ); + Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "sourcePositionMin", 0.0f ); + Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "sourcePositionMax", 100.0f ); + Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "sourceContentSize", 500.0f ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position" ), propertyScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-min" ), propertyMinScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-max" ), propertyMaxScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-content-size" ), propertyScrollContentSize, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePosition" ), propertyScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMin" ), propertyMinScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMax" ), propertyMaxScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourceContentSize" ), propertyScrollContentSize, TEST_LOCATION ); // Set the source of the scroll position properties. scrollBar.SetScrollPropertySource(sourceActor, propertyScrollPosition, propertyMinScrollPosition, propertyMaxScrollPosition, propertyScrollContentSize); @@ -1375,6 +1436,7 @@ int UtcDaliToolkitScrollBarPanFinishedSignalP(void) // Perform a swipe gesture on the indicator PerformGestureSwipe(application, Vector2(1.0f, 1.0f), Vector2(Vector2::YAXIS * 1.0f), 20); DALI_TEST_EQUALS( gOnPanFinishedCalled, true, TEST_LOCATION ); + DALI_TEST_EQUALS( panFinished, true, TEST_LOCATION ); END_TEST; } @@ -1398,7 +1460,10 @@ int UtcDaliToolkitScrollBarPanFinishedSignalN(void) Stage::GetCurrent().Add( scrollBar ); // Connect the pan finished signal + ConnectionTracker connectionTracker; + bool panFinished = false; scrollBar.PanFinishedSignal().Connect( &OnPanFinished ); + scrollBar.ConnectSignal( &connectionTracker, "panFinished", CallbackFunctor(&panFinished)); // Render and notify application.SendNotification(); @@ -1413,15 +1478,15 @@ int UtcDaliToolkitScrollBarPanFinishedSignalN(void) Stage::GetCurrent().Add( sourceActor ); // Register the scroll properties - Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "source-position", 0.0f ); - Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "source-position-min", 0.0f ); - Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "source-position-max", 100.0f ); - Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "source-content-size", 500.0f ); + Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f ); + Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "sourcePositionMin", 0.0f ); + Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "sourcePositionMax", 100.0f ); + Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "sourceContentSize", 500.0f ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position" ), propertyScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-min" ), propertyMinScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-max" ), propertyMaxScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-content-size" ), propertyScrollContentSize, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePosition" ), propertyScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMin" ), propertyMinScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMax" ), propertyMaxScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourceContentSize" ), propertyScrollContentSize, TEST_LOCATION ); // Set the source of the scroll position properties. scrollBar.SetScrollPropertySource(sourceActor, propertyScrollPosition, propertyMinScrollPosition, propertyMaxScrollPosition, propertyScrollContentSize); @@ -1433,10 +1498,12 @@ int UtcDaliToolkitScrollBarPanFinishedSignalN(void) // Perform a swipe gesture on the scroll bar but not on the indicator PerformGestureSwipe(application, Vector2(1.0f, 780.0f), Vector2(Vector2::YAXIS * -1.0f), 20); DALI_TEST_EQUALS( gOnPanFinishedCalled, false, TEST_LOCATION ); + DALI_TEST_EQUALS( panFinished, false, TEST_LOCATION ); // Perform a swipe gesture on the indicator PerformGestureSwipe(application, Vector2(1.0f, 1.0f), Vector2(Vector2::YAXIS * 1.0f), 20); DALI_TEST_EQUALS( gOnPanFinishedCalled, true, TEST_LOCATION ); + DALI_TEST_EQUALS( panFinished, true, TEST_LOCATION ); END_TEST; } @@ -1454,9 +1521,12 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalP(void) scrollBar.SetSize(20.0f, 800.0f, 0.0f); Stage::GetCurrent().Add( scrollBar ); + ConnectionTracker connectionTracker; // Connect to the ScrollPositionIntervalReached signal + bool intervalReached = false; scrollBar.ScrollPositionIntervalReachedSignal().Connect( &OnScrollPositionIntervalReached ); + scrollBar.ConnectSignal( &connectionTracker, "scrollPositionIntervalReached", CallbackFunctor(&intervalReached)); // Render and notify application.SendNotification(); @@ -1467,15 +1537,15 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalP(void) Stage::GetCurrent().Add( sourceActor ); // Register the scroll properties - Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "source-position", 0.0f ); - Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "source-position-min", 0.0f ); - Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "source-position-max", 800.0f ); - Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "source-content-size", 2000.0f ); + Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f ); + Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "sourcePositionMin", 0.0f ); + Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "sourcePositionMax", 800.0f ); + Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "sourceContentSize", 2000.0f ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position" ), propertyScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-min" ), propertyMinScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-max" ), propertyMaxScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-content-size" ), propertyScrollContentSize, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePosition" ), propertyScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMin" ), propertyMinScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMax" ), propertyMaxScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourceContentSize" ), propertyScrollContentSize, TEST_LOCATION ); // Set the source of the scroll position properties. scrollBar.SetScrollPropertySource(sourceActor, propertyScrollPosition, propertyMinScrollPosition, propertyMaxScrollPosition, propertyScrollContentSize); @@ -1509,9 +1579,11 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalP(void) // Check that the signal callback is called DALI_TEST_EQUALS( gOnScrollPositionIntervalReachedSignalCalled, true, TEST_LOCATION ); + DALI_TEST_EQUALS( intervalReached, true, TEST_LOCATION ); // Reset the flag gOnScrollPositionIntervalReachedSignalCalled = false; + intervalReached = false; // Rest and clear the animation animation.Clear(); @@ -1527,9 +1599,11 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalP(void) // Check that the signal callback is called DALI_TEST_EQUALS( gOnScrollPositionIntervalReachedSignalCalled, true, TEST_LOCATION ); + DALI_TEST_EQUALS( intervalReached, true, TEST_LOCATION ); // Reset the flag gOnScrollPositionIntervalReachedSignalCalled = false; + intervalReached = false; // Rest and clear the animation animation.Clear(); @@ -1545,6 +1619,7 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalP(void) // Check that the signal callback is called DALI_TEST_EQUALS( gOnScrollPositionIntervalReachedSignalCalled, true, TEST_LOCATION ); + DALI_TEST_EQUALS( intervalReached, true, TEST_LOCATION ); END_TEST; } @@ -1575,15 +1650,15 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalN(void) Stage::GetCurrent().Add( sourceActor ); // Register the scroll properties - Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "source-position", 0.0f ); - Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "source-position-min", 0.0f ); - Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "source-position-max", 800.0f ); - Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "source-content-size", 2000.0f ); + Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f ); + Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "sourcePositionMin", 0.0f ); + Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "sourcePositionMax", 800.0f ); + Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "sourceContentSize", 2000.0f ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position" ), propertyScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-min" ), propertyMinScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-max" ), propertyMaxScrollPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-content-size" ), propertyScrollContentSize, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePosition" ), propertyScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMin" ), propertyMinScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMax" ), propertyMaxScrollPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourceContentSize" ), propertyScrollContentSize, TEST_LOCATION ); // Set the source of the scroll position properties. scrollBar.SetScrollPropertySource(sourceActor, propertyScrollPosition, propertyMinScrollPosition, propertyMaxScrollPosition, propertyScrollContentSize); @@ -1635,5 +1710,3 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalN(void) END_TEST; } - -