Merge "Remove FrameBufferImage" into devel/master
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 18 Jul 2019 14:04:01 +0000 (14:04 +0000)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Thu, 18 Jul 2019 14:04:01 +0000 (14:04 +0000)
26 files changed:
automated-tests/src/dali-toolkit-internal/CMakeLists.txt
automated-tests/src/dali-toolkit-styling/CMakeLists.txt
automated-tests/src/dali-toolkit-styling/utc-Dali-StyleManager.cpp
automated-tests/src/dali-toolkit-third-party/CMakeLists.txt
automated-tests/src/dali-toolkit-third-party/utc-Dali-Flexbox-Layout.cpp
automated-tests/src/dali-toolkit/CMakeLists.txt
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-context-helper-abstraction.h [new file with mode: 0644]
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor-impl.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-input-method-options.cpp [new file with mode: 0644]
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-test-application.cpp [new file with mode: 0644]
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-test-application.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.h
automated-tests/src/dali-toolkit/utc-Dali-AsyncImageLoader.cpp
automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp
automated-tests/src/dali-toolkit/utc-Dali-DragAndDropDetector.cpp
automated-tests/src/dali-toolkit/utc-Dali-ImageAtlas.cpp
automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp
automated-tests/src/dali-toolkit/utc-Dali-TransitionData.cpp
automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp

