Bug 1227327 - Add tests. r?mattwoodrow draft
authorMarkus Stange <mstange@themasta.com>
Wed, 04 May 2016 14:11:05 -0400
changeset 363450 716be65eedcae9f80f1b227de91bd236b3fb53d9
parent 363449 fa90206832ae7172c91bc1d5bbbf0d9469d68b4b
child 364141 64546cb404566456e0d3b3d79d9bc4d44529b28c
push id17204
push usermstange@themasta.com
push dateWed, 04 May 2016 18:19:56 +0000
reviewersmattwoodrow
bugs1227327
milestone49.0a1
Bug 1227327 - Add tests. r?mattwoodrow MozReview-Commit-ID: 6BIJJiCUedo
layout/reftests/invalidation/background-position-2-ref.html
layout/reftests/invalidation/background-position-2a.html
layout/reftests/invalidation/background-position-2b.html
layout/reftests/invalidation/background-position-2c.html
layout/reftests/invalidation/background-position-2d.html
layout/reftests/invalidation/background-position-2e.html
layout/reftests/invalidation/background-position-2f.html
layout/reftests/invalidation/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/invalidation/background-position-2-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Reference for properly handled background-position changes.</title>
+
+<style>
+
+body {
+  margin: 0;
+}
+
+#background {
+  width: 100px;
+  height: 100px;
+  background-color: lime;
+}
+
+</style>
+
+<div id="background"></div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/invalidation/background-position-2a.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html lang="en" class="reftest-wait">
+<meta charset="utf-8">
+<title>Changes to background-position should invalidate properly.</title>
+
+<style>
+
+body {
+  margin: 0;
+}
+
+#background {
+  width: 100px;
+  height: 100px;
+  background-image: url(image_rgrg-256x256.png);
+  background-repeat: no-repeat;
+  background-position: 0 0;
+}
+
+</style>
+
+<div id="background"></div>
+
+<script>
+
+function doTest() {
+  document.querySelector("#background").style.backgroundPosition = "-140px 0";
+  document.documentElement.removeAttribute("class");
+}
+document.addEventListener("MozReftestInvalidate", doTest);
+
+</script>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/invalidation/background-position-2b.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html lang="en" class="reftest-wait">
+<meta charset="utf-8">
+<title>Changes to background-position should invalidate properly for input type=text.</title>
+
+<style>
+
+body {
+  margin: 0;
+}
+
+#background {
+  width: 100px;
+  height: 100px;
+  background-image: url(image_rgrg-256x256.png);
+  background-repeat: no-repeat;
+  background-position: 0 0;
+
+  border: 0;
+  border-radius: 0;
+  padding: 0;
+}
+
+</style>
+
+<input type="text" id="background">
+
+<script>
+
+function doTest() {
+  document.querySelector("#background").style.backgroundPosition = "-140px 0";
+  document.documentElement.removeAttribute("class");
+}
+document.addEventListener("MozReftestInvalidate", doTest);
+
+</script>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/invalidation/background-position-2c.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html lang="en" class="reftest-wait">
+<meta charset="utf-8">
+<title>Changes to background-position should invalidate properly for input type=button.</title>
+
+<style>
+
+body {
+  margin: 0;
+}
+
+#background {
+  width: 100px;
+  height: 100px;
+  background-image: url(image_rgrg-256x256.png);
+  background-repeat: no-repeat;
+  background-position: 0 0;
+
+  border: 0;
+  border-radius: 0;
+  padding: 0;
+}
+
+</style>
+
+<input type="button" id="background">
+
+<script>
+
+function doTest() {
+  document.querySelector("#background").style.backgroundPosition = "-140px 0";
+  document.documentElement.removeAttribute("class");
+}
+document.addEventListener("MozReftestInvalidate", doTest);
+
+</script>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/invalidation/background-position-2d.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html lang="en" class="reftest-wait">
+<meta charset="utf-8">
+<title>Changes to background-position should invalidate properly for table rows.</title>
+
+<style>
+
+body {
+  margin: 0;
+}
+
+#background {
+  width: 100px;
+  height: 100px;
+  background-image: url(image_rgrg-256x256.png);
+  background-repeat: no-repeat;
+  background-position: 0 0;
+
+  border: 0;
+  padding: 0;
+}
+
+table, tr, td {
+  width: 100px;
+  height: 100px;
+  border: 0;
+  padding: 0;
+  border-spacing: 0;
+}
+
+</style>
+
+<table><tr id="background"><td></td></table>
+
+<script>
+
+function doTest() {
+  document.querySelector("#background").style.backgroundPosition = "-140px 0";
+  document.documentElement.removeAttribute("class");
+}
+document.addEventListener("MozReftestInvalidate", doTest);
+
+</script>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/invalidation/background-position-2e.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html lang="en" class="reftest-wait">
+<meta charset="utf-8">
+<title>Changes to background-position should invalidate properly for table cells.</title>
+
+<style>
+
+body {
+  margin: 0;
+}
+
+#background {
+  width: 100px;
+  height: 100px;
+  background-image: url(image_rgrg-256x256.png);
+  background-repeat: no-repeat;
+  background-position: 0 0;
+
+  border: 0;
+  padding: 0;
+}
+
+table, tr, td {
+  width: 100px;
+  height: 100px;
+  border: 0;
+  padding: 0;
+  border-spacing: 0;
+}
+
+</style>
+
+<table><tr><td id="background"></td></table>
+
+<script>
+
+function doTest() {
+  document.querySelector("#background").style.backgroundPosition = "-140px 0";
+  document.documentElement.removeAttribute("class");
+}
+document.addEventListener("MozReftestInvalidate", doTest);
+
+</script>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/invalidation/background-position-2f.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html lang="en" class="reftest-wait">
+<meta charset="utf-8">
+<title>Changes to background-position should invalidate properly for fieldsets.</title>
+
+<style>
+
+body {
+  margin: 0;
+}
+
+#background {
+  width: 100px;
+  height: 100px;
+  background-image: url(image_rgrg-256x256.png);
+  background-repeat: no-repeat;
+  background-position: 0 0;
+
+  border: 0;
+  padding: 0;
+  margin: 0;
+}
+
+</style>
+
+<fieldset id="background"><legend></legend></fieldset>
+
+<script>
+
+function doTest() {
+  document.querySelector("#background").style.backgroundPosition = "-140px 0";
+  document.documentElement.removeAttribute("class");
+}
+document.addEventListener("MozReftestInvalidate", doTest);
+
+</script>
--- a/layout/reftests/invalidation/reftest.list
+++ b/layout/reftests/invalidation/reftest.list
@@ -64,11 +64,17 @@ pref(layers.single-tile.enabled,false) !
 != layer-splitting-4.html about:blank
 != layer-splitting-5.html about:blank
 != layer-splitting-6.html about:blank
 != layer-splitting-7.html about:blank
 fuzzy-if(gtkWidget,2,4) fuzzy-if(asyncPan,2,3955) fuzzy-if(OSX,179,30) fuzzy-if(skiaContent,16,3230) == image-scrolling-zoom-1.html image-scrolling-zoom-1-ref.html
 != image-scrolling-zoom-1-ref.html image-scrolling-zoom-1-notref.html
 pref(layers.single-tile.enabled,false) != fast-scrolling.html about:blank
 == background-position-1.html background-position-1-ref.html
+== background-position-2a.html background-position-2-ref.html
+== background-position-2b.html background-position-2-ref.html
+== background-position-2c.html background-position-2-ref.html
+== background-position-2d.html background-position-2-ref.html
+== background-position-2e.html background-position-2-ref.html
+== background-position-2f.html background-position-2-ref.html
 == zero-opacity-animation.html about:blank
 == zero-opacity-text.html about:blank
 == negative-w-component.html negative-w-component-ref.html