Bug 548375 - Add tests for background-repeat taking two values (css3-background). r=dbaron
authorLazar Sumar <lsumar@mozilla.com>
Fri, 24 Feb 2012 21:23:14 -0800
changeset 87713 c1c6cd6c52b7dfbc9be40b377b1259256a464f08
parent 87712 db6ca99007f5ba5105b0d077482f98dcfcb9f24b
child 87714 0de785d6345a9af7c6dd7262c3accf0882f4a237
push id22143
push userphilringnalda@gmail.com
push dateSun, 26 Feb 2012 23:12:35 +0000
treeherdermozilla-central@b98fc24ac54b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs548375
milestone13.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 548375 - Add tests for background-repeat taking two values (css3-background). r=dbaron
layout/reftests/backgrounds/aqua-yellow-32x32.png
layout/reftests/backgrounds/background-repeat-1-ref.html
layout/reftests/backgrounds/background-repeat-1.html
layout/reftests/backgrounds/reftest.list
layout/style/test/property_database.js
new file mode 100644
index 0000000000000000000000000000000000000000..42f8a2100b241aebf5c62e5057a51a933e6ff4d6
GIT binary patch
literal 156
zc%17D@N?(olHy`uVBq!ia0vp^3LwnH3?%tPCZz)@o&cW^*T{eW{{8L&@)Q*nxj)Kn
z2C}?8T^vIs!c9*t6g|MeapZyyCx5tG;>%xMaf|kGe7(+c_;Xn3)h_N?2`BbEYEqNf
jh)mQUWEGDofD?9o(@Z>PzdjKTG?u~B)z4*}Q$iB}(UCOa
new file mode 100644
--- /dev/null
+++ b/layout/reftests/backgrounds/background-repeat-1-ref.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+<!--
+spec: http://dev.w3.org/csswg/css3-background/#the-background-repeat
+-->
+<head>
+<title>background-repeat single value mapping reference</title>
+<style>
+div
+{
+    width: 128px;
+    height: 128px;
+    background-image: url(aqua-yellow-32x32.png);
+    border: 1px solid black;
+}
+#no_repeat
+{
+    background-repeat: no-repeat;    /* no-repeat no-repeat */
+}
+#repeat
+{
+    background-repeat: repeat;    /* repeat repeat */
+}
+#repeat_x
+{
+    background-repeat: repeat-x; /* repeat no-repeat */
+}
+#repeat_y
+{
+    background-repeat: repeat-y; /* no-repeat repeat */
+}
+</style>
+</head>
+<body>
+    <div id="no_repeat"></div>
+    <div id="repeat"></div>
+    <div id="repeat_x"></div>
+    <div id="repeat_y"></div>
+</body>
+</html>
+
+
new file mode 100644
--- /dev/null
+++ b/layout/reftests/backgrounds/background-repeat-1.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+<!--
+spec: http://dev.w3.org/csswg/css3-background/#the-background-repeat
+-->
+<head>
+<title>background-repeat single value mapping</title>
+<style>
+div
+{
+    width: 128px;
+    height: 128px;
+    background-image: url(aqua-yellow-32x32.png);
+    border: 1px solid black;
+}
+#no_repeat
+{
+    background-repeat: no-repeat no-repeat; /* no-repeat */
+}
+#repeat
+{
+    background-repeat: repeat repeat;  /* repeat */
+}
+#repeat_x
+{
+    background-repeat: repeat no-repeat; /* repeat-x */
+}
+#repeat_y
+{
+    background-repeat: no-repeat repeat; /* repeat-y */
+}
+</style>
+</head>
+<body>
+    <div id="no_repeat"></div>
+    <div id="repeat"></div>
+    <div id="repeat_x"></div>
+    <div id="repeat_y"></div>
+</body>
+</html>
+
+
--- a/layout/reftests/backgrounds/reftest.list
+++ b/layout/reftests/backgrounds/reftest.list
@@ -121,8 +121,10 @@ fails == background-size-zoom-repeat.htm
 
 # -moz-default-background-color and -moz-default-color (bug 591341)
 == background-moz-default-background-color.html background-moz-default-background-color-ref.html
 
 == fixed-bg-with-transform-outside-viewport-1.html fixed-bg-with-transform-outside-viewport-ref.html
 
 HTTP == root-background-1.html root-background-ref.html
 HTTP != root-background-1.html about:blank
+
+== background-repeat-1-ref.html background-repeat-1.html
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -1601,24 +1601,33 @@ var gCSSProperties = {
 		                  "50% bottom 10%", "right 10% 50%", "left right", 
 		                  "top bottom", "left 10% right", 
 		                  "top 20px bottom 20px", "left left" ]
 	},
 	"background-repeat": {
 		domProp: "backgroundRepeat",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
-		initial_values: [ "repeat" ],
+		initial_values: [ "repeat", "repeat repeat" ],
 		other_values: [ "repeat-x", "repeat-y", "no-repeat",
 			"repeat-x, repeat-x",
 			"repeat, no-repeat",
 			"repeat-y, no-repeat, repeat-y",
-			"repeat, repeat, repeat"
+			"repeat, repeat, repeat",
+			"repeat no-repeat",
+			"no-repeat repeat",
+			"no-repeat no-repeat",
+			"repeat repeat, repeat repeat",
 		],
-		invalid_values: [ "repeat repeat" ]
+		invalid_values: [ "repeat repeat repeat", 
+		                  "repeat-x repeat-y",
+		                  "repeat repeat-x", 
+		                  "repeat repeat-y",
+		                  "repeat-x repeat", 
+		                  "repeat-y repeat" ]
 	},
 	"background-size": {
 		domProp: "backgroundSize",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "auto", "auto auto" ],
 		other_values: [ "contain", "cover", "100px auto", "auto 100px", "100% auto", "auto 100%", "25% 50px", "3em 40%",
 			"-moz-calc(20px)",