index 1754324..4037aac 100755 (executable)
@@ -41,11 +41,13 @@ LIST(APPEND TC_SOURCES
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-event-thread-callback.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-environment-variable.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-input-method-context.cpp
+   ../dali-toolkit/dali-toolkit-test-utils/toolkit-input-method-options.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-lifecycle-controller.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-orientation.cpp
    ../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
index 68bbd23..1c62f77 100644 (file)
@@ -22,6 +22,7 @@ LIST(APPEND TC_SOURCES
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-environment-variable.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-feedback-player.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-input-method-context.cpp
+   ../dali-toolkit/dali-toolkit-test-utils/toolkit-input-method-options.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-lifecycle-controller.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-native-image-source.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-orientation.cpp
@@ -29,6 +30,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
@@ -55,11 +57,6 @@ LIST(APPEND TC_SOURCES
 PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
   dali-core
   dali-toolkit
-  dali-adaptor
-)
-
-PKG_CHECK_MODULES(DALI_ADAPTOR REQUIRED
-  dali-adaptor
 )
 
 ADD_COMPILE_OPTIONS( -O0 -ggdb --coverage -Wall -Werror )
index 3103f35..94d625d 100755 (executable)
@@ -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.
@@ -88,7 +88,7 @@ Integration::Bitmap* CreateBitmap( unsigned int imageWidth, unsigned int imageHe
   return bitmap;
 }
 
-Integration::ResourcePointer CustomizeNinePatch( TestApplication& application,
+Integration::ResourcePointer CustomizeNinePatch( ToolkitTestApplication& application,
                                                  unsigned int ninePatchImageWidth,
                                                  unsigned int ninePatchImageHeight)
 {
@@ -119,7 +119,7 @@ int UtcDaliStyleManagerConstructorP(void)
 
 int UtcDaliStyleManagerCopyConstructorP(void)
 {
-  TestApplication application;
+  ToolkitTestApplication application;
 
   StyleManager styleManager = StyleManager::Get();
   StyleManager copyOfStyleManager( styleManager );
@@ -130,7 +130,7 @@ int UtcDaliStyleManagerCopyConstructorP(void)
 
 int UtcDaliStyleManagerAssignmentOperatorP(void)
 {
-  TestApplication application;
+  ToolkitTestApplication application;
 
   StyleManager styleManager = StyleManager::Get();
   StyleManager copyOfStyleManager = styleManager;
index 084c2d5..dfbe07f 100644 (file)
@@ -12,22 +12,7 @@ SET(TC_SOURCES
 
 # Append list of test harness files (Won't get parsed for test cases)
 LIST(APPEND TC_SOURCES
-   ../dali-toolkit/dali-toolkit-test-utils/toolkit-accessibility-adaptor.cpp
-   ../dali-toolkit/dali-toolkit-test-utils/toolkit-application.cpp
-   ../dali-toolkit/dali-toolkit-test-utils/toolkit-clipboard.cpp
-   ../dali-toolkit/dali-toolkit-test-utils/toolkit-clipboard-event-notifier.cpp
-   ../dali-toolkit/dali-toolkit-test-utils/toolkit-event-thread-callback.cpp
-   ../dali-toolkit/dali-toolkit-test-utils/toolkit-environment-variable.cpp
-   ../dali-toolkit/dali-toolkit-test-utils/toolkit-input-method-context.cpp
-   ../dali-toolkit/dali-toolkit-test-utils/toolkit-orientation.cpp
-   ../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-timer.cpp
-   ../dali-toolkit/dali-toolkit-test-utils/toolkit-tts-player.cpp
    ../dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.cpp
-   ../dali-toolkit/dali-toolkit-test-utils/dali-toolkit-test-suite-utils.cpp
-   ../dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp
    ../dali-toolkit/dali-toolkit-test-utils/mesh-builder.cpp
    ../dali-toolkit/dali-toolkit-test-utils/test-actor-utils.cpp
    ../dali-toolkit/dali-toolkit-test-utils/test-animation-data.cpp
@@ -51,8 +36,8 @@ PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
 )
 
 # Locate GTest
-cmake_minimum_required(VERSION 2.6)
-find_package(GTest REQUIRED)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+FIND_PACKAGE(GTest REQUIRED)
 
 #ADD_COMPILE_OPTIONS( -O0 -ggdb --coverage -Wall -Werror )
 # ADD_COMPILE_OPTIONS( ${${CAPI_LIB}_CFLAGS_OTHER} )
index 465e7f3..0ae564f 100644 (file)
@@ -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.
@@ -17,7 +17,7 @@
 
 #include <cstdlib>
 
-#include <dali-toolkit-test-suite-utils.h>
+#include <dali-test-suite-utils.h>
 // GTest fails to compile with "error: return-statement with a value, in function returning 'void'" error
 // if using dali assert function so define new assert with returning void.
 #define _ASSERT_H_
index 91613bc..21eb07c 100755 (executable)
@@ -81,19 +81,21 @@ LIST(APPEND TC_SOURCES
   dali-toolkit-test-utils/toolkit-event-thread-callback.cpp
   dali-toolkit-test-utils/toolkit-environment-variable.cpp
   dali-toolkit-test-utils/toolkit-input-method-context.cpp
+  dali-toolkit-test-utils/toolkit-input-method-options.cpp
   dali-toolkit-test-utils/toolkit-lifecycle-controller.cpp
   dali-toolkit-test-utils/toolkit-orientation.cpp
   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
index 0b98b27..6e41c42 100644 (file)
@@ -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;
 
@@ -47,6 +58,7 @@ void TestApplication::Initialize()
                                         mPlatformAbstraction,
                                         mGlAbstraction,
                                         mGlSyncAbstraction,
+                                        mGlContextHelperAbstraction,
                                         mDataRetentionPolicy,
                                         Integration::RenderToFrameBuffer::FALSE,
                                         Integration::DepthBufferAvailable::TRUE,
@@ -61,15 +73,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<float>( mSurfaceWidth ), static_cast<float>( mSurfaceHeight ) ) );
   mScene.SetSurface( *mRenderSurface );
-
   mScene.SetDpi( Vector2( static_cast<float>( mDpi.x ), static_cast<float>( mDpi.y ) ) );
 
   mCore->SurfaceResized( mRenderSurface );
+}
 
+void TestApplication::InitializeCore()
+{
   mCore->SceneCreated();
   mCore->Initialize();
 }
@@ -140,6 +157,11 @@ TestGlSyncAbstraction& TestApplication::GetGlSyncAbstraction()
   return mGlSyncAbstraction;
 }
 
+TestGlContextHelperAbstraction& TestApplication::GetGlContextHelperAbstraction()
+{
+  return mGlContextHelperAbstraction;
+}
+
 void TestApplication::ProcessEvent(const Integration::Event& event)
 {
   mCore->QueueEvent(event);
index 99cb1ce..cc694df 100644 (file)
@@ -22,6 +22,7 @@
 #include <test-platform-abstraction.h>
 #include "test-gl-sync-abstraction.h"
 #include "test-gl-abstraction.h"
+#include "test-gl-context-helper-abstraction.h"
 #include "test-render-controller.h"
 #include "test-render-surface.h"
 #include <dali/public-api/common/dali-common.h>
@@ -40,13 +41,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 +52,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 );
@@ -67,6 +67,7 @@ public:
   TestRenderController& GetRenderController();
   TestGlAbstraction& GetGlAbstraction();
   TestGlSyncAbstraction& GetGlSyncAbstraction();
+  TestGlContextHelperAbstraction& GetGlContextHelperAbstraction();
   void ProcessEvent(const Integration::Event& event);
   void SendNotification();
   bool Render( uint32_t intervalMilliseconds = DEFAULT_RENDER_INTERVAL, const char* location=NULL );
@@ -94,6 +95,7 @@ protected:
   TestRenderController      mRenderController;
   TestGlAbstraction         mGlAbstraction;
   TestGlSyncAbstraction     mGlSyncAbstraction;
+  TestGlContextHelperAbstraction mGlContextHelperAbstraction;
   TestRenderSurface*        mRenderSurface;
 
   Integration::UpdateStatus mStatus;
diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-context-helper-abstraction.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-context-helper-abstraction.h
new file mode 100644 (file)
index 0000000..0442f0d
--- /dev/null
@@ -0,0 +1,71 @@
+#ifndef TEST_GL_CONTEXT_HELPER_ABSTRACTION_H
+#define TEST_GL_CONTEXT_HELPER_ABSTRACTION_H
+
+/*
+ * 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.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali/integration-api/gl-context-helper-abstraction.h>
+
+namespace Dali
+{
+
+/**
+ * Class to emulate the GL context helper
+ */
+class DALI_CORE_API TestGlContextHelperAbstraction: public Integration::GlContextHelperAbstraction
+{
+public:
+  /**
+   * Constructor
+   */
+  TestGlContextHelperAbstraction() {};
+
+  /**
+   * Destructor
+   */
+  ~TestGlContextHelperAbstraction() {};
+
+  /**
+   * @brief Switch to the surfaceless GL context
+   */
+  virtual void MakeSurfacelessContextCurrent() {};
+
+  /**
+   * @brief Switch to the GL context of the specific render surface
+   * @param[in] surface The render surface
+   */
+  virtual void MakeContextCurrent( Integration::RenderSurface* surface ) {};
+
+  /**
+   * @brief Clear the GL context
+   */
+  virtual void MakeContextNull() {};
+
+  /**
+   * @brief Wait until all GL rendering calls for the current GL context are executed
+   */
+  virtual void WaitClient() {};
+private:
+
+  TestGlContextHelperAbstraction( const TestGlContextHelperAbstraction& ); ///< Undefined
+  TestGlContextHelperAbstraction& operator=( const TestGlContextHelperAbstraction& ); ///< Undefined
+};
+
+} // Dali
+
+#endif // TEST_GL_CONTEXT_HELPER_ABSTRACTION_H
index e49b358..dd7f469 100644 (file)
@@ -27,6 +27,11 @@ class DisplayConnection;
 class ThreadSynchronizationInterface;
 class Window;
 
+namespace Integration
+{
+class Scene;
+}
+
 using WindowContainer = std::vector<Window>;
 
 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<CallbackBase*> 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<CallbackBase*> mCallbacks;
+  Dali::WindowContainer mWindows;
+  Dali::Adaptor::AdaptorSignalType mResizedSignal;
+  Dali::Adaptor::AdaptorSignalType mLanguageChangedSignal;
+  Dali::Adaptor::WindowCreatedSignalType mWindowCreatedSignal;
 };
 
 } // namespace Adaptor
index 6507583..63bacde 100644 (file)
@@ -15,6 +15,8 @@
  *
  */
 
+#include <algorithm>
+
 #include <toolkit-window.h>
 
 // Don't want to include the actual window.h which otherwise will be indirectly included by adaptor.h.
 
 #include <dali/integration-api/adaptors/scene-holder.h>
 
-#include <dali/public-api/object/base-object.h>
-
 #include <toolkit-adaptor-impl.h>
 #include <dali/integration-api/debug.h>
+#include <dali/integration-api/scene.h>
 #include <test-application.h>
 #include <test-render-surface.h>
 
 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<CallbackBase*> Adaptor::mCallbacks = Vector<CallbackBase*>();
-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 <Dali::RenderSurfaceInterface*>( 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<CallbackBase*>::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-input-method-options.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-input-method-options.cpp
new file mode 100644 (file)
index 0000000..b306e7e
--- /dev/null
@@ -0,0 +1,174 @@
+/*
+ * 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.
+ *
+ */
+
+/**
+ * This is a copy of dali-adaptor/devel-api/adaptor-framework/input-method-options.cpp.
+ */
+
+// CLASS HEADER
+#include <dali/devel-api/adaptor-framework/input-method-options.h>
+
+using namespace Dali::InputMethod;
+using namespace Dali::InputMethod::Category;
+
+namespace Dali
+{
+
+#define TOKEN_STRING(x) #x
+
+struct InputMethodOptions::Impl
+{
+  Impl()
+  {
+    mPanelLayout = PanelLayout::NORMAL;
+    mAutoCapital = AutoCapital::SENTENCE;
+    mButtonAction = ButtonAction::DEFAULT;
+    mVariation = NormalLayout::NORMAL;
+  }
+
+  PanelLayout::Type mPanelLayout;
+  AutoCapital::Type mAutoCapital;
+  ButtonAction::Type mButtonAction;
+  int mVariation:4;
+};
+
+InputMethodOptions::InputMethodOptions()
+{
+  mImpl.reset(new Impl());
+}
+
+InputMethodOptions::~InputMethodOptions()
+{
+  // destructor cannot be inlined and must be in a unit
+  // for unique_ptr to work with forward declaration
+}
+
+bool InputMethodOptions::IsPassword() const
+{
+  return (mImpl->mPanelLayout == Dali::InputMethod::PanelLayout::PASSWORD);
+}
+
+void InputMethodOptions::ApplyProperty( const Property::Map& settings )
+{
+  for ( unsigned int i = 0, count = settings.Count(); i < count; ++i )
+  {
+    Property::Key key = settings.GetKeyAt( i );
+    if( key.type == Property::Key::INDEX )
+    {
+      continue;
+    }
+
+    Property::Value item = settings.GetValue(i);
+
+    if( key == TOKEN_STRING( PANEL_LAYOUT ) )
+    {
+      if( item.GetType() == Property::INTEGER )
+      {
+        int value = item.Get< int >();
+        mImpl->mPanelLayout = static_cast<InputMethod::PanelLayout::Type>(value);
+      }
+    }
+    else if ( key == TOKEN_STRING( BUTTON_ACTION ) )
+    {
+      if ( item.GetType() == Property::INTEGER )
+      {
+        int value = item.Get< int >();
+        mImpl->mButtonAction = static_cast<InputMethod::ButtonAction::Type>(value);
+      }
+    }
+    else if ( key == TOKEN_STRING( AUTO_CAPITALIZE ) )
+    {
+      if ( item.GetType() == Property::INTEGER )
+      {
+        int value = item.Get< int >();
+        mImpl->mAutoCapital = static_cast<InputMethod::AutoCapital::Type>(value);
+      }
+    }
+    else if( key == TOKEN_STRING( VARIATION ) )
+    {
+      if( item.GetType() == Property::INTEGER )
+      {
+        int value = item.Get< int >();
+        mImpl->mVariation = value;
+      }
+    }
+    else
+    {
+    }
+  }
+}
+
+void InputMethodOptions::RetrieveProperty( Property::Map& settings )
+{
+  settings[TOKEN_STRING( PANEL_LAYOUT )] = mImpl->mPanelLayout;
+  settings[TOKEN_STRING( BUTTON_ACTION )] = mImpl->mButtonAction;
+  settings[TOKEN_STRING( AUTO_CAPITALIZE )] = mImpl->mAutoCapital;
+  settings[TOKEN_STRING( VARIATION )] = mImpl->mVariation;
+}
+
+bool InputMethodOptions::CompareAndSet( InputMethod::Category::Type type, const InputMethodOptions& options, int& index)
+{
+  return true;
+  bool updated = false;
+
+  switch (type)
+  {
+    case PANEL_LAYOUT:
+    {
+      if ( options.mImpl->mPanelLayout != mImpl->mPanelLayout )
+      {
+        mImpl->mPanelLayout = options.mImpl->mPanelLayout;
+        index = static_cast<int>(mImpl->mPanelLayout);
+        updated = true;
+      }
+      break;
+    }
+    case BUTTON_ACTION:
+    {
+      if ( options.mImpl->mButtonAction != mImpl->mButtonAction )
+      {
+        mImpl->mButtonAction = options.mImpl->mButtonAction;
+        index = static_cast<int>(mImpl->mButtonAction);
+        updated = true;
+      }
+      break;
+    }
+    case AUTO_CAPITALIZE:
+    {
+      if ( options.mImpl->mAutoCapital != mImpl->mAutoCapital )
+      {
+        mImpl->mAutoCapital = options.mImpl->mAutoCapital;
+        index = static_cast<int>(mImpl->mAutoCapital);
+        updated = true;
+      }
+      break;
+    }
+    case VARIATION:
+    {
+      if ( options.mImpl->mVariation != mImpl->mVariation )
+      {
+        mImpl->mVariation = options.mImpl->mVariation;
+        index = static_cast<int>(mImpl->mVariation);
+        updated = true;
+      }
+      break;
+    }
+  }
+  return updated;
+}
+
+} // 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 (file)
index 0000000..53cd1d9
--- /dev/null
@@ -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 <toolkit-test-application.h>
+
+// INTERNAL INCLUDES
+#include <dali-test-suite-utils.h>
+#include <dali/devel-api/text-abstraction/font-client.h>
+#include <dali/integration-api/adaptors/adaptor.h>
+#include <toolkit-adaptor-impl.h>
+#include <toolkit-singleton-service.h>
+#include <toolkit-lifecycle-controller.h>
+
+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
index de2d0c4..a984a37 100644 (file)
  *
  */
 
+// EXTERNAL INCLUDES
+#include <memory>
+
 // INTERNAL INCLUDES
 #include <dali-test-suite-utils.h>
-#include <dali/devel-api/text-abstraction/font-client.h>
-#include <dali/integration-api/adaptors/adaptor.h>
-#include <toolkit-adaptor-impl.h>
-#include <toolkit-singleton-service.h>
-#include <toolkit-lifecycle-controller.h>
 
 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<CallbackBase*>::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
index 05c4836..1b8cdbd 100644 (file)
@@ -15,6 +15,9 @@
  *
  */
 
+// CLASS HEADER
+#include "toolkit-window.h"
+
 // EXTERNAL INCLUDES
 #include <dali/public-api/actors/actor.h>
 #include <dali/public-api/actors/layer.h>
@@ -22,7 +25,7 @@
 #include <dali/public-api/object/base-object.h>
 
 // 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<Internal::Adaptor::Window&>(object);
+}
+
 Window::Window()
 {
 }
@@ -72,6 +84,17 @@ Window::~Window()
 {
 }
 
+Window::Window(const Window& handle)
+: BaseHandle( handle )
+{
+}
+
+Window& Window::operator=(const Window& rhs)
+{
+  BaseHandle::operator=(rhs);
+  return *this;
+}
+
 Dali::Window Window::New( PositionSize windowPosition, const std::string& name, bool isTransparent )
 {
   Internal::Adaptor::Window* window = Internal::Adaptor::Window::New( windowPosition, name, "", isTransparent );
@@ -94,22 +117,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
index 4c95ad7..c830af5 100644 (file)
 #include <dali/public-api/math/rect.h>
 #include <dali/public-api/object/base-handle.h>
 #include <dali/public-api/signals/dali-signal.h>
+#include <dali/integration-api/scene.h>
 
 namespace Dali
 {
 
 class Actor;
 class Layer;
-class KeyEvent;
+struct KeyEvent;
 class TouchData;
+struct WheelEvent;
 
 typedef Dali::Rect<int> 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 );
 
 }
 
index 6e99e48..ac4bcde 100644 (file)
@@ -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 );
 
