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-ControlImpl.cpp;h=12ce9136af00224ffdd345a896821b2dbbfee81e;hp=daac90334dcd1d9e35440b8567e9dfa2d4cf97dc;hb=c125573992c196f15ece50589ae80efed63c8870;hpb=235c866c63c1b2b493a5bff0508fa92cb70a9f2e diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp index daac903..12ce913 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp @@ -34,7 +34,6 @@ #include #include -#include #include "dummy-control.h" @@ -354,7 +353,7 @@ int UtcDaliControlImplChildAddAndRemove(void) DALI_TEST_EQUALS( dummyImpl.childAddCalled, false, TEST_LOCATION ); DALI_TEST_EQUALS( dummy.GetChildCount(), 0u, TEST_LOCATION ); - Actor actor = RenderableActor::New(); + Actor actor = Actor::New(); dummy.Add(actor); DALI_TEST_EQUALS( dummyImpl.childAddCalled, true, TEST_LOCATION ); DALI_TEST_EQUALS( dummy.GetChildCount(), 1u, TEST_LOCATION ); @@ -382,7 +381,7 @@ int UtcDaliControlImplChildAddAndRemove(void) application.SendNotification(); DALI_TEST_EQUALS( dummy.GetChildCount(), 0u, TEST_LOCATION ); - Actor actor = RenderableActor::New(); + Actor actor = Actor::New(); dummy.Add(actor); DALI_TEST_EQUALS( dummy.GetChildCount(), 1u, TEST_LOCATION ); @@ -563,7 +562,10 @@ int UtcDaliControlImplTouchEvent(void) DALI_TEST_EQUALS( dummyImpl.touchEventCalled, false, TEST_LOCATION ); Integration::TouchEvent touchEvent(1); - TouchPoint point(1, TouchPoint::Down, 20.0f, 20.0f); + Integration::Point point; + point.SetDeviceId( 1 ); + point.SetState( PointState::DOWN ); + point.SetScreenPosition( Vector2( 20.0f, 20.0f ) ); touchEvent.AddPoint(point); application.ProcessEvent(touchEvent); DALI_TEST_EQUALS( dummyImpl.touchEventCalled, true, TEST_LOCATION ); @@ -585,7 +587,10 @@ int UtcDaliControlImplTouchEvent(void) application.SendNotification(); Integration::TouchEvent touchEvent(1); - TouchPoint point(1, TouchPoint::Down, 20.0f, 20.0f); + Integration::Point point; + point.SetDeviceId( 1 ); + point.SetState( PointState::DOWN ); + point.SetScreenPosition( Vector2( 20.0f, 20.0f ) ); touchEvent.AddPoint(point); application.ProcessEvent(touchEvent); @@ -613,8 +618,11 @@ int UtcDaliControlImplHoverEvent(void) DALI_TEST_EQUALS( dummyImpl.hoverEventCalled, false, TEST_LOCATION ); Integration::HoverEvent event(1); - TouchPoint point( 1, TouchPoint::Motion, 20.0f, 20.0f ); - event.AddPoint( point ); + Integration::Point point; + point.SetDeviceId( 1 ); + point.SetState( PointState::MOTION ); + point.SetScreenPosition( Vector2( 20.0f, 20.0f ) ); + event.AddPoint(point); application.ProcessEvent( event ); DALI_TEST_EQUALS( dummyImpl.hoverEventCalled, true, TEST_LOCATION ); @@ -635,8 +643,11 @@ int UtcDaliControlImplHoverEvent(void) application.SendNotification(); Integration::HoverEvent event(1); - TouchPoint point( 1, TouchPoint::Motion, 20.0f, 20.0f ); - event.AddPoint( point ); + Integration::Point point; + point.SetDeviceId( 1 ); + point.SetState( PointState::MOTION ); + point.SetScreenPosition( Vector2( 20.0f, 20.0f ) ); + event.AddPoint(point); application.ProcessEvent( event ); Stage::GetCurrent().Remove(dummy); @@ -751,7 +762,6 @@ int UtcDaliControlImplKeyInputFocusLost(void) DummyControlImplOverride& dummyImpl = static_cast(dummy.GetImplementation()); - dummyImpl.OnAccessibilityValueChange( true ); dummyImpl.IsKeyboardNavigationSupported(); dummyImpl.IsKeyboardFocusGroup(); @@ -867,17 +877,11 @@ int UtcDaliControlImplOnStyleChangeN(void) Control dummy = Control::New(); Toolkit::Internal::Control& controlImpl = Toolkit::Internal::GetImplementation( dummy ); - // test that style manager is being used, passing an empty handle throws exception - try - { - Dali::Toolkit::StyleManager styleManager; - controlImpl.OnStyleChange( styleManager, StyleChange::THEME_CHANGE ); - tet_result(TET_FAIL); - } - catch (DaliException &exception) - { - tet_result(TET_PASS); - } + // test that style manager is being used, passing an empty handle does nothing but does not crash either + Dali::Toolkit::StyleManager styleManager; + controlImpl.OnStyleChange( styleManager, StyleChange::THEME_CHANGE ); + // no crash so test passes + tet_result(TET_PASS); END_TEST; } @@ -922,7 +926,7 @@ int UtcDaliControlImplOnAccessibilityActivatedP(void) DALI_TEST_CHECK( handle ); Property::Map attributes; - DALI_TEST_EQUALS( false, handle.DoAction("accessibility-activated", attributes), TEST_LOCATION ); + DALI_TEST_EQUALS( false, handle.DoAction("accessibilityActivated", attributes), TEST_LOCATION ); END_TEST; } @@ -940,7 +944,3 @@ int UtcDaliControlImplGetNextKeyboardFocusableActorP(void) END_TEST; } - - - -