summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/qa/cppunit/timer.cxx26
1 files changed, 22 insertions, 4 deletions
diff --git a/vcl/qa/cppunit/timer.cxx b/vcl/qa/cppunit/timer.cxx
index a0860009ca6d..4e2bb5647f7d 100644
--- a/vcl/qa/cppunit/timer.cxx
+++ b/vcl/qa/cppunit/timer.cxx
@@ -79,13 +79,31 @@ void TimerTest::testWatchdog()
}
#endif
+// --------------------------------------------------------------------
-void TimerTest::testIdle()
+class IdleBool : public Idle
{
-// Add an idle handler
-// forcible execute that lot first ... and ...
+ bool &mrBool;
+public:
+ IdleBool( bool &rBool ) :
+ Idle( VCL_IDLE_PRIORITY_LOWEST ), mrBool( rBool )
+ {
+ Start();
+ mrBool = false;
+ }
+ virtual void Timeout() SAL_OVERRIDE
+ {
+ mrBool = true;
+ Application::EndYield();
+ }
+};
-// Error ...
+void TimerTest::testIdle()
+{
+ bool bTriggered = false;
+ IdleBool aTest( bTriggered );
+ Timer::ProcessAllIdleHandlers();
+ CPPUNIT_ASSERT_MESSAGE("watchdog triggered", bTriggered);
}
// --------------------------------------------------------------------