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
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]
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:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

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 User image 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.


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

Please send it upstream.
Comment 1 User image Benoit Jacob [:bjacob] (mostly away) 2012-06-08 10:45:09 PDT
Comment 2 User image 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:
Comment 3 User image Benoit Jacob [:bjacob] (mostly away) 2012-06-08 18:50:33 PDT
Comment 4 User image Ryan VanderMeulen [:RyanVM] 2012-06-09 19:28:09 PDT

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