X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-VideoView.cpp;h=e15a99a6f39d3a2bc7426683683336ae0cad2a40;hb=946461ac1b49e996d9155c95130ec5aa1b08f77d;hp=03da3ff5a732cb48bad8942c6f423b815cd43ac7;hpb=aff52b6dbc13a5be62bbd5db2e4c76d3746d9e40;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/utc-Dali-VideoView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-VideoView.cpp old mode 100755 new mode 100644 index 03da3ff..e15a99a --- a/automated-tests/src/dali-toolkit/utc-Dali-VideoView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-VideoView.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ #include #include #include +#include using namespace Dali; using namespace Dali::Toolkit; @@ -151,7 +152,7 @@ int UtcDaliVideoViewProperty1b(void) Toolkit::VideoView view = Toolkit::VideoView::New(); DALI_TEST_CHECK( view ); - Stage stage = Stage::GetCurrent(); + Integration::Scene stage = application.GetScene(); std::string file; Property::Map map; @@ -301,6 +302,9 @@ int UtcDaliVideoViewMethodsForCoverage(void) videoView.Stop(); videoView.Forward(10); videoView.Backward(10); + + Toolkit::DevelVideoView::GetMediaPlayer( videoView ); + VideoView::VideoViewSignalType& signal = videoView.FinishedSignal(); DALI_TEST_EQUALS( 0, signal.GetConnectionCount(), TEST_LOCATION ); @@ -354,7 +358,7 @@ int UtcDaliVideoViewCustomShaderForCoverage(void) bool isUnderlay = videoView.GetProperty( Toolkit::VideoView::Property::UNDERLAY ).Get< bool >(); DALI_TEST_CHECK( !isUnderlay ); - Stage::GetCurrent().Add( videoView ); + application.GetScene().Add( videoView ); videoView.SetProperty( VideoView::Property::VIDEO, "testvideo" ); Property::Map customShader; @@ -383,7 +387,7 @@ int UtcDaliVideoViewMethodsForCoverage2(void) windowSurfaceTarget.Insert( RENDERING_TYPE, "windowSurfaceTarget" ); - Stage::GetCurrent().Add( videoView ); + application.GetScene().Add( videoView ); application.SendNotification(); application.Render(); @@ -401,14 +405,14 @@ int UtcDaliVideoViewMethodsForCoverage2(void) Vector3 vector(100.0f, 100.0f, 0.0f); - DALI_TEST_CHECK(vector != videoView.GetCurrentSize()); - videoView.SetSize( vector ); + DALI_TEST_CHECK(vector != videoView.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); + videoView.SetProperty( Actor::Property::SIZE, vector ); application.SendNotification(); application.Render(); // Check the size in the new frame - DALI_TEST_CHECK(vector == videoView.GetCurrentSize()); + DALI_TEST_CHECK(vector == videoView.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); END_TEST; } @@ -422,7 +426,7 @@ int UtcDaliVideoViewPropertyUnderlay(void) VideoView view = VideoView::New(); DALI_TEST_CHECK( view ); - Stage::GetCurrent().Add( view ); + application.GetScene().Add( view ); view.Play(); application.SendNotification(); @@ -470,7 +474,7 @@ int UtcDaliVideoViewPropertyPlayPosition(void) VideoView view = VideoView::New(); DALI_TEST_CHECK( view ); - Stage::GetCurrent().Add( view ); + application.GetScene().Add( view ); view.Play(); application.SendNotification(); @@ -497,7 +501,7 @@ int UtcDaliVideoViewNew2(void) VideoView view = VideoView::New( true ); DALI_TEST_CHECK( view ); - Stage::GetCurrent().Add( view ); + application.GetScene().Add( view ); view.Play(); application.SendNotification(); @@ -506,7 +510,7 @@ int UtcDaliVideoViewNew2(void) VideoView view2 = VideoView::New( "", false ); DALI_TEST_CHECK( view2 ); - Stage::GetCurrent().Add( view2 ); + application.GetScene().Add( view2 ); view2.Play(); application.SendNotification(); @@ -523,7 +527,7 @@ int UtcDaliVideoViewPropertyDisplayMode(void) VideoView view = VideoView::New(); DALI_TEST_CHECK( view ); - Stage::GetCurrent().Add( view ); + application.GetScene().Add( view ); view.Play(); application.SendNotification(); @@ -551,7 +555,7 @@ int UtcDaliVideoViewCustomShader(void) bool isUnderlay = view.GetProperty( Toolkit::VideoView::Property::UNDERLAY ).Get< bool >(); DALI_TEST_CHECK( !isUnderlay ); - Stage::GetCurrent().Add( view ); + application.GetScene().Add( view ); view.SetProperty( VideoView::Property::VIDEO, "testvideo" ); /* insert custom shader */ @@ -569,7 +573,7 @@ int UtcDaliVideoViewCustomShader(void) view.SetProperty( VideoView::Property::VIDEO, map ); /* do render for check custom shader */ - Stage::GetCurrent().Add( view ); + application.GetScene().Add( view ); view.Play(); application.SendNotification();