Bug 526402: test cases. r=dbaron
authorZack Weinberg <zweinberg@mozilla.com>
Wed, 04 Nov 2009 18:37:06 -0800
changeset 34552 eb2a556deb115cdf7a714b6a9104abfc5ffc3c74
parent 34551 0d248c37d1ae8363e91d2c8e6d58289fd58d7c19
child 34582 d3d5992cd608e4da4b66e60b6ac2a16ecd1fc191
push id10116
push userzweinberg@mozilla.com
push dateThu, 05 Nov 2009 02:38:52 +0000
treeherdermozilla-central@eb2a556deb11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs526402
milestone1.9.3a1pre
Bug 526402: test cases. r=dbaron
layout/reftests/css-gradients/aja-linear-1-ref.html
layout/reftests/css-gradients/aja-linear-1a.html
layout/reftests/css-gradients/aja-linear-1b.html
layout/reftests/css-gradients/aja-linear-1c.html
layout/reftests/css-gradients/aja-linear-1d.html
layout/reftests/css-gradients/aja-linear-1e.html
layout/reftests/css-gradients/aja-linear-1f.html
layout/reftests/css-gradients/aja-linear-1g.html
layout/reftests/css-gradients/aja-linear-2-ref.html
layout/reftests/css-gradients/aja-linear-2a.html
layout/reftests/css-gradients/aja-linear-2b.html
layout/reftests/css-gradients/aja-linear-2c.html
layout/reftests/css-gradients/aja-linear-2d.html
layout/reftests/css-gradients/aja-linear-3-ref.html
layout/reftests/css-gradients/aja-linear-3a.html
layout/reftests/css-gradients/aja-linear-3b.html
layout/reftests/css-gradients/aja-linear-4-ref.html
layout/reftests/css-gradients/aja-linear-4a.html
layout/reftests/css-gradients/aja-linear-4b.html
layout/reftests/css-gradients/aja-linear-5-ref.html
layout/reftests/css-gradients/aja-linear-5a.html
layout/reftests/css-gradients/aja-linear-6-ref.html
layout/reftests/css-gradients/aja-linear-6a.html
layout/reftests/css-gradients/aja-linear-6b.html
layout/reftests/css-gradients/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-1-ref.html
@@ -0,0 +1,23 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<html class="reftest-wait">
+<head>
+<script>
+function doDraw() {
+  var ctx = document.getElementById('canvas').getContext('2d');
+
+  var grad = ctx.createLinearGradient(0,0,0,200);
+  grad.addColorStop(0, 'yellow');
+  grad.addColorStop(1, 'blue');
+
+  ctx.fillStyle = grad;
+  ctx.fillRect(0,0,100,200);
+
+  document.documentElement.removeAttribute('class');
+}
+</script>
+</head>
+<body onload="doDraw();">
+<canvas id="canvas" width="100" height="200"></canvas>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-1a.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<style>
+div {
+  height: 200px;
+  width: 100px;
+  background: -moz-linear-gradient(top, yellow, blue);
+}
+</style>
+<div></div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-1b.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<style>
+div {
+  height: 200px;
+  width: 100px;
+  background: -moz-linear-gradient(bottom, blue, yellow);
+}
+</style>
+<div></div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-1c.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<style>
+div {
+  height: 200px;
+  width: 100px;
+  background: -moz-linear-gradient(-90deg, yellow, blue);
+}
+</style>
+<div></div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-1d.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<style>
+div {
+  height: 200px;
+  width: 100px;
+  background: -moz-linear-gradient(270deg, yellow, blue);
+}
+</style>
+<div></div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-1e.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<style>
+div {
+  height: 200px;
+  width: 100px;
+  background: -moz-linear-gradient(top, yellow 0%, blue 100%);
+}
+</style>
+<div></div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-1f.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<style>
+div {
+  height: 200px;
+  width: 100px;
+  background: -moz-linear-gradient(center top, yellow, blue);
+}
+</style>
+<div></div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-1g.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<style>
+div {
+  height: 200px;
+  width: 100px;
+  background: -moz-linear-gradient(yellow, blue);
+}
+</style>
+<div></div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-2-ref.html
@@ -0,0 +1,23 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<html class="reftest-wait">
+<head>
+<script>
+function doDraw() {
+  var ctx = document.getElementById('canvas').getContext('2d');
+
+  var grad = ctx.createLinearGradient(0,0,100,200);
+  grad.addColorStop(0, 'yellow');
+  grad.addColorStop(1, 'blue');
+
+  ctx.fillStyle = grad;
+  ctx.fillRect(0,0,100,200);
+
+  document.documentElement.removeAttribute('class');
+}
+</script>
+</head>
+<body onload="doDraw();">
+<canvas id="canvas" width="100" height="200"></canvas>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-2a.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<style>
+div {
+  height: 200px;
+  width: 100px;
+  background: -moz-linear-gradient(top left, yellow, blue);
+}
+</style>
+<div></div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-2b.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<style>
+div {
+  height: 200px;
+  width: 100px;
+  background: -moz-linear-gradient(0 0, yellow, blue);
+}
+</style>
+<div></div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-2c.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<style>
+div {
+  height: 200px;
+  width: 100px;
+  background: -moz-linear-gradient(top 0px left 0px, yellow, blue);
+}
+</style>
+<div></div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-2d.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<style>
+div {
+  height: 200px;
+  width: 100px;
+  background: -moz-linear-gradient(bottom right, blue, yellow);
+}
+</style>
+<div></div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-3-ref.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<html class="reftest-wait">
+<head>
+<script>
+function doDraw() {
+  var ctx = document.getElementById('canvas').getContext('2d');
+
+  /* this gradient goes at an angle of -45deg through the center of
+     the box */
+  var grad = ctx.createLinearGradient(-25,25,125,175);
+  grad.addColorStop(0, 'yellow');
+  grad.addColorStop(1, 'blue');
+
+  ctx.fillStyle = grad;
+  ctx.fillRect(0,0,100,200);
+
+  document.documentElement.removeAttribute('class');
+}
+</script>
+</head>
+<body onload="doDraw();">
+<canvas id="canvas" width="100" height="200"></canvas>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-3a.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<style>
+div {
+  height: 200px;
+  width: 100px;
+  background: -moz-linear-gradient(-45deg, yellow, blue);
+}
+</style>
+<div></div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-3b.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<style>
+div {
+  height: 200px;
+  width: 100px;
+  background: -moz-linear-gradient(315deg, yellow, blue);
+}
+</style>
+<div></div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-4-ref.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<html class="reftest-wait">
+<head>
+<script>
+function doDraw() {
+  var ctx = document.getElementById('canvas').getContext('2d');
+
+  var grad = ctx.createLinearGradient(50, 0, 50, 200);
+  grad.addColorStop(0, 'yellow');
+  grad.addColorStop(0.5, 'blue');
+  grad.addColorStop(1, '#0f0');
+
+  ctx.fillStyle = grad;
+  ctx.fillRect(0,0,100,200);
+
+  document.documentElement.removeAttribute('class');
+}
+</script>
+</head>
+<body onload="doDraw();">
+<canvas id="canvas" width="100" height="200"></canvas>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-4a.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<style>
+div {
+  height: 200px;
+  width: 100px;
+  background: -moz-linear-gradient(top, yellow, blue, #0f0);
+}
+</style>
+<div></div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-4b.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<style>
+div {
+  height: 200px;
+  width: 100px;
+  background: -moz-linear-gradient(top, yellow, blue 50%, #0f0);
+}
+</style>
+<div></div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-5-ref.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<html class="reftest-wait">
+<head>
+<script>
+function doDraw() {
+  var ctx = document.getElementById('canvas').getContext('2d');
+
+  var grad = ctx.createLinearGradient(50, 0, 50, 200);
+  grad.addColorStop(0, 'yellow');
+  grad.addColorStop(0.2, 'blue');
+  grad.addColorStop(1, '#0f0');
+
+  ctx.fillStyle = grad;
+  ctx.fillRect(0,0,100,200);
+
+  document.documentElement.removeAttribute('class');
+}
+</script>
+</head>
+<body onload="doDraw();">
+<canvas id="canvas" width="100" height="200"></canvas>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-5a.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<style>
+div {
+  height: 200px;
+  width: 100px;
+  background: -moz-linear-gradient(top, yellow, blue 20%, #0f0);
+}
+</style>
+<div></div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-6-ref.html
@@ -0,0 +1,23 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<html class="reftest-wait">
+<head>
+<script>
+function doDraw() {
+  var ctx = document.getElementById('canvas').getContext('2d');
+
+  var grad = ctx.createLinearGradient(20, 30, 80, 170);
+  grad.addColorStop(0, 'yellow');
+  grad.addColorStop(1, 'blue');
+
+  ctx.fillStyle = grad;
+  ctx.fillRect(0,0,100,200);
+
+  document.documentElement.removeAttribute('class');
+}
+</script>
+</head>
+<body onload="doDraw();">
+<canvas id="canvas" width="100" height="200"></canvas>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-6a.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<style>
+div {
+  height: 200px;
+  width: 100px;
+  background: -moz-linear-gradient(20px 30px, yellow, blue);
+}
+</style>
+<div></div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-gradients/aja-linear-6b.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<!-- Derived from http://a-ja.net/newgrad.html -->
+<style>
+div {
+  height: 200px;
+  width: 100px;
+  background: -moz-linear-gradient(left 20px top 30px, yellow, blue);
+}
+</style>
+<div></div>
--- a/layout/reftests/css-gradients/reftest.list
+++ b/layout/reftests/css-gradients/reftest.list
@@ -60,8 +60,29 @@
 == repeating-radial-1a.html repeating-radial-1-ref.html
 == repeating-radial-1b.html repeating-radial-1-ref.html
 == repeating-radial-2a.html repeating-radial-2-ref.html
 == twostops-1a.html twostops-1-ref.html
 == twostops-1b.html twostops-1-ref.html
 fails == twostops-1c.html twostops-1-ref.html # bug 524173
 == twostops-1d.html twostops-1-ref.html
 fails-if(MOZ_WIDGET_TOOLKIT!="cocoa") == twostops-1e.html twostops-1-ref.html # bug 524173
+
+# from http://www.xanthir.com/:4bhipd by way of http://a-ja.net/newgrad.html
+== aja-linear-1a.html aja-linear-1-ref.html
+fails == aja-linear-1b.html aja-linear-1-ref.html # reversed gradient not pixel perfect (visually OK)
+== aja-linear-1c.html aja-linear-1-ref.html
+== aja-linear-1d.html aja-linear-1-ref.html
+== aja-linear-1e.html aja-linear-1-ref.html
+== aja-linear-1f.html aja-linear-1-ref.html
+== aja-linear-1g.html aja-linear-1-ref.html
+== aja-linear-2a.html aja-linear-2-ref.html
+== aja-linear-2b.html aja-linear-2-ref.html
+fails == aja-linear-2c.html aja-linear-2-ref.html # bug 522607
+fails == aja-linear-2d.html aja-linear-2-ref.html # reversed gradient not pixel perfect (visually OK)
+== aja-linear-3a.html aja-linear-3-ref.html
+== aja-linear-3b.html aja-linear-3-ref.html
+== aja-linear-4a.html aja-linear-4-ref.html
+== aja-linear-4b.html aja-linear-4-ref.html
+== aja-linear-5a.html aja-linear-5-ref.html
+== aja-linear-6a.html aja-linear-6-ref.html
+fails == aja-linear-6b.html aja-linear-6-ref.html # bug 522607
+