X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftoolkit-event-thread-callback.h;h=f3dc1344d2d9c397915f68c21f9b095eef02d1c4;hb=59314022f6789147a47a8b098433e211b6185625;hp=d67ca24676b8d69f85ca339afdc0bb5845ff44cd;hpb=f3c7e52f300fc2f6d07bcbd75ad3b992e19083f5;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-event-thread-callback.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-event-thread-callback.h index d67ca24..f3dc134 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-event-thread-callback.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-event-thread-callback.h @@ -2,7 +2,7 @@ #define __DALI_TOOLKIT_EVENT_THREAD_CALLBACK_H__ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,13 +20,13 @@ #define __DALI_EVENT_THREAD_CALLBACK_H_ // EXTERNAL INCLUDES -#include +#include #include namespace Dali { -class DALI_IMPORT_API EventThreadCallback +class DALI_TOOLKIT_API EventThreadCallback { public: @@ -36,12 +36,10 @@ public: void Trigger(); - void WaitingForTrigger(unsigned int count); + bool WaitingForTrigger(); CallbackBase* GetCallback(); - static EventThreadCallback* Get(); - private: // undefined copy constructor. @@ -58,4 +56,19 @@ private: } +namespace Test +{ + +/** + * Wait for the tested code to create an event trigger, then + * wait for triggerCount Trigger calls to occur, and execute the trigger + * callback afterwards. + * + * Will wait for a maximum of 30s before failing the test and returning. + */ +bool WaitForEventThreadTrigger( int triggerCount, int timeoutInSeconds=30 ); + +} + + #endif /* __DALI_TOOLKIT_EVENT_THREAD_CALLBACK_H__ */