projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Outline effect has been fixed to be not front cropped." into devel/master
[platform/core/uifw/dali-toolkit.git]
/
automated-tests
/
src
/
dali-toolkit
/
dali-toolkit-test-utils
/
toolkit-timer.cpp
diff --git
a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-timer.cpp
b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-timer.cpp
index
2f1ce14
..
2259719
100644
(file)
--- a/
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-timer.cpp
+++ b/
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-timer.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 201
5
Samsung Electronics Co., Ltd.
+ * Copyright (c) 201
6
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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-35,6
+35,7
@@
class Timer;
typedef IntrusivePtr<Timer> TimerPtr;
Dali::Timer::TimerSignalType gTickSignal;
typedef IntrusivePtr<Timer> TimerPtr;
Dali::Timer::TimerSignalType gTickSignal;
+int gTimerCount = 0;
/**
* Implementation of the timer
/**
* Implementation of the timer
@@
-98,10
+99,12
@@
TimerPtr Timer::New( unsigned int milliSec )
Timer::Timer( unsigned int milliSec )
: mInterval( milliSec )
{
Timer::Timer( unsigned int milliSec )
: mInterval( milliSec )
{
+ ++gTimerCount;
}
Timer::~Timer()
{
}
Timer::~Timer()
{
+ --gTimerCount;
}
void Timer::Start()
}
void Timer::Start()
@@
-141,7
+144,11
@@
Dali::Timer::TimerSignalType& Timer::TickSignal()
void Timer::MockEmitSignal()
{
void Timer::MockEmitSignal()
{
- gTickSignal.Emit();
+ if( gTimerCount > 1 )
+ {
+ // Only emit the signal if we have more than just the timer created in the test function
+ gTickSignal.Emit();
+ }
}
}
@@
-227,3
+234,18
@@
void Timer::MockEmitSignal()
} // namespace Dali
} // namespace Dali
+
+namespace Test
+{
+
+int GetTimerCount()
+{
+ return Dali::Internal::Adaptor::gTimerCount;
+}
+
+void EmitGlobalTimerSignal()
+{
+ Dali::Internal::Adaptor::gTickSignal.Emit();
+}
+
+}