Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#11402 closed defect (fixed)

Firefox: tests._base.fx test failure

Reported by: Chris Mitchell Owned by: bill
Priority: high Milestone: 1.5
Component: Core Version: 1.5.0b2
Keywords: Cc:
Blocked By: Blocking:

Description

GROUP "tests._base.fx" has 1 test to run

17 tests to run in 1 groups ------------------------------------------------------------ GROUP "t" has 17 tests to run PASSED test: ../../dojo/tests/_base/fx.html::t::fadeOut 526 ms PASSED test: ../../dojo/tests/_base/fx.html::t::fadeIn 536 ms PASSED test: ../../dojo/tests/_base/fx.html::t::animateColor 510 ms PASSED test: ../../dojo/tests/_base/fx.html::t::animateColorBack 511 ms PASSED test: ../../dojo/tests/_base/fx.html::t::animateHeight 519 ms PASSED test: ../../dojo/tests/_base/fx.html::t::animateHeight_defaults_syntax 539 ms PASSED test: ../../dojo/tests/_base/fx.html::t::inlineWidth 598 ms

ERROR IN:

(function () {var id = "baz";dojo.style("bar", "display", "none");dojo.style(id, "display", "");var kickoff = (new Date).valueOf();var startWidth = dojo.marginBox(id).w;var endWidth = Math.round(startWidth / 2);var d = new (doh.Deferred);var anim = dojo.anim(id, {width: endWidth, opacity: 0}, duration, null, function () {var elapsed = (new Date).valueOf() - anim._startTime;doh.t(elapsed >= duration);doh.t((new Date).valueOf() >= kickoff + duration + 500);doh.is(dojo.marginBox(id).w, endWidth);doh.is(dojo.style(id, "opacity"), 0);d.callback(true);}, 500);return d;})

FAILED test: ../../dojo/tests/_base/fx.html::t::anim 1263 ms PASSED test: ../../dojo/tests/_base/fx.html::t::anim_defaults 386 ms PASSED test: ../../dojo/tests/_base/fx.html::t::anim-fn-property 1 ms PASSED test: ../../dojo/tests/_base/fx.html::t::anim-fn-property-return-fn 1 ms PASSED test: ../../dojo/tests/_base/fx.html::t::anim-fn-prop-end 14 ms PASSED test: ../../dojo/tests/_base/fx.html::t::anim-fn-prop-start 2 ms PASSED test: ../../dojo/tests/_base/fx.html::t::anim-onend-node 172 ms PASSED test: ../../dojo/tests/_base/fx.html::t::anim-beforebegin-node 13 ms PASSED test: ../../dojo/tests/_base/fx.html::t::anim-onend-scope 111 ms PASSED test: ../../dojo/tests/_base/fx.html::t::anim-onend-scope-natural 125 ms PASSED test: ../../dojo/tests/_base/fx.html 6224 ms

Change History (4)

comment:1 Changed 9 years ago by bill

Milestone: tbd1.5
Owner: changed from anonymous to bill
Status: newassigned
Summary: Firefox3.0: tests._base.fx test failureFirefox: tests._base.fx test failure

This fails on FF3.6 and 4.0beta too, so it's broken everywhere on FF. Works on IE8 in IE7/compat mode. That test file itself has issues, so if this is just a test file problem I'll fix it.

comment:2 Changed 9 years ago by bill

(In [22462]) Various test fixes:

  1. Naked DOH assertions in asynchronous code are lost. Need to surround them with d.addTestCallback()/d.addTestErrback() (or a custom try/catch calling d.errback() on failure).
  2. Multiple doh.t() (or doh.anything()) calls need to have a comment as the final argument, so we can differentiate in the test output which failed.
  3. Some tests were "finishing" while the animation was still running. Made the tests run sequentially.
  4. anim_defaults created an animation but never played it, seems like it was a bug so I changed it to run

Refs #11402

comment:3 Changed 9 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [22463]) Apparently on FF, setTimeout(foo, 500) may fire slightly before 500ms, similar to how sleep(10) in C can fire any time after 9s. Fixes intermittent FF test failure by ignoring slightly faster execution than expected. Fixes #11402.

comment:4 Changed 9 years ago by bill

(In [22464]) Naked DOH assertions in asynchronous code are lost. Need to surround them with d.addTestCallback()/d.addTestErrback() (or a custom try/catch calling d.errback() on failure). Refs #11402.

Note: See TracTickets for help on using tickets.