Last Comment Bug 761326 - test_2d.path.arc.scale.1 assumes unrealistic 0.098 tolerance or luck
: test_2d.path.arc.scale.1 assumes unrealistic 0.098 tolerance or luck
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Canvas: 2D (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla16
Assigned To: Benoit Jacob [:bjacob] (mostly away)
:
: Milan Sreckovic [:milan]
Mentors:
Depends on:
Blocks: 759221
  Show dependency treegraph
 
Reported: 2012-06-04 14:29 PDT by Benoit Jacob [:bjacob] (mostly away)
Modified: 2012-06-09 19:28 PDT (History)
5 users (show)
ryanvm: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
fix tolerance in test_2d.path.arc.scale.1 (921 bytes, patch)
2012-06-04 14:29 PDT, Benoit Jacob [:bjacob] (mostly away)
jmuizelaar: review+
Ms2ger: feedback? (philip)
Details | Diff | Splinter Review

Description Benoit Jacob [:bjacob] (mostly away) 2012-06-04 14:29:07 PDT
Created attachment 629930 [details] [diff] [review]
fix tolerance in test_2d.path.arc.scale.1

This test is failing on Android (we're enabling canvas tests on Android in bug 759221).

The reason is that it's creating a 100x50 canvas, drawing a circle centered at (50, 25) with radius 56 and expects it to fully cover the whole canvas. We have

  sqrt(50^2 + 25^2) ~= 55.902

So it's assuming a drawing tolerance of roughly 56 - 55.902 == 0.098.

Drawing tolerances used in browsers are typically larger than that: we seem to use 0.3 on mobile and 0.1 on desktop, and IIUC Chrome uses 0.5.

See: http://mxr.mozilla.org/mozilla-central/ident?i=CAIRO_GSTATE_TOLERANCE_DEFAULT&filter=

This patch edits this test to work with tolerances <= 0.5 and be more explicit.

Please send it upstream.
Comment 1 Benoit Jacob [:bjacob] (mostly away) 2012-06-08 10:45:09 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/e158c9ebe4a2
Comment 2 Matt Brubeck (:mbrubeck) 2012-06-08 12:25:41 PDT
Sorry, I backed this out on inbound along with bug 759221 because of failures in multiple media tests on desktop platforms:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3b2b9defe6f4
Comment 3 Benoit Jacob [:bjacob] (mostly away) 2012-06-08 18:50:33 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/d71c9973b8ed
Comment 4 Ryan VanderMeulen [:RyanVM] 2012-06-09 19:28:09 PDT
https://hg.mozilla.org/mozilla-central/rev/d71c9973b8ed

Note You need to log in before you can comment on or make changes to this bug.