[Laszlo-dev] For Review: Change change.YnPVbvuCF.txt Summary: Rewrite LzTimer to use setInterval/clearInterval instead of LzIdle
Max Carlson
max at laszlosystems.com
Wed Jun 28 20:21:38 EDT 2006
Jim Grandy wrote:
> [Take 3. This time with a unit test. Sorry for the churn!]
>
> Change change.YnPVbvuCF.txt by jgrandyw at jgrandy-pb.local
> /Volumes/data/Users/jgrandyw/dev/svn/openlaszlo/trunk/ on 2006-06-27
> 21:55:28 PDT
>
> Summary: Rewrite LzTimer to use setInterval/clearInterval instead of LzIdle
>
> Bugs Fixed:LPP-296
>
> Technical Reviewer: max
> QA Reviewer: mamye
> Doc Reviewer:
>
> Release Notes:LzTimer now uses the semi-standard functions setInterval and
> clearInterval, and as a result is more efficient than the previous
> implementation,
> which was based on polling through LzIdle. Unit test now included,
> although it
> only exercises the non-asynchronous portions of the API
> (add/remove/reset without
> ever letting a timer fire).
>
> Tests:test/lfc/lzunit-timer.lzx, test/doubleclick.lzx,
> examples/mobile/clock/clock-test.lzx, smoketest
>
> Files:
> M test/doubleclick.lzx
> M test/lfc/lzunit-timer.lzx
> M WEB-INF/lps/lfc/services/LzTimer.as
>
The unit test fails for me (swf8 firefox):
ERROR: after add 1,2: expected 0 got 1
ERROR: after add 2,1: expected 1 got 2
ERROR: after add 2,2: expected 1 got 2
ERROR: after remove 2,2: expected 0 got 1
ERROR: same timer 2: expected 3 got 2
ERROR: same timer 1: expected 2 got 3
The double-click testcase seems happy...
-Max
More information about the Laszlo-dev
mailing list