Bug 524173. Reftests demonstrating off-by-one bug in degenerate linear gradients on some platforms.
authorZack Weinberg <zweinberg@mozilla.com>
Thu, 31 Mar 2011 15:00:34 -0400
changeset 67601 128c34e6c3b88b7e662ae437588c7fab157fb970
parent 67600 1c1c1a81419ec071451bdb3ff3343e70d86f32f8
child 67602 bd338849a167fd14bcf47796fcc77a81ceb357dc
push id1
push userclegnitto@mozilla.com
push dateTue, 12 Apr 2011 01:19:02 +0000
treeherdermozilla-aurora@0cfe6840e0a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs524173
milestone2.2a1pre
Bug 524173. Reftests demonstrating off-by-one bug in degenerate linear gradients on some platforms.
layout/reftests/canvas/linear-gradient-1-ref.html
layout/reftests/canvas/linear-gradient-1a.html
layout/reftests/canvas/linear-gradient-1b.html
layout/reftests/canvas/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/canvas/linear-gradient-1-ref.html
@@ -0,0 +1,3 @@
+<!doctype html>
+<div style="width:300px; height: 150px; background: #0000ff"></div>
+<div style="width:300px; height: 150px; background: #ff0000"></div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/canvas/linear-gradient-1a.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<body>
+<canvas id="canvas" width="300" height="300">
+<script>
+var ctx = document.getElementById('canvas').getContext('2d');
+
+var grad = ctx.createLinearGradient(0,150,0,450);
+grad.addColorStop(0, '#0000ff');
+grad.addColorStop(0, '#ff0000');
+
+ctx.fillStyle = grad;
+ctx.fillRect(0,0,300,300);
+</script>
+</body>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/canvas/linear-gradient-1b.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<body>
+<canvas id="canvas" width="300" height="300">
+<script>
+var ctx = document.getElementById('canvas').getContext('2d');
+
+var grad = ctx.createLinearGradient(0,-150,0,150);
+grad.addColorStop(1, '#0000ff');
+grad.addColorStop(1, '#ff0000');
+
+ctx.fillStyle = grad;
+ctx.fillRect(0,0,300,300);
+</script>
+</body>
--- a/layout/reftests/canvas/reftest.list
+++ b/layout/reftests/canvas/reftest.list
@@ -36,8 +36,12 @@ asserts-if(cocoaWidget,0-2) == size-chan
 == text-not-in-doc-test.html text-not-in-doc-ref.html
 
 == text-bidi-ltr-test.html text-bidi-ltr-ref.html
 == text-bidi-rtl-test.html text-bidi-rtl-ref.html
 
 fails-if(Android) != text-font-lang.html text-font-lang-notref.html
 
 == strokeText-path.html strokeText-path-ref.html
+
+# gradient off-by-one, fails on windows and linux
+== linear-gradient-1a.html linear-gradient-1-ref.html
+fails-if(cocoaWidget) == linear-gradient-1b.html linear-gradient-1-ref.html