From: Adeel Kazmi Date: Thu, 11 Jul 2019 17:24:37 +0000 (+0100) Subject: (Automated Tests) Use Default Scene signals in Window stub X-Git-Tag: dali_1.4.29~4^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=b7a36db4c66c579601b9be7fa4af0f5215d3922c (Automated Tests) Use Default Scene signals in Window stub Change-Id: Ibe82743607e78027c75e32ff1974c3433c69bbbd --- diff --git a/automated-tests/src/dali-toolkit-internal/CMakeLists.txt b/automated-tests/src/dali-toolkit-internal/CMakeLists.txt index 1754324..b7d87f7 100755 --- a/automated-tests/src/dali-toolkit-internal/CMakeLists.txt +++ b/automated-tests/src/dali-toolkit-internal/CMakeLists.txt @@ -46,6 +46,7 @@ LIST(APPEND TC_SOURCES ../dali-toolkit/dali-toolkit-test-utils/toolkit-physical-keyboard.cpp ../dali-toolkit/dali-toolkit-test-utils/toolkit-style-monitor.cpp ../dali-toolkit/dali-toolkit-test-utils/toolkit-singleton-service.cpp + ../dali-toolkit/dali-toolkit-test-utils/toolkit-test-application.cpp ../dali-toolkit/dali-toolkit-test-utils/toolkit-timer.cpp ../dali-toolkit/dali-toolkit-test-utils/toolkit-tts-player.cpp ../dali-toolkit/dali-toolkit-test-utils/toolkit-vector-animation-renderer.cpp diff --git a/automated-tests/src/dali-toolkit-styling/CMakeLists.txt b/automated-tests/src/dali-toolkit-styling/CMakeLists.txt index 68bbd23..ce5ba8d 100644 --- a/automated-tests/src/dali-toolkit-styling/CMakeLists.txt +++ b/automated-tests/src/dali-toolkit-styling/CMakeLists.txt @@ -29,6 +29,7 @@ LIST(APPEND TC_SOURCES ../dali-toolkit/dali-toolkit-test-utils/toolkit-style-monitor.cpp ../dali-toolkit/dali-toolkit-test-utils/toolkit-singleton-service.cpp ../dali-toolkit/dali-toolkit-test-utils/toolkit-sound-player.cpp + ../dali-toolkit/dali-toolkit-test-utils/toolkit-test-application.cpp ../dali-toolkit/dali-toolkit-test-utils/toolkit-text-abstraction.cpp ../dali-toolkit/dali-toolkit-test-utils/toolkit-timer.cpp ../dali-toolkit/dali-toolkit-test-utils/toolkit-clipboard-event-notifier.cpp diff --git a/automated-tests/src/dali-toolkit/CMakeLists.txt b/automated-tests/src/dali-toolkit/CMakeLists.txt index 91613bc..8989f59 100755 --- a/automated-tests/src/dali-toolkit/CMakeLists.txt +++ b/automated-tests/src/dali-toolkit/CMakeLists.txt @@ -86,14 +86,15 @@ LIST(APPEND TC_SOURCES dali-toolkit-test-utils/toolkit-physical-keyboard.cpp dali-toolkit-test-utils/toolkit-style-monitor.cpp dali-toolkit-test-utils/toolkit-singleton-service.cpp + dali-toolkit-test-utils/toolkit-test-application.cpp dali-toolkit-test-utils/toolkit-timer.cpp + dali-toolkit-test-utils/toolkit-trigger-event-factory.cpp dali-toolkit-test-utils/toolkit-tts-player.cpp dali-toolkit-test-utils/toolkit-native-image-source.cpp dali-toolkit-test-utils/toolkit-vector-animation-renderer.cpp dali-toolkit-test-utils/toolkit-video-player.cpp dali-toolkit-test-utils/toolkit-web-engine.cpp dali-toolkit-test-utils/toolkit-window.cpp - dali-toolkit-test-utils/toolkit-trigger-event-factory.cpp dali-toolkit-test-utils/dali-test-suite-utils.cpp dali-toolkit-test-utils/dali-toolkit-test-suite-utils.cpp dali-toolkit-test-utils/dummy-control.cpp diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp index 0b98b27..d457916 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp @@ -26,7 +26,8 @@ TestApplication::TestApplication( uint32_t surfaceWidth, uint32_t surfaceHeight, uint32_t horizontalDpi, uint32_t verticalDpi, - ResourcePolicy::DataRetention policy) + ResourcePolicy::DataRetention policy, + bool initialize ) : mCore( NULL ), mSurfaceWidth( surfaceWidth ), mSurfaceHeight( surfaceHeight ), @@ -35,11 +36,21 @@ TestApplication::TestApplication( uint32_t surfaceWidth, mLastVSyncTime(0u), mDataRetentionPolicy( policy ) { - Initialize(); + if( initialize ) + { + Initialize(); + } } void TestApplication::Initialize() { + CreateCore(); + CreateScene(); + InitializeCore(); +} + +void TestApplication::CreateCore() +{ // We always need the first update! mStatus.keepUpdating = Integration::KeepUpdating::STAGE_KEEP_RENDERING; @@ -61,15 +72,20 @@ void TestApplication::Initialize() Dali::Integration::Trace::InstallLogContextFunction( logContextFunction ); Dali::Integration::Trace::LogContext( true, "Test" ); +} +void TestApplication::CreateScene() +{ mRenderSurface = new TestRenderSurface( Dali::PositionSize( 0, 0, mSurfaceWidth, mSurfaceHeight ) ); mScene = Dali::Integration::Scene::New( Vector2( static_cast( mSurfaceWidth ), static_cast( mSurfaceHeight ) ) ); mScene.SetSurface( *mRenderSurface ); - mScene.SetDpi( Vector2( static_cast( mDpi.x ), static_cast( mDpi.y ) ) ); mCore->SurfaceResized( mRenderSurface ); +} +void TestApplication::InitializeCore() +{ mCore->SceneCreated(); mCore->Initialize(); } diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.h index 99cb1ce..32447d6 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.h @@ -40,13 +40,8 @@ public: static const uint32_t DEFAULT_SURFACE_WIDTH = 480; static const uint32_t DEFAULT_SURFACE_HEIGHT = 800; -#ifdef _CPP11 static constexpr uint32_t DEFAULT_HORIZONTAL_DPI = 220; static constexpr uint32_t DEFAULT_VERTICAL_DPI = 217; -#else - static const uint32_t DEFAULT_HORIZONTAL_DPI = 220; - static const uint32_t DEFAULT_VERTICAL_DPI = 217; -#endif static const uint32_t DEFAULT_RENDER_INTERVAL = 1; @@ -56,9 +51,13 @@ public: uint32_t surfaceHeight = DEFAULT_SURFACE_HEIGHT, uint32_t horizontalDpi = DEFAULT_HORIZONTAL_DPI, uint32_t verticalDpi = DEFAULT_VERTICAL_DPI, - ResourcePolicy::DataRetention policy = ResourcePolicy::DALI_DISCARDS_ALL_DATA); + ResourcePolicy::DataRetention policy = ResourcePolicy::DALI_DISCARDS_ALL_DATA, + bool initialize = true ); void Initialize(); + void CreateCore(); + void CreateScene(); + void InitializeCore(); virtual ~TestApplication(); static void LogMessage( Dali::Integration::Log::DebugPriority level, std::string& message ); static void LogContext( bool start, const char* tag ); diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor-impl.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor-impl.h index e49b358..dd7f469 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor-impl.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor-impl.h @@ -27,6 +27,11 @@ class DisplayConnection; class ThreadSynchronizationInterface; class Window; +namespace Integration +{ +class Scene; +} + using WindowContainer = std::vector; namespace Internal @@ -53,22 +58,39 @@ namespace Internal namespace Adaptor { -class Adaptor: public BaseObject +class Adaptor { public: + static Dali::Adaptor& New(); static Dali::Adaptor& Get(); Adaptor(); ~Adaptor(); -public: - static Dali::RenderSurfaceInterface& GetSurface(); - static Dali::WindowContainer GetWindows(); - static Dali::Adaptor::AdaptorSignalType& AdaptorSignal(); - static Dali::Adaptor::WindowCreatedSignalType& WindowCreatedSignal(); - static bool mAvailable; - static Vector mCallbacks; - static Dali::WindowContainer mWindows; - static Dali::Adaptor::WindowCreatedSignalType* mWindowCreatedSignal; + void Start( Dali::Window window ); + + bool AddIdle( CallbackBase* callback, bool hasReturnValue ); + void RemoveIdle( CallbackBase* callback ); + void RunIdles(); + + static Integration::Scene GetScene( Dali::Window window ); + + Dali::RenderSurfaceInterface& GetSurface(); + Dali::WindowContainer GetWindows(); + + Dali::Adaptor::AdaptorSignalType& ResizedSignal(); + Dali::Adaptor::AdaptorSignalType& LanguageChangedSignal(); + Dali::Adaptor::WindowCreatedSignalType& WindowCreatedSignal(); + + static Adaptor& GetImpl( Dali::Adaptor& adaptor ) { return *adaptor.mImpl; } + static const Adaptor& GetImpl( const Dali::Adaptor& adaptor ) { return *adaptor.mImpl; } + +private: + + Vector mCallbacks; + Dali::WindowContainer mWindows; + Dali::Adaptor::AdaptorSignalType mResizedSignal; + Dali::Adaptor::AdaptorSignalType mLanguageChangedSignal; + Dali::Adaptor::WindowCreatedSignalType mWindowCreatedSignal; }; } // namespace Adaptor diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor.cpp index 6507583..63bacde 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor.cpp @@ -15,6 +15,8 @@ * */ +#include + #include // Don't want to include the actual window.h which otherwise will be indirectly included by adaptor.h. @@ -23,105 +25,155 @@ #include -#include - #include #include +#include #include #include namespace Dali { +namespace +{ + +/////////////////////////////////////////////////////////////////////////////// +// +// LogFactoryStub +// +/////////////////////////////////////////////////////////////////////////////// + +class LogFactory : public LogFactoryInterface +{ +public: + LogFactory() = default; + virtual ~LogFactory() = default; + +private: + void InstallLogFunction() const override + { + Dali::Integration::Log::InstallLogFunction( &TestApplication::LogMessage ); + } +}; +LogFactory* gLogFactory = NULL; // For some reason, destroying this when the Adaptor is destroyed causes a crash in some test cases when running all of them. +} //unnamed namespace + namespace Internal { namespace Adaptor { -bool Adaptor::mAvailable = false; -Vector Adaptor::mCallbacks = Vector(); -Dali::WindowContainer Adaptor::mWindows; -Dali::Adaptor::WindowCreatedSignalType* Adaptor::mWindowCreatedSignal = nullptr; +/////////////////////////////////////////////////////////////////////////////// +// +// Dali::Internal::Adaptor::Adaptor Stub +// +/////////////////////////////////////////////////////////////////////////////// -Dali::Adaptor& Adaptor::Get() +Dali::Adaptor* gAdaptor = nullptr; + +Dali::Adaptor& Adaptor::New() { - Dali::Adaptor* adaptor = new Dali::Adaptor; - Adaptor::mAvailable = true; - return *adaptor; + DALI_ASSERT_ALWAYS( ! gAdaptor ); + gAdaptor = new Dali::Adaptor; + return *gAdaptor; } -Dali::RenderSurfaceInterface& Adaptor::GetSurface() +Dali::Adaptor& Adaptor::Get() { - Dali::RenderSurfaceInterface* renderSurface = reinterpret_cast ( new Dali::TestRenderSurface( Dali::PositionSize( 0, 0, 480, 800 ) ) ); - return *renderSurface; + DALI_ASSERT_ALWAYS( gAdaptor ); + return *gAdaptor; } -Dali::WindowContainer Adaptor::GetWindows() +Adaptor::Adaptor() { - return Adaptor::mWindows; } -Dali::Adaptor::AdaptorSignalType& Adaptor::AdaptorSignal() +Adaptor::~Adaptor() { - Dali::Adaptor::AdaptorSignalType* signal = new Dali::Adaptor::AdaptorSignalType; - return *signal; + gAdaptor = nullptr; } -Dali::Adaptor::WindowCreatedSignalType& Adaptor::WindowCreatedSignal() +void Adaptor::Start( Dali::Window window ) { - if ( !Adaptor::mWindowCreatedSignal ) + if ( window ) { - Adaptor::mWindowCreatedSignal = new Dali::Adaptor::WindowCreatedSignalType; + mWindows.push_back( window ); + mWindowCreatedSignal.Emit( window ); } +} - return *Adaptor::mWindowCreatedSignal; +Integration::Scene Adaptor::GetScene( Dali::Window window ) +{ + return window.GetScene(); } -} // namespace Adaptor -} // namespace Internal +bool Adaptor::AddIdle( CallbackBase* callback, bool hasReturnValue ) +{ + mCallbacks.PushBack( callback ); + return true; +} -Adaptor& Adaptor::New( Window window ) +void Adaptor::RemoveIdle( CallbackBase* callback ) { - return Internal::Adaptor::Adaptor::Get(); + mCallbacks.Erase( std::find_if( mCallbacks.Begin(), mCallbacks.End(), + [ &callback ] ( CallbackBase* current ) { return callback == current; } ) ); } -Adaptor& Adaptor::New( Window window, Configuration::ContextLoss configuration ) +void Adaptor::RunIdles() { - return Internal::Adaptor::Adaptor::Get(); + for( auto& callback : mCallbacks ) + { + CallbackBase::Execute( *callback ); + } + + mCallbacks.Clear(); } -Adaptor& Adaptor::New( Window window, const Dali::RenderSurfaceInterface& surface ) +Dali::RenderSurfaceInterface& Adaptor::GetSurface() { - return Internal::Adaptor::Adaptor::Get(); + DALI_ASSERT_ALWAYS( ! mWindows.empty() ); + + return reinterpret_cast < Dali::RenderSurfaceInterface& >( mWindows.front().GetRenderSurface() ); } -Adaptor& Adaptor::New( Window window, const Dali::RenderSurfaceInterface& surface, Configuration::ContextLoss configuration ) +Dali::WindowContainer Adaptor::GetWindows() { - return Internal::Adaptor::Adaptor::Get(); + return mWindows; } -Adaptor& Adaptor::New( Dali::Integration::SceneHolder window ) +Dali::Adaptor::AdaptorSignalType& Adaptor::ResizedSignal() { - return Internal::Adaptor::Adaptor::Get(); + return mResizedSignal; } -Adaptor& Adaptor::New( Dali::Integration::SceneHolder window, Configuration::ContextLoss configuration ) +Dali::Adaptor::AdaptorSignalType& Adaptor::LanguageChangedSignal() { - return Internal::Adaptor::Adaptor::Get(); + return mLanguageChangedSignal; } -Adaptor& Adaptor::New( Dali::Integration::SceneHolder window, const Dali::RenderSurfaceInterface& surface ) +Dali::Adaptor::WindowCreatedSignalType& Adaptor::WindowCreatedSignal() { - return Internal::Adaptor::Adaptor::Get(); + return mWindowCreatedSignal; } -Adaptor& Adaptor::New( Dali::Integration::SceneHolder window, const Dali::RenderSurfaceInterface& surface, Configuration::ContextLoss configuration ) +} // namespace Adaptor +} // namespace Internal + +/////////////////////////////////////////////////////////////////////////////// +// +// Dali::Adaptor Stub +// +/////////////////////////////////////////////////////////////////////////////// + +Adaptor::Adaptor() +: mImpl( new Internal::Adaptor::Adaptor ) { - return Internal::Adaptor::Adaptor::Get(); } Adaptor::~Adaptor() { + Internal::Adaptor::gAdaptor = nullptr; + delete mImpl; } void Adaptor::Start() @@ -142,34 +194,12 @@ void Adaptor::Stop() bool Adaptor::AddIdle( CallbackBase* callback, bool hasReturnValue ) { - const bool isAvailable = IsAvailable(); - - if( isAvailable ) - { - Internal::Adaptor::Adaptor::mCallbacks.PushBack( callback ); - } - - return isAvailable; + return mImpl->AddIdle( callback, hasReturnValue ); } void Adaptor::RemoveIdle( CallbackBase* callback ) { - const bool isAvailable = IsAvailable(); - - if( isAvailable ) - { - for( Vector::Iterator it = Internal::Adaptor::Adaptor::mCallbacks.Begin(), - endIt = Internal::Adaptor::Adaptor::mCallbacks.End(); - it != endIt; - ++it ) - { - if( callback == *it ) - { - Internal::Adaptor::Adaptor::mCallbacks.Remove( it ); - return; - } - } - } + mImpl->RemoveIdle( callback ); } void Adaptor::ReplaceSurface( Window window, Dali::RenderSurfaceInterface& surface ) @@ -182,27 +212,27 @@ void Adaptor::ReplaceSurface( Dali::Integration::SceneHolder window, Dali::Rende Adaptor::AdaptorSignalType& Adaptor::ResizedSignal() { - return Internal::Adaptor::Adaptor::AdaptorSignal(); + return mImpl->ResizedSignal(); } Adaptor::AdaptorSignalType& Adaptor::LanguageChangedSignal() { - return Internal::Adaptor::Adaptor::AdaptorSignal(); + return mImpl->LanguageChangedSignal(); } Adaptor::WindowCreatedSignalType& Adaptor::WindowCreatedSignal() { - return Internal::Adaptor::Adaptor::WindowCreatedSignal(); + return mImpl->WindowCreatedSignal(); } Dali::RenderSurfaceInterface& Adaptor::GetSurface() { - return Internal::Adaptor::Adaptor::GetSurface(); + return mImpl->GetSurface(); } Dali::WindowContainer Adaptor::GetWindows() const { - return Internal::Adaptor::Adaptor::GetWindows(); + return mImpl->GetWindows(); } Any Adaptor::GetNativeWindowHandle() @@ -226,7 +256,7 @@ Adaptor& Adaptor::Get() bool Adaptor::IsAvailable() { - return Internal::Adaptor::Adaptor::mAvailable; + return Internal::Adaptor::gAdaptor; } void Adaptor::NotifySceneCreated() @@ -253,24 +283,6 @@ void Adaptor::SceneCreated() { } -class LogFactory : public LogFactoryInterface -{ -public: - virtual void InstallLogFunction() const - { - Dali::Integration::Log::LogFunction logFunction(&TestApplication::LogMessage); - Dali::Integration::Log::InstallLogFunction(logFunction); - } - - LogFactory() - { - } - virtual ~LogFactory() - { - } -}; - -LogFactory* gLogFactory = NULL; const LogFactoryInterface& Adaptor::GetLogFactory() { if( gLogFactory == NULL ) @@ -280,15 +292,4 @@ const LogFactoryInterface& Adaptor::GetLogFactory() return *gLogFactory; } -Adaptor::Adaptor() -: mImpl( NULL ) -{ - Dali::PositionSize win_size; - win_size.width = 640; - win_size.height = 800; - - Dali::Window window = Dali::Window::New( win_size, "" ); - Internal::Adaptor::Adaptor::mWindows.push_back( window ); -} - } // namespace Dali diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-test-application.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-test-application.cpp new file mode 100644 index 0000000..53cd1d9 --- /dev/null +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-test-application.cpp @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// CLASS HEADER +#include + +// INTERNAL INCLUDES +#include +#include +#include +#include +#include +#include + +namespace Dali +{ + +using AdaptorImpl = Dali::Internal::Adaptor::Adaptor; + +ToolkitTestApplication::ToolkitTestApplication( size_t surfaceWidth, size_t surfaceHeight, float horizontalDpi, float verticalDpi ) +: TestApplication( surfaceWidth, surfaceHeight, horizontalDpi, verticalDpi, ResourcePolicy::DALI_DISCARDS_ALL_DATA, false /* Do not Initialize Core */ ), + mAdaptor( &AdaptorImpl::New() ) // Need to create Adaptor first as many singletons in dali-adaptor need it +{ + // Create Core next + CreateCore(); + + // Override Scene creation in TestApplication by creating a window. + // The window will create a Scene & surface and set up the scene's surface appropriately. + Window window( Window::New( PositionSize( 0, 0, surfaceWidth, surfaceHeight ), "" ) ); + mScene = AdaptorImpl::GetScene( window ); + mRenderSurface = dynamic_cast< TestRenderSurface* >( mScene.GetSurface() ); + mScene.SetDpi( Vector2( horizontalDpi, verticalDpi ) ); + + // Core needs to be initialized next before we start the adaptor + InitializeCore(); + + auto singletonService = SingletonService::Get(); + Test::SetApplication( singletonService, *this ); + + // This will also emit the window created signals + AdaptorImpl::GetImpl( *mAdaptor ).Start( window ); + + Dali::LifecycleController lifecycleController = Dali::LifecycleController::Get(); + lifecycleController.InitSignal().Emit(); + + // set the DPI value for font rendering + TextAbstraction::FontClient fontClient = Dali::TextAbstraction::FontClient::Get(); + if( fontClient ) + { + fontClient.SetDpi( mDpi.x, mDpi.y ); + } +} + +ToolkitTestApplication::~ToolkitTestApplication() +{ + // Need to delete core before we delete the adaptor. + delete mCore; + mCore = NULL; + + // Set mRenderSurface to null, it will be deleted by the window that owns it + mRenderSurface = nullptr; +} + +void ToolkitTestApplication::RunIdles() +{ + AdaptorImpl::GetImpl( *mAdaptor.get() ).RunIdles(); +} + +} // namespace Dali diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-test-application.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-test-application.h index de2d0c4..a984a37 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-test-application.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-test-application.h @@ -18,19 +18,21 @@ * */ +// EXTERNAL INCLUDES +#include + // INTERNAL INCLUDES #include -#include -#include -#include -#include -#include namespace Dali { +class Adaptor; + /** * Adds some functionality on top of TestApplication that is required by the Toolkit. + * + * This includes creation and destruction of the Adaptor and Window classes. */ class ToolkitTestApplication : public TestApplication { @@ -39,53 +41,9 @@ public: ToolkitTestApplication( size_t surfaceWidth = DEFAULT_SURFACE_WIDTH, size_t surfaceHeight = DEFAULT_SURFACE_HEIGHT, float horizontalDpi = DEFAULT_HORIZONTAL_DPI, - float verticalDpi = DEFAULT_VERTICAL_DPI ) - : TestApplication( surfaceWidth, surfaceHeight, horizontalDpi, verticalDpi ) - { - auto singletonService = SingletonService::Get(); - Test::SetApplication( singletonService, *this ); - - // set the DPI value for font rendering - Dali::TextAbstraction::FontClient fontClient = Dali::TextAbstraction::FontClient::Get(); - if( fontClient ) - { - fontClient.SetDpi( mDpi.x, mDpi.y ); - } - - bool isAdaptorAvailable = Dali::Internal::Adaptor::Adaptor::Get().IsAvailable(); - if ( isAdaptorAvailable ) - { - Dali::LifecycleController lifecycleController = Dali::LifecycleController::Get(); - lifecycleController.InitSignal().Emit(); - - Dali::Window window = Dali::Internal::Adaptor::Adaptor::mWindows.front(); - if ( window ) - { - Dali::Internal::Adaptor::Adaptor::WindowCreatedSignal().Emit( window ); - } - } - } + float verticalDpi = DEFAULT_VERTICAL_DPI ); - ~ToolkitTestApplication() - { - // Need to delete core before we delete the adaptor. - delete mCore; - mCore = NULL; - } - - //ToolkitOrientation& GetOrientation() - //{ - //return mOrientation; - //} - - /** - * @brief Creates an adaptor implementation for those controls like the - * text-field and the text-editor which connects a callback to the idle signal. - */ - void CreateAdaptor() - { - Adaptor::Get(); - } + ~ToolkitTestApplication(); /** * @brief Executes the idle callbacks. @@ -93,26 +51,10 @@ public: * Some controls like the text-field and the text-editor connect callbacks to the * idle signal. */ - void RunIdles() - { - if( Adaptor::IsAvailable() ) - { - for( Vector::Iterator it = Internal::Adaptor::Adaptor::mCallbacks.Begin(), - endIt = Internal::Adaptor::Adaptor::mCallbacks.End(); - it != endIt; - ++it ) - { - CallbackBase* callback = *it; - - CallbackBase::Execute( *callback ); - } - - Internal::Adaptor::Adaptor::mCallbacks.Clear(); - } - } + void RunIdles(); private: - //ToolkitOrientation mOrientation; + std::unique_ptr< Adaptor > mAdaptor; }; } // namespace Dali diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp index 05c4836..48453d6 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp @@ -15,6 +15,9 @@ * */ +// CLASS HEADER +#include "toolkit-window.h" + // EXTERNAL INCLUDES #include #include @@ -22,7 +25,7 @@ #include // INTERNAL INCLUDES -#include "toolkit-window.h" +#include "test-render-surface.h" namespace Dali { @@ -37,33 +40,42 @@ namespace Internal { namespace Adaptor { - class Window : public Dali::BaseObject { public: - Window() + Window( const PositionSize& positionSize ) + : mScene( Dali::Integration::Scene::New( Size( positionSize.width, positionSize.height ) ) ), + mRenderSurface( new TestRenderSurface( positionSize ) ) { + mScene.SetSurface( *mRenderSurface ); } virtual ~Window() { + delete mRenderSurface; + mRenderSurface = nullptr; } static Window* New(const PositionSize& positionSize, const std::string& name, const std::string& className, bool isTransparent) { - return new Window(); + return new Window( positionSize ); } - static Dali::Window Get( Dali::Actor actor ) - { - return Dali::Window(); - } + Integration::Scene mScene; + TestRenderSurface* mRenderSurface; }; } // Adaptor } // Internal +inline Internal::Adaptor::Window& GetImplementation(Dali::Window& window) +{ + DALI_ASSERT_ALWAYS( window && "Window handle is empty" ); + BaseObject& object = window.GetBaseObject(); + return static_cast(object); +} + Window::Window() { } @@ -94,22 +106,42 @@ Window::Window( Internal::Adaptor::Window* window ) { } +Integration::Scene Window::GetScene() +{ + return GetImplementation( *this ).mScene; +} + +Integration::RenderSurface& Window::GetRenderSurface() +{ + return *GetImplementation( *this ).mRenderSurface; +} + namespace DevelWindow { Window Get( Actor actor ) { - return Internal::Adaptor::Window::Get( actor ); + return Window(); +} + +EventProcessingFinishedSignalType& EventProcessingFinishedSignal( Window window ) +{ + return GetImplementation( window ).mScene.EventProcessingFinishedSignal(); } KeyEventSignalType& KeyEventSignal( Window window ) { - return Dali::Stage::GetCurrent().KeyEventSignal(); + return GetImplementation( window ).mScene.KeyEventSignal(); } TouchSignalType& TouchSignal( Window window ) { - return Dali::Stage::GetCurrent().TouchSignal(); + return GetImplementation( window ).mScene.TouchSignal(); +} + +WheelEventSignalType& WheelEventSignal( Window window ) +{ + return GetImplementation( window ).mScene.WheelEventSignal(); } } // namespace DevelWindow diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.h index 4c95ad7..c830af5 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.h @@ -23,14 +23,16 @@ #include #include #include +#include namespace Dali { class Actor; class Layer; -class KeyEvent; +struct KeyEvent; class TouchData; +struct WheelEvent; typedef Dali::Rect PositionSize; @@ -48,25 +50,33 @@ public: static Window New(PositionSize windowPosition, const std::string& name, bool isTransparent = false); static Window New(PositionSize windowPosition, const std::string& name, const std::string& className, bool isTransparent = false); + Window(); ~Window(); Window(const Window& handle); Window& operator=(const Window& rhs); Layer GetRootLayer() const; + Integration::Scene GetScene(); + Integration::RenderSurface& GetRenderSurface(); + public: explicit Window( Internal::Adaptor::Window* window ); }; namespace DevelWindow { - +typedef Signal< void () > EventProcessingFinishedSignalType; typedef Signal< void (const KeyEvent&) > KeyEventSignalType; typedef Signal< void (const TouchData&) > TouchSignalType; +typedef Signal< void (const WheelEvent&) > WheelEventSignalType; Dali::Window Get( Actor actor ); + +EventProcessingFinishedSignalType& EventProcessingFinishedSignal( Window window ); KeyEventSignalType& KeyEventSignal( Dali::Window window ); TouchSignalType& TouchSignal( Dali::Window window ); +WheelEventSignalType& WheelEventSignal( Window window ); } diff --git a/automated-tests/src/dali-toolkit/utc-Dali-AsyncImageLoader.cpp b/automated-tests/src/dali-toolkit/utc-Dali-AsyncImageLoader.cpp index 6e99e48..ac4bcde 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-AsyncImageLoader.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-AsyncImageLoader.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. @@ -141,6 +141,8 @@ int UtcDaliAsyncImageLoaderAssignmentOperator(void) int UtcDaliAsyncImageLoaderDownCastP(void) { + ToolkitTestApplication application; + AsyncImageLoader asyncImageLoader = AsyncImageLoader::New(); BaseHandle object(asyncImageLoader); @@ -153,6 +155,8 @@ int UtcDaliAsyncImageLoaderDownCastP(void) int UtcDaliAsyncImageLoaderDownCastN(void) { + ToolkitTestApplication application; + BaseHandle unInitializedObject; AsyncImageLoader asyncImageLoader = AsyncImageLoader::DownCast( unInitializedObject ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp b/automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp index 1544a60..83c9595 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. @@ -70,7 +70,7 @@ void checkbox_button_cleanup(void) int UtcDaliCheckBoxButtonConstructorP(void) { - TestApplication application; + ToolkitTestApplication application; CheckBoxButton checkBox; @@ -80,7 +80,7 @@ int UtcDaliCheckBoxButtonConstructorP(void) int UtcDaliCheckBoxButtonCopyConstructorP(void) { - TestApplication application; + ToolkitTestApplication application; // Initialize an object, ref count == 1 CheckBoxButton checkBox = CheckBoxButton::New(); @@ -92,7 +92,7 @@ int UtcDaliCheckBoxButtonCopyConstructorP(void) int UtcDaliCheckBoxButtonAssignmentOperatorP(void) { - TestApplication application; + ToolkitTestApplication application; CheckBoxButton checkBox = CheckBoxButton::New(); @@ -105,7 +105,7 @@ int UtcDaliCheckBoxButtonAssignmentOperatorP(void) int UtcDaliCheckBoxButtonNewP(void) { - TestApplication application; + ToolkitTestApplication application; CheckBoxButton checkBox = CheckBoxButton::New(); @@ -115,7 +115,7 @@ int UtcDaliCheckBoxButtonNewP(void) int UtcDaliCheckBoxButtonDownCastP(void) { - TestApplication application; + ToolkitTestApplication application; CheckBoxButton checkBox = CheckBoxButton::New(); @@ -131,7 +131,7 @@ int UtcDaliCheckBoxButtonDownCastP(void) int UtcDaliCheckBoxButtonDownCastN(void) { - TestApplication application; + ToolkitTestApplication application; BaseHandle unInitializedObject; @@ -173,7 +173,7 @@ int UtcDaliCheckBoxButtonSelectedPropertyP(void) int UtcDaliCheckBoxSetLabelP(void) { - TestApplication application; + ToolkitTestApplication application; CheckBoxButton checkBox = CheckBoxButton::New(); @@ -191,7 +191,7 @@ int UtcDaliCheckBoxSetLabelP(void) int UtcDaliCheckBoxSetDisabledPropertyP(void) { - TestApplication application; + ToolkitTestApplication application; CheckBoxButton checkBox = CheckBoxButton::New(); Stage::GetCurrent().Add( checkBox ); @@ -362,7 +362,7 @@ int UtcDaliCheckBoxButtonSetGetSelected(void) int UtcDaliCheckBoxSetLabelDisabledP(void) { - TestApplication application; + ToolkitTestApplication application; CheckBoxButton checkBox = CheckBoxButton::New(); Stage::GetCurrent().Add( checkBox ); @@ -386,4 +386,4 @@ int UtcDaliCheckBoxSetLabelDisabledP(void) DALI_TEST_EQUALS( checkBox.GetLabelText(), "activate", TEST_LOCATION ); END_TEST; -} \ No newline at end of file +} diff --git a/automated-tests/src/dali-toolkit/utc-Dali-DragAndDropDetector.cpp b/automated-tests/src/dali-toolkit/utc-Dali-DragAndDropDetector.cpp index e1282ad..17686c1 100755 --- a/automated-tests/src/dali-toolkit/utc-Dali-DragAndDropDetector.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-DragAndDropDetector.cpp @@ -266,7 +266,7 @@ int UtcDaliDragAndDropDetectorGetAttachedControlP(void) int UtcDaliDragAndDropDetectorStartSignal(void) { - TestApplication application; + ToolkitTestApplication application; Dali::Toolkit::DragAndDropDetector detector = Dali::Toolkit::DragAndDropDetector::New(); Control control = Control::New(); @@ -297,7 +297,7 @@ int UtcDaliDragAndDropDetectorStartSignal(void) int UtcDaliDragAndDropDetectorEnteredSignal(void) { - TestApplication application; + ToolkitTestApplication application; Dali::Toolkit::DragAndDropDetector detector = Dali::Toolkit::DragAndDropDetector::New(); Control control1 = Control::New(); @@ -340,7 +340,7 @@ int UtcDaliDragAndDropDetectorEnteredSignal(void) int UtcDaliDragAndDropDetectorMovedSignal(void) { - TestApplication application; + ToolkitTestApplication application; Dali::Toolkit::DragAndDropDetector detector = Dali::Toolkit::DragAndDropDetector::New(); Control control1 = Control::New(); @@ -387,7 +387,7 @@ int UtcDaliDragAndDropDetectorMovedSignal(void) int UtcDaliDragAndDropDetectorExitedSignal(void) { - TestApplication application; + ToolkitTestApplication application; Dali::Toolkit::DragAndDropDetector detector = Dali::Toolkit::DragAndDropDetector::New(); Control control1 = Control::New(); @@ -435,7 +435,7 @@ int UtcDaliDragAndDropDetectorExitedSignal(void) int UtcDaliDragAndDropDetectorDroppedSignal(void) { - TestApplication application; + ToolkitTestApplication application; Dali::Toolkit::DragAndDropDetector detector = Dali::Toolkit::DragAndDropDetector::New(); Control control1 = Control::New(); @@ -483,7 +483,7 @@ int UtcDaliDragAndDropDetectorDroppedSignal(void) int UtcDaliDragAndDropDetectorEndedSignal(void) { - TestApplication application; + ToolkitTestApplication application; Dali::Toolkit::DragAndDropDetector detector = Dali::Toolkit::DragAndDropDetector::New(); Control control1 = Control::New(); @@ -523,7 +523,7 @@ int UtcDaliDragAndDropDetectorEndedSignal(void) int UtcDaliDragAndDropDetectorGetContent(void) { - TestApplication application; + ToolkitTestApplication application; Dali::Toolkit::DragAndDropDetector detector = Dali::Toolkit::DragAndDropDetector::New(); Control control1 = Control::New(); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ImageAtlas.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ImageAtlas.cpp index b605fc4..0422166 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ImageAtlas.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ImageAtlas.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. @@ -276,7 +276,7 @@ int UtcDaliImageAtlasUploadP(void) int UtcDaliImageAtlasUploadWithObserver01(void) { - TestApplication application; + ToolkitTestApplication application; ImageAtlas atlas = ImageAtlas::New( 200, 200 ); @@ -303,7 +303,7 @@ int UtcDaliImageAtlasUploadWithObserver01(void) int UtcDaliImageAtlasUploadWithObserver02(void) { - TestApplication application; + ToolkitTestApplication application; ImageAtlas atlas = ImageAtlas::New( 200, 200 ); gCountOfTestFuncCall = 0; @@ -333,7 +333,7 @@ int UtcDaliImageAtlasUploadWithObserver02(void) int UtcDaliImageAtlasUploadWithObserver03(void) { - TestApplication application; + ToolkitTestApplication application; gCountOfTestFuncCall = 0; TestUploadObserver* uploadObserver = new TestUploadObserver; @@ -364,7 +364,7 @@ int UtcDaliImageAtlasUploadWithObserver03(void) int UtcDaliImageAtlasRemove(void) { - TestApplication application; + ToolkitTestApplication application; unsigned int size = 100; ImageAtlas atlas = ImageAtlas::New( size, size ); Vector4 textureRect1; diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp index 965e258..2c23106 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp @@ -163,7 +163,7 @@ void TestUrl( ImageView imageView, const std::string url ) int UtcDaliImageViewNewP(void) { - TestApplication application; + ToolkitTestApplication application; ImageView imageView = ImageView::New(); @@ -174,7 +174,7 @@ int UtcDaliImageViewNewP(void) int UtcDaliImageViewNewImageP(void) { - TestApplication application; + ToolkitTestApplication application; BufferImage image = CreateBufferImage( 100, 200, Vector4( 1.f, 1.f, 1.f, 1.f ) ); ImageView imageView = ImageView::New( image ); @@ -187,7 +187,7 @@ int UtcDaliImageViewNewImageP(void) int UtcDaliImageViewNewUrlP(void) { - TestApplication application; + ToolkitTestApplication application; ImageView imageView = ImageView::New( TEST_IMAGE_FILE_NAME ); DALI_TEST_CHECK( imageView ); @@ -199,7 +199,7 @@ int UtcDaliImageViewNewUrlP(void) int UtcDaliImageViewConstructorP(void) { - TestApplication application; + ToolkitTestApplication application; ImageView imageView; @@ -210,7 +210,7 @@ int UtcDaliImageViewConstructorP(void) int UtcDaliImageViewCopyConstructorP(void) { - TestApplication application; + ToolkitTestApplication application; // Initialize an object, ref count == 1 ImageView imageView = ImageView::New(); @@ -223,7 +223,7 @@ int UtcDaliImageViewCopyConstructorP(void) int UtcDaliImageViewAssignmentOperatorP(void) { - TestApplication application; + ToolkitTestApplication application; ImageView imageView = ImageView::New(); @@ -236,7 +236,7 @@ int UtcDaliImageViewAssignmentOperatorP(void) int UtcDaliImageViewDownCastP(void) { - TestApplication application; + ToolkitTestApplication application; ImageView imageView = ImageView::New(); @@ -253,7 +253,7 @@ int UtcDaliImageViewDownCastP(void) int UtcDaliImageViewDownCastN(void) { - TestApplication application; + ToolkitTestApplication application; BaseHandle unInitializedObject; diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp index f56c3c1..91c9a79 100755 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -924,15 +925,13 @@ int utcDaliTextEditorTextChangedP(void) int utcDaliTextEditorInputStyleChanged01(void) { - ToolkitTestApplication application; - tet_infoline(" utcDaliTextEditorInputStyleChanged01"); - // The text-editor emits signals when the input style changes. These changes of style are // detected during the relayout process (size negotiation), i.e after the cursor has been moved. Signals // can't be emitted during the size negotiation as the callbacks may update the UI. // The text-editor adds an idle callback to the adaptor to emit the signals after the size negotiation. - // This creates an implementation of the adaptor stub and a queue of idle callbacks. - application.CreateAdaptor(); + // The ToolkitTestApplication creates an implementation of the adaptor stub and a queue of idle callbacks. + ToolkitTestApplication application; + tet_infoline(" utcDaliTextEditorInputStyleChanged01"); // Load some fonts. @@ -1140,15 +1139,13 @@ int utcDaliTextEditorInputStyleChanged01(void) int utcDaliTextEditorInputStyleChanged02(void) { - ToolkitTestApplication application; - tet_infoline(" utcDaliTextEditorInputStyleChanged02"); - // The text-editor emits signals when the input style changes. These changes of style are // detected during the relayout process (size negotiation), i.e after the cursor has been moved. Signals // can't be emitted during the size negotiation as the callbacks may update the UI. // The text-editor adds an idle callback to the adaptor to emit the signals after the size negotiation. - // This creates an implementation of the adaptor stub and a queue of idle callbacks. - application.CreateAdaptor(); + // The ToolkitTestApplication creates an implementation of the adaptor stub and a queue of idle callbacks. + ToolkitTestApplication application; + tet_infoline(" utcDaliTextEditorInputStyleChanged02"); // Load some fonts. diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp index 9ff0f65..881fdde 100755 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -1091,15 +1092,13 @@ int utcDaliTextFieldMaxCharactersReachedN(void) int utcDaliTextFieldInputStyleChanged01(void) { - ToolkitTestApplication application; - tet_infoline(" utcDaliTextFieldInputStyleChanged01"); - // The text-field emits signals when the input style changes. These changes of style are // detected during the relayout process (size negotiation), i.e after the cursor has been moved. Signals // can't be emitted during the size negotiation as the callbacks may update the UI. // The text-field adds an idle callback to the adaptor to emit the signals after the size negotiation. - // This creates an implementation of the adaptor stub and a queue of idle callbacks. - application.CreateAdaptor(); + // The ToolkitTestApplication creates an implementation of the adaptor stub and a queue of idle callbacks. + ToolkitTestApplication application; + tet_infoline(" utcDaliTextFieldInputStyleChanged01"); // Load some fonts. @@ -1302,15 +1301,13 @@ int utcDaliTextFieldInputStyleChanged01(void) int utcDaliTextFieldInputStyleChanged02(void) { - ToolkitTestApplication application; - tet_infoline(" utcDaliTextFieldInputStyleChanged02"); - // The text-field emits signals when the input style changes. These changes of style are // detected during the relayout process (size negotiation), i.e after the cursor has been moved. Signals // can't be emitted during the size negotiation as the callbacks may update the UI. // The text-field adds an idle callback to the adaptor to emit the signals after the size negotiation. - // This creates an implementation of the adaptor stub and a queue of idle callbacks. - application.CreateAdaptor(); + // The ToolkitTestApplication creates an implementation of the adaptor stub and a queue of idle callbacks. + ToolkitTestApplication application; + tet_infoline(" utcDaliTextFieldInputStyleChanged02"); // Load some fonts. diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp index 9eea425..d8c5f70 100755 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include using namespace Dali; diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TransitionData.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TransitionData.cpp index 3850d2a..1db1bc5 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TransitionData.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TransitionData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. @@ -136,7 +136,7 @@ void CHECK_MAP_EQUALS( Property::Map test, Property::Map result ) int UtcDaliTransitionDataNew(void) { - TestApplication application; + ToolkitTestApplication application; Property::Map map = CreateMap(); Dali::Toolkit::TransitionData transition = TransitionData::New( map ); @@ -147,7 +147,7 @@ int UtcDaliTransitionDataNew(void) int UtcDaliTransitionDataDownCast(void) { - TestApplication application; + ToolkitTestApplication application; Property::Map map = CreateMap(); @@ -161,7 +161,7 @@ int UtcDaliTransitionDataDownCast(void) int UtcDaliTransitionDataCopyConstructor(void) { - TestApplication application; + ToolkitTestApplication application; Property::Map map = CreateMap(); @@ -176,7 +176,7 @@ int UtcDaliTransitionDataCopyConstructor(void) int UtcDaliTransitionDataAssignmentOperator(void) { - TestApplication application; + ToolkitTestApplication application; Property::Map map = CreateMap(); @@ -195,7 +195,7 @@ int UtcDaliTransitionDataAssignmentOperator(void) int UtcDaliTransitionDataCount(void) { - TestApplication application; + ToolkitTestApplication application; Property::Map map = CreateMap(); TransitionData transitionData = TransitionData::New( map ); @@ -216,7 +216,7 @@ int UtcDaliTransitionDataCount(void) int UtcDaliTransitionDataMap1P(void) { - TestApplication application; + ToolkitTestApplication application; tet_printf("Testing animation of a visual property using stylesheet equivalent maps\n"); @@ -284,7 +284,7 @@ int UtcDaliTransitionDataMap1P(void) int UtcDaliTransitionDataMap2P(void) { - TestApplication application; + ToolkitTestApplication application; tet_printf("Testing animation of a visual property using programmatic maps\n"); @@ -352,7 +352,7 @@ int UtcDaliTransitionDataMap2P(void) int UtcDaliTransitionDataMap2Pb(void) { - TestApplication application; + ToolkitTestApplication application; tet_printf("Testing animation of a visual property using programmatic maps\n"); @@ -424,7 +424,7 @@ int UtcDaliTransitionDataMap2Pb(void) int UtcDaliTransitionDataMap3P(void) { - TestApplication application; + ToolkitTestApplication application; tet_printf("Testing animation of an actor's position property using bezier curve\n"); @@ -480,7 +480,7 @@ int UtcDaliTransitionDataMap3P(void) int UtcDaliTransitionDataMap4P(void) { - TestApplication application; + ToolkitTestApplication application; tet_printf("Testing animation of a visual's transform property using programmatic maps\n"); @@ -552,7 +552,7 @@ int UtcDaliTransitionDataMap4P(void) int UtcDaliTransitionDataMap5P(void) { - TestApplication application; + ToolkitTestApplication application; tet_printf("Testing animation visual opacity using stylesheet equivalent maps\n"); @@ -625,7 +625,7 @@ int UtcDaliTransitionDataMap5P(void) int UtcDaliTransitionDataMap6P(void) { - TestApplication application; + ToolkitTestApplication application; tet_printf("Testing animation visual opacity using stylesheet equivalent maps\n"); @@ -699,7 +699,7 @@ int UtcDaliTransitionDataMap6P(void) int UtcDaliTransitionDataMap1N(void) { - TestApplication application; + ToolkitTestApplication application; Property::Map map; map["target"] = "Actor1"; @@ -731,7 +731,7 @@ int UtcDaliTransitionDataMap1N(void) int UtcDaliTransitionDataMapN3(void) { - TestApplication application; + ToolkitTestApplication application; tet_printf("Testing visual lookup with no renderers\n"); @@ -773,7 +773,7 @@ int UtcDaliTransitionDataMapN3(void) int UtcDaliTransitionDataMapN4(void) { - TestApplication application; + ToolkitTestApplication application; tet_printf("Testing visual doesn't animate with duff bezier data \n"); @@ -825,7 +825,7 @@ int UtcDaliTransitionDataMapN4(void) int UtcDaliTransitionDataMapN5(void) { - TestApplication application; + ToolkitTestApplication application; tet_printf("Testing visual doesn't animate with duff bezier data \n"); @@ -876,7 +876,7 @@ int UtcDaliTransitionDataMapN5(void) int UtcDaliTransitionDataMapN6(void) { - TestApplication application; + ToolkitTestApplication application; tet_printf("Testing visual doesn't animate with duff bezier data \n"); @@ -929,7 +929,7 @@ int UtcDaliTransitionDataMapN6(void) int UtcDaliTransitionDataArrayP(void) { - TestApplication application; + ToolkitTestApplication application; Property::Map map1; map1["target"] = "Actor1"; @@ -1005,7 +1005,7 @@ int UtcDaliTransitionDataArrayP(void) int UtcDaliTransitionDataGetAnimatorP(void) { - TestApplication application; + ToolkitTestApplication application; Property::Map map1; map1["target"] = "Actor1"; diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp index aee2e2f..374afe0 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include