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-NavigationView.cpp;h=f6b99298bd5eb562194d899d1e0dcfd4b459f2ee;hp=e91b2cc6715041173a0047133b2cf747267c495f;hb=42a61237c2ecc17d977fbf9596603da2ff221be7;hpb=709f6618b60d366c84e259564c53b6ef0c43b717 diff --git a/automated-tests/src/dali-toolkit/utc-Dali-NavigationView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-NavigationView.cpp index e91b2cc..f6b9929 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-NavigationView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-NavigationView.cpp @@ -64,7 +64,7 @@ int UtcDaliNavigationViewNew(void) navigationView = NavigationView::New(); DALI_TEST_CHECK( navigationView ); - Stage::GetCurrent().Add( navigationView ); + application.GetScene().Add( navigationView ); application.SendNotification(); application.Render(); @@ -115,7 +115,7 @@ int UtcDaliNavigationViewPush(void) { ToolkitTestApplication application; - Stage stage = Stage::GetCurrent(); + Integration::Scene stage = application.GetScene(); // 1 Create and Add Navigation View to stage, actor count should be zero NavigationView naviView = NavigationView::New(); @@ -137,7 +137,7 @@ int UtcDaliNavigationViewPop(void) { ToolkitTestApplication application; - Stage stage = Stage::GetCurrent(); + Integration::Scene stage = application.GetScene(); // 1 Create Navigation View NavigationView naviView = NavigationView::New(); @@ -145,13 +145,13 @@ int UtcDaliNavigationViewPop(void) // 2 Push initial Actor Actor testParentActor1 = Actor::New(); - testParentActor1.SetName("TestParentActor1"); + testParentActor1.SetProperty( Dali::Actor::Property::NAME,"TestParentActor1"); naviView.Push( testParentActor1 ); DALI_TEST_EQUALS( naviView.GetChildCount(), 1 , TEST_LOCATION ); // 3 Push Second Actor which contains a child actor Actor testParentActor2 = Actor::New(); - testParentActor2.SetName("TestParentActor2"); + testParentActor2.SetProperty( Dali::Actor::Property::NAME,"TestParentActor2"); Actor testChildActor1 = Actor::New(); testParentActor2.Add( testChildActor1 ); naviView.Push( testParentActor2 ); @@ -159,7 +159,7 @@ int UtcDaliNavigationViewPop(void) // 4 Pop head actor, it should be TestParentActor2 Actor poppedActor = naviView.Pop(); - DALI_TEST_EQUALS( poppedActor.GetName() , "TestParentActor2", TEST_LOCATION ); + DALI_TEST_EQUALS( poppedActor.GetProperty< std::string >( Dali::Actor::Property::NAME ) , "TestParentActor2", TEST_LOCATION ); // 5 Navigation View child count should be 1 DALI_TEST_EQUALS( naviView.GetChildCount(), 1 , TEST_LOCATION ); @@ -172,7 +172,7 @@ int UtcDaliNavigationViewPushAndPop(void) { ToolkitTestApplication application; - Stage stage = Stage::GetCurrent(); + Integration::Scene stage = application.GetScene(); // 1 Create Navigation View NavigationView naviView = NavigationView::New(); @@ -180,31 +180,31 @@ int UtcDaliNavigationViewPushAndPop(void) // 2 Push initial Actor Actor testParentActor1 = Actor::New(); - testParentActor1.SetName("TestParentActor1"); + testParentActor1.SetProperty( Dali::Actor::Property::NAME,"TestParentActor1"); naviView.Push( testParentActor1 ); DALI_TEST_EQUALS( naviView.GetChildCount(), 1 , TEST_LOCATION ); // 3 Push Second Actor which contains a child actor Actor testParentActor2 = Actor::New(); - testParentActor2.SetName("TestParentActor2"); + testParentActor2.SetProperty( Dali::Actor::Property::NAME,"TestParentActor2"); Actor testChildActor1 = Actor::New(); testParentActor2.Add( testChildActor1 ); naviView.Push( testParentActor2 ); // 3 Push third Actor which contains a child actor Actor testParentActor3 = Actor::New(); - testParentActor3.SetName("TestParentActor3"); + testParentActor3.SetProperty( Dali::Actor::Property::NAME,"TestParentActor3"); Actor testChildActor2 = Actor::New(); testParentActor2.Add( testChildActor2 ); naviView.Push( testParentActor3 ); // 4 Pop head actor, it should be TestParentActor3 Actor poppedActor = naviView.Pop(); - DALI_TEST_EQUALS( poppedActor.GetName() , "TestParentActor3", TEST_LOCATION ); + DALI_TEST_EQUALS( poppedActor.GetProperty< std::string >( Dali::Actor::Property::NAME ) , "TestParentActor3", TEST_LOCATION ); // 5 Pop head actor, it should be TestParentActor2 Actor poppedActor2 = naviView.Pop(); - DALI_TEST_EQUALS( poppedActor2.GetName() , "TestParentActor2", TEST_LOCATION ); + DALI_TEST_EQUALS( poppedActor2.GetProperty< std::string >( Dali::Actor::Property::NAME ) , "TestParentActor2", TEST_LOCATION ); END_TEST; @@ -214,7 +214,7 @@ int UtcDaliNavigationViewPreventLastPop(void) { ToolkitTestApplication application; - Stage stage = Stage::GetCurrent(); + Integration::Scene stage = application.GetScene(); // 1 Create Navigation View NavigationView naviView = NavigationView::New(); @@ -222,20 +222,20 @@ int UtcDaliNavigationViewPreventLastPop(void) // 2 Push initial Actor Actor testParentActor1 = Actor::New(); - testParentActor1.SetName("TestParentActor1"); + testParentActor1.SetProperty( Dali::Actor::Property::NAME,"TestParentActor1"); naviView.Push( testParentActor1 ); DALI_TEST_EQUALS( naviView.GetChildCount(), 1 , TEST_LOCATION ); // 3 Push Second Actor which contains a child actor Actor testParentActor2 = Actor::New(); - testParentActor2.SetName("TestParentActor2"); + testParentActor2.SetProperty( Dali::Actor::Property::NAME,"TestParentActor2"); Actor testChildActor1 = Actor::New(); testParentActor2.Add( testChildActor1 ); naviView.Push( testParentActor2 ); // 4 Pop head actor, it should be TestParentActor2 Actor poppedActor1 = naviView.Pop(); - DALI_TEST_EQUALS( poppedActor1.GetName() , "TestParentActor2", TEST_LOCATION ); + DALI_TEST_EQUALS( poppedActor1.GetProperty< std::string >( Dali::Actor::Property::NAME ) , "TestParentActor2", TEST_LOCATION ); // 5 Try to Pop head actor, Should be empty hence can not get name of Actor @@ -243,7 +243,7 @@ int UtcDaliNavigationViewPreventLastPop(void) try { - const std::string hasNoName = poppedActorEmpty.GetName(); + const std::string hasNoName = poppedActorEmpty.GetProperty< std::string >( Dali::Actor::Property::NAME ); tet_infoline( hasNoName.c_str() ); DALI_TEST_CHECK( false ); // should not get here }