X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-platform-abstraction%2Futc-image-loading-common.h;h=fd17d9dc75b64aab9d51094414d9e40d311d6770;hb=afe08dc50446f00bb0f78439960be465bcb2e7aa;hp=4bec44b3318620f52ecff10ba10c0b2e3947fe6a;hpb=5c0a37bfda9d6655dd4f17442dedcbb022b500fd;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/automated-tests/src/dali-platform-abstraction/utc-image-loading-common.h b/automated-tests/src/dali-platform-abstraction/utc-image-loading-common.h index 4bec44b..fd17d9d 100644 --- a/automated-tests/src/dali-platform-abstraction/utc-image-loading-common.h +++ b/automated-tests/src/dali-platform-abstraction/utc-image-loading-common.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 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. @@ -15,19 +15,18 @@ * */ -#ifndef __DALI_TEST_SUITE_IMAGE_LOADING_COMMON_H__ -#define __DALI_TEST_SUITE_IMAGE_LOADING_COMMON_H__ +#ifndef DALI_TEST_SUITE_IMAGE_LOADING_COMMON_H +#define DALI_TEST_SUITE_IMAGE_LOADING_COMMON_H +#include +#include +#include +#include #include +#include #include -#include -#include -#include -#include "tizen-platform-abstraction.h" -#include "resource-collector.h" using namespace Dali; using namespace Dali::Integration; -using namespace Dali::Internal::Platform; namespace { @@ -56,33 +55,25 @@ const char* const VALID_IMAGES[] = { TEST_IMAGE_DIR "/frac.24.bmp", TEST_IMAGE_DIR "/frac.png", TEST_IMAGE_DIR "/interlaced.gif", - TEST_IMAGE_DIR "/pattern.gif" -}; + TEST_IMAGE_DIR "/pattern.gif", + TEST_IMAGE_DIR "/fractal-compressed-ETC1_RGB8_OES-45x80.ktx", + TEST_IMAGE_DIR "/fractal-compressed-RGBA_ASTC_4x4_KHR-32x64.astc", + TEST_IMAGE_DIR "/test-image-4x4-32bpp.ico", + TEST_IMAGE_DIR "/test-image.wbmp"}; const unsigned NUM_VALID_IMAGES = sizeof(VALID_IMAGES) / sizeof(VALID_IMAGES[0]); -///@ToDo: Add valid ktx, ico, and wbmp image examples. - -/** Returns elapsed milliseconds. */ -double GetTimeMilliseconds( Integration::PlatformAbstraction& abstraction ) -{ - unsigned int seconds; - unsigned int microseconds; - abstraction.GetTimeMicroseconds( seconds, microseconds ); - double milliseconds = seconds * 1000.0 + microseconds / 1000.0; - return milliseconds; -} - -} // anon namespace +} // namespace /** Live platform abstraction recreated for each test case. */ -extern Integration::PlatformAbstraction * gAbstraction; +extern TizenPlatform::TizenPlatformAbstraction* gAbstraction; -/** A variety of ImageAttributes to reach different code paths that have embedded code paths. */ -typedef std::pair > > ImageAttributes; -extern std::vector gCancelAttributes; +/** A variety of parameters to reach different code paths in the image loading. */ +typedef std::pair > > ImageParameters; +extern std::vector gCancelAttributes; +double GetTimeMilliseconds(Integration::PlatformAbstraction& abstraction); ///< Returns elapsed milliseconds. void utc_dali_loading_startup(void); void utc_dali_loading_cleanup(void); -#endif // __DALI_TEST_SUITE_IMAGE_LOADING_COMMON_H__ +#endif // DALI_TEST_SUITE_IMAGE_LOADING_COMMON_H