Merge "Automated test fix for framebuffer creation" into devel/master
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / test-platform-abstraction.cpp
index a8a47e0..ad8de5c 100644 (file)
@@ -64,20 +64,26 @@ void TestPlatformAbstraction::Resume()
   mTrace.PushCall("Resume", "");
 }
 
-void TestPlatformAbstraction::GetClosestImageSize( const std::string& filename,
-                                                   const ImageAttributes& attributes,
-                                                   Vector2& closestSize)
+ImageDimensions TestPlatformAbstraction::GetClosestImageSize( const std::string& filename,
+                                                              ImageDimensions size,
+                                                              FittingMode::Type scalingMode,
+                                                              SamplingMode::Type samplingMode,
+                                                              bool orientationCorrection )
 {
-  closestSize = mClosestSize;
+  ImageDimensions closestSize = ImageDimensions( mClosestSize.x, mClosestSize.y );
   mTrace.PushCall("GetClosestImageSize", "");
+  return closestSize;
 }
 
-void TestPlatformAbstraction::GetClosestImageSize( Integration::ResourcePointer resourceBuffer,
-                                                   const ImageAttributes& attributes,
-                                                   Vector2& closestSize)
+ImageDimensions TestPlatformAbstraction::GetClosestImageSize( Integration::ResourcePointer resourceBuffer,
+                                                   ImageDimensions size,
+                                                   FittingMode::Type scalingMode,
+                                                   SamplingMode::Type samplingMode,
+                                                   bool orientationCorrection )
 {
-  closestSize = mClosestSize;
+  ImageDimensions closestSize = ImageDimensions( mClosestSize.x, mClosestSize.y );
   mTrace.PushCall("GetClosestImageSize", "");
+  return closestSize;
 }
 
 /**
@@ -160,6 +166,23 @@ bool TestPlatformAbstraction::IsLoading()
 }
 
 /**
+ * @copydoc PlatformAbstraction::GetDefaultFontDescription()
+ */
+void TestPlatformAbstraction::GetDefaultFontDescription( std::string& family, std::string& style ) const
+{
+  // TODO
+}
+
+/**
+ * @copydoc PlatformAbstraction::GetDefaultFontSize()
+ */
+int TestPlatformAbstraction::GetDefaultFontSize() const
+{
+  // TODO
+  return int();
+}
+
+/**
  * @copydoc PlatformAbstraction::SetDpi()
  */
 void TestPlatformAbstraction::SetDpi (unsigned int dpiHorizontal, unsigned int dpiVertical)
@@ -182,6 +205,20 @@ bool TestPlatformAbstraction::LoadFile( const std::string& filename, std::vector
 }
 
 /**
+ * @copydoc PlatformAbstraction::LoadShaderBinFile()
+ */
+bool TestPlatformAbstraction::LoadShaderBinFile( const std::string& filename, std::vector< unsigned char >& buffer ) const
+{
+  mTrace.PushCall("LoadShaderBinFile", "");
+  if( mLoadFileResult.loadResult )
+  {
+    buffer = mLoadFileResult.buffer;
+  }
+
+  return mLoadFileResult.loadResult;
+}
+
+/**
  * @copydoc PlatformAbstraction::SaveFile()
  */
 bool TestPlatformAbstraction::SaveFile(const std::string& filename, std::vector< unsigned char >& buffer) const
@@ -195,12 +232,6 @@ void TestPlatformAbstraction::JoinLoaderThreads()
   mTrace.PushCall("JoinLoaderThreads", "");
 }
 
-Integration::DynamicsFactory* TestPlatformAbstraction::GetDynamicsFactory()
-{
-  mTrace.PushCall("GetDynamicsFactory", "");
-  return NULL;
-}
-
 /** Call this every test */
 void TestPlatformAbstraction::Initialize()
 {
@@ -229,13 +260,13 @@ bool TestPlatformAbstraction::WasCalled(TestFuncEnum func)
     case LoadResourceFunc:                    return mTrace.FindMethod("LoadResource");
     case SaveResourceFunc:                    return mTrace.FindMethod("SaveResource");
     case LoadFileFunc:                        return mTrace.FindMethod("LoadFile");
+    case LoadShaderBinFileFunc:               return mTrace.FindMethod("LoadShaderBinFile");
     case SaveFileFunc:                        return mTrace.FindMethod("SaveFile");
     case CancelLoadFunc:                      return mTrace.FindMethod("CancelLoad");
     case GetResourcesFunc:                    return mTrace.FindMethod("GetResources");
     case IsLoadingFunc:                       return mTrace.FindMethod("IsLoading");
     case SetDpiFunc:                          return mTrace.FindMethod("SetDpi");
     case JoinLoaderThreadsFunc:               return mTrace.FindMethod("JoinLoaderThreads");
-    case GetDynamicsFactoryFunc:              return mTrace.FindMethod("GetDynamicsFactory");
   }
   return false;
 }