Bug 761326 - test_2d.path.arc.scale.1 assumes unrealistic 0.098 tolerance or luck - r=jrmuizel
authorBenoit Jacob <bjacob@mozilla.com>
Fri, 08 Jun 2012 13:41:39 -0400
changeset 101036 d71c9973b8edb18c74981ea416b220de29fc180d
parent 101035 c83b3689b19c29c00737034705e50ab9d664b0fe
child 101037 d931e2def3fd2c73ce6042e552f31d9f4fd32a55
push id1316
push userakeybl@mozilla.com
push dateMon, 27 Aug 2012 22:37:00 +0000
treeherdermozilla-beta@db4b09302ee2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs761326
milestone16.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 761326 - test_2d.path.arc.scale.1 assumes unrealistic 0.098 tolerance or luck - r=jrmuizel
content/canvas/test/test_canvas.html
--- a/content/canvas/test/test_canvas.html
+++ b/content/canvas/test/test_canvas.html
@@ -11133,17 +11133,20 @@ function test_2d_path_arc_scale_1() {
 var canvas = document.getElementById('c343');
 var ctx = canvas.getContext('2d');
 
 ctx.fillStyle = '#f00';
 ctx.fillRect(0, 0, 100, 50);
 ctx.scale(2, 0.5);
 ctx.fillStyle = '#0f0';
 ctx.beginPath();
-ctx.arc(25, 50, 56, 0, 2*Math.PI, false);
+var hypothenuse = Math.sqrt(50 * 50 + 25 * 25);
+var tolerance = 0.5;
+var radius = hypothenuse + tolerance;
+ctx.arc(25, 50, radius, 0, 2*Math.PI, false);
 ctx.fill();
 ctx.fillStyle = '#f00';
 ctx.beginPath();
 ctx.moveTo(-25, 50);
 ctx.arc(-25, 50, 24, 0, 2*Math.PI, false);
 ctx.moveTo(75, 50);
 ctx.arc(75, 50, 24, 0, 2*Math.PI, false);
 ctx.moveTo(25, -25);