index 1544a60..83c9595 100644 (file)
@@ -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
+}
index e1282ad..17686c1 100755 (executable)
@@ -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();
index b605fc4..0422166 100644 (file)
@@ -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;
index 965e258..2c23106 100644 (file)
@@ -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;
 
index f56c3c1..91c9a79 100755 (executable)
@@ -21,6 +21,7 @@
 #include <dali/public-api/rendering/renderer.h>
 #include <dali/devel-api/adaptor-framework/clipboard.h>
 #include <dali/devel-api/adaptor-framework/key-devel.h>
+#include <dali/devel-api/text-abstraction/font-client.h>
 #include <dali/integration-api/events/key-event-integ.h>
 #include <dali/integration-api/events/touch-event-integ.h>
 #include <dali-toolkit-test-suite-utils.h>
@@ -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.
 
index 9ff0f65..881fdde 100755 (executable)
@@ -24,6 +24,7 @@
 #include <dali/integration-api/events/touch-event-integ.h>
 
 #include <dali/devel-api/adaptor-framework/key-devel.h>
+#include <dali/devel-api/text-abstraction/font-client.h>
 #include <dali-toolkit-test-suite-utils.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/devel-api/controls/text-controls/text-field-devel.h>
@@ -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.
 
index 9eea425..d8c5f70 100755 (executable)
@@ -25,6 +25,7 @@
 #include <dali-toolkit/devel-api/controls/text-controls/text-style-properties-devel.h>
 #include <dali-toolkit/devel-api/text/text-enumerations-devel.h>
 #include <dali/devel-api/text-abstraction/bitmap-font.h>
+#include <dali/devel-api/text-abstraction/font-client.h>
 #include <dali-toolkit/devel-api/text/bitmap-font.h>
 
 using namespace Dali;
index 3850d2a..1db1bc5 100644 (file)
@@ -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";
index aee2e2f..374afe0 100644 (file)
@@ -21,6 +21,7 @@
 #include <toolkit-event-thread-callback.h>
 #include <dali-toolkit-test-suite-utils.h>
 #include <dali/devel-api/object/handle-devel.h>
+#include <dali/devel-api/text-abstraction/font-client.h>
 #include <dali-toolkit/devel-api/controls/control-devel.h>
 #include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>