Bug 524173. Reftests demonstrating off-by-one bug in degenerate linear gradients on some platforms.
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