X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-ControlImpl.cpp;h=8f363af5bff08f6295a01ba833a1af9a8437bea1;hb=030e7c680a6eb0e8d87bfdb8ec359a0267ef7db2;hp=c0cf98c125b9bdc3c5c2844360de2b2ed8d282a2;hpb=2ec164cd618f93ccafe17b1d0b8ff16401ed4aef;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp index c0cf98c..8f363af 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp @@ -218,8 +218,7 @@ int UtcDaliControlImplOnGestureMethods(void) // Check gesture actually happens { DummyControl dummy = DummyControl::New(true); - dummy.SetRelayoutEnabled( true ); - dummy.SetPreferredSize( Vector2(100.0f, 100.0f ) ); + dummy.SetSize( Vector2(100.0f, 100.0f ) ); dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummy); @@ -279,8 +278,7 @@ int UtcDaliControlImplOnGestureMethods(void) // Ensure full code coverage { DummyControl dummy = DummyControl::New(); - dummy.SetRelayoutEnabled( true ); - dummy.SetPreferredSize( Vector2( 100.0f, 100.0f ) ); + dummy.SetSize( Vector2( 100.0f, 100.0f ) ); dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummy); @@ -445,7 +443,6 @@ int UtcDaliControlImplSizeSet(void) { DummyControl dummy = DummyControl::New( true ); - dummy.SetRelayoutEnabled( true ); DummyControlImplOverride& dummyImpl = static_cast(dummy.GetImplementation()); Stage::GetCurrent().Add(dummy); @@ -454,7 +451,7 @@ int UtcDaliControlImplSizeSet(void) DALI_TEST_EQUALS( dummyImpl.sizeSetCalled, true, TEST_LOCATION ); // Called from size negotiation Vector2 size(100.0f, 200.0f); - dummy.SetPreferredSize(size); + dummy.SetSize(size); application.Render(); application.SendNotification(); @@ -470,7 +467,6 @@ int UtcDaliControlImplSizeSet(void) // Ensure full code coverage { DummyControl dummy = DummyControl::New(); - dummy.SetRelayoutEnabled( true ); Stage::GetCurrent().Add(dummy); Vector2 size(100.0f, 200.0f); @@ -479,7 +475,7 @@ int UtcDaliControlImplSizeSet(void) application.Render(); application.SendNotification(); - dummy.SetPreferredSize(size); + dummy.SetSize(size); application.Render(); application.SendNotification(); @@ -505,7 +501,7 @@ int UtcDaliControlImplSizeAnimation(void) DALI_TEST_EQUALS( dummyImpl.sizeAnimationCalled, false, TEST_LOCATION ); Animation animation = Animation::New(1.0f); - animation.Resize(dummy, Vector3(100.0f, 150.0f, 200.0f)); + animation.AnimateTo( Property( dummy, Actor::Property::SIZE ), Vector3( 100.0f, 150.0f, 200.0f ) ); animation.Play(); application.Render(); @@ -525,7 +521,7 @@ int UtcDaliControlImplSizeAnimation(void) Stage::GetCurrent().Add(dummy); Animation animation = Animation::New(1.0f); - animation.Resize(dummy, Vector3(100.0f, 150.0f, 200.0f)); + animation.AnimateTo( Property( dummy, Actor::Property::SIZE ), Vector3( 100.0f, 150.0f, 200.0f ) ); animation.Play(); application.Render(); @@ -546,10 +542,9 @@ int UtcDaliControlImplTouchEvent(void) { DummyControl dummy = DummyControl::New( true ); - dummy.SetRelayoutEnabled( true ); DummyControlImplOverride& dummyImpl = static_cast(dummy.GetImplementation()); - dummy.SetPreferredSize( Vector2( 100.0f, 100.0f ) ); + dummy.SetSize( Vector2( 100.0f, 100.0f ) ); dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummy); @@ -571,9 +566,8 @@ int UtcDaliControlImplTouchEvent(void) // Ensure full code coverage { DummyControl dummy = DummyControl::New(); - dummy.SetRelayoutEnabled( true ); - dummy.SetPreferredSize( Vector2( 100.0f, 100.0f ) ); + dummy.SetSize( Vector2( 100.0f, 100.0f ) ); dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummy); @@ -639,39 +633,6 @@ int UtcDaliControlImplKeyEvent(void) END_TEST; } -int UtcDaliControlImplStyleChange(void) -{ - ToolkitTestApplication application; - - DummyControl dummy = DummyControl::New( true ); - DummyControlImplOverride& dummyImpl = static_cast(dummy.GetImplementation()); - - Stage::GetCurrent().Add(dummy); - - application.Render(); - application.SendNotification(); - application.Render(); - application.SendNotification(); - - // Add a Control and normal Actor as children - DummyControl dummyChild = DummyControl::New(); - dummy.Add(dummyChild); - - Actor actor = Actor::New(); - dummy.Add(actor); - - DALI_TEST_EQUALS( dummyImpl.fontChangeCalled, false, TEST_LOCATION ); - StyleChange styleChange; - styleChange.defaultFontChange = true; - Dali::StyleMonitor styleMonitor = StyleMonitor::Get(); - styleMonitor.EmitStyleChangeSignal(styleChange); - - DALI_TEST_EQUALS( dummyImpl.fontChangeCalled, true, TEST_LOCATION ); - - Stage::GetCurrent().Remove(dummy); - END_TEST; -} - int UtcDaliControlImplKeyInputFocusGained(void) { ToolkitTestApplication application; @@ -773,10 +734,9 @@ int UtcDaliControlImplMouseWheelEvent(void) { DummyControl dummy = DummyControl::New( true ); - dummy.SetRelayoutEnabled( true ); DummyControlImplOverride& dummyImpl = static_cast(dummy.GetImplementation()); - dummy.SetPreferredSize( Vector2( 100.0f, 100.0f ) ); + dummy.SetSize( Vector2( 100.0f, 100.0f ) ); dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummy); @@ -801,9 +761,8 @@ int UtcDaliControlImplMouseWheelEvent(void) // Ensure full code coverage { DummyControl dummy = DummyControl::New(); - dummy.SetRelayoutEnabled( true ); - dummy.SetPreferredSize( Vector2( 100.0f, 100.0f ) ); + dummy.SetSize( Vector2( 100.0f, 100.0f ) ); dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummy);