diff options
author | tof <> | 2008-10-16 09:08:42 +0000 |
---|---|---|
committer | tof <> | 2008-10-16 09:08:42 +0000 |
commit | 53410c113ce3abe579744f991ed410c4b390ce34 (patch) | |
tree | d5d9651657b060398f655644088f9b9c6511c362 /tests/FunctionalTests/tickets | |
parent | 8f5dc4638ef7378db6572aae23b524b8b5a6a1fe (diff) |
Add (manual only) test for #925
Diffstat (limited to 'tests/FunctionalTests/tickets')
-rwxr-xr-x | tests/FunctionalTests/tickets/protected/pages/Ticket925.page | 11 | ||||
-rwxr-xr-x | tests/FunctionalTests/tickets/protected/pages/Ticket925.php | 76 |
2 files changed, 87 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket925.page b/tests/FunctionalTests/tickets/protected/pages/Ticket925.page new file mode 100755 index 00000000..cdb1e0fe --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket925.page @@ -0,0 +1,11 @@ +<com:TContent ID="Content"> + <com:TTimeTriggeredCallback id="timer1" Interval="2" OnCallback="timer1callback"/> + <com:TTimeTriggeredCallback id="timer2" Interval="1" OnCallback="timer2callback" StartTimerOnLoad="true"/> + Timer 1 : <com:TActiveLabel id="timer1result"/><br/> + Timer 2 : <com:TActiveLabel id="timer2result"/><br/> + <com:TActiveButton OnClick="startTimer1" Text="Start Timer1"/> + <com:TActiveButton OnClick="stopTimer1" Text="Stop Timer1"/> + <com:TActiveButton OnClick="startTimer2" Text="Start Timer2"/> + <com:TActiveButton OnClick="stopTimer2" Text="Stop Timer2"/> + <com:TActiveButton OnClick="changeIntervalTimer1" Text="Change Interval of Timer1 to 1 sec"/> +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket925.php b/tests/FunctionalTests/tickets/protected/pages/Ticket925.php new file mode 100755 index 00000000..0284bd66 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket925.php @@ -0,0 +1,76 @@ +<?php + +prado::using('System.Web.UI.ActiveControls.*'); + +class Ticket925 extends TPage +{ + public function getTimer1Value() + { + return $this->getViewState('timer1', 0); + } + + public function getTimer2Value() + { + return $this->getViewState('timer2', 0); + } + + public function setTimer1Value($value) + { + $this->setViewState('timer1', $value, 0); + } + + public function setTimer2Value($value) + { + $this->setViewState('timer2', $value, 0); + } + + public function startTimer1($sender, $param) + { + $this->timer1->startTimer(); + } + + public function stopTimer1($sender, $param) + { + $this->timer1->stopTimer(); + } + + public function startTimer2($sender, $param) + { + $this->timer2->startTimer(); + } + + public function stopTimer2($sender, $param) + { + $this->timer2->stopTimer(); + } + + public function changeIntervalTimer1($sender, $param) + { + $this->timer1->setInterval(1); + } + + public function timer1callback ($sender, $param) + { + $this->timer1result->Text .= ($this->Timer1Value+=$this->timer1->Interval).'... '; + if ($this->Timer1Value > 20) + { + $this->timer1Value=0; + $this->timer1result->Text=''; + $this->timer1->stopTimer(); + } + + } + + public function timer2callback ($sender, $param) + { + $this->timer2result->Text .= ($this->Timer2Value+=$this->timer2->Interval).'... '; + if ($this->Timer2Value > 20) + { + $this->timer2Value=0; + $this->timer2result->Text=''; + $this->timer2->stopTimer(); + } + } + +} +?>
\ No newline at end of file |