diff --git a/mozilla/layout/reftests/table-background/border-collapse-table-cell-ref.html b/mozilla/layout/reftests/table-background/border-collapse-table-cell-ref.html
new file mode 100644
index 00000000000..0f913efb4bb
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-collapse-table-cell-ref.html
@@ -0,0 +1,61 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-collapse-table-cell.html b/mozilla/layout/reftests/table-background/border-collapse-table-cell.html
new file mode 100644
index 00000000000..35b758823e7
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-collapse-table-cell.html
@@ -0,0 +1,107 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-collapse-table-column-group-ref.html b/mozilla/layout/reftests/table-background/border-collapse-table-column-group-ref.html
new file mode 100644
index 00000000000..740ef8c6ecc
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-collapse-table-column-group-ref.html
@@ -0,0 +1,61 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-collapse-table-column-group.html b/mozilla/layout/reftests/table-background/border-collapse-table-column-group.html
new file mode 100644
index 00000000000..e9ac59e5587
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-collapse-table-column-group.html
@@ -0,0 +1,107 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-collapse-table-column-ref.html b/mozilla/layout/reftests/table-background/border-collapse-table-column-ref.html
new file mode 100644
index 00000000000..d7f171a2190
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-collapse-table-column-ref.html
@@ -0,0 +1,61 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-collapse-table-column.html b/mozilla/layout/reftests/table-background/border-collapse-table-column.html
new file mode 100644
index 00000000000..6f808fbc8eb
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-collapse-table-column.html
@@ -0,0 +1,107 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-collapse-table-ref.html b/mozilla/layout/reftests/table-background/border-collapse-table-ref.html
new file mode 100644
index 00000000000..b1da97dc40a
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-collapse-table-ref.html
@@ -0,0 +1,61 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-collapse-table-row-group-ref.html b/mozilla/layout/reftests/table-background/border-collapse-table-row-group-ref.html
new file mode 100644
index 00000000000..949ec4bba95
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-collapse-table-row-group-ref.html
@@ -0,0 +1,61 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-collapse-table-row-group.html b/mozilla/layout/reftests/table-background/border-collapse-table-row-group.html
new file mode 100644
index 00000000000..b388f516dd5
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-collapse-table-row-group.html
@@ -0,0 +1,107 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-collapse-table-row-ref.html b/mozilla/layout/reftests/table-background/border-collapse-table-row-ref.html
new file mode 100644
index 00000000000..f47c7d58036
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-collapse-table-row-ref.html
@@ -0,0 +1,61 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-collapse-table-row.html b/mozilla/layout/reftests/table-background/border-collapse-table-row.html
new file mode 100644
index 00000000000..a200b145630
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-collapse-table-row.html
@@ -0,0 +1,107 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-collapse-table.html b/mozilla/layout/reftests/table-background/border-collapse-table.html
new file mode 100644
index 00000000000..b651e6ef586
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-collapse-table.html
@@ -0,0 +1,107 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-separate-table-cell-ref.html b/mozilla/layout/reftests/table-background/border-separate-table-cell-ref.html
new file mode 100644
index 00000000000..618ef36f826
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-separate-table-cell-ref.html
@@ -0,0 +1,66 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-separate-table-cell.html b/mozilla/layout/reftests/table-background/border-separate-table-cell.html
new file mode 100644
index 00000000000..f1878bd5364
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-separate-table-cell.html
@@ -0,0 +1,108 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-separate-table-column-group-ref.html b/mozilla/layout/reftests/table-background/border-separate-table-column-group-ref.html
new file mode 100644
index 00000000000..6985dae64de
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-separate-table-column-group-ref.html
@@ -0,0 +1,89 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-separate-table-column-group.html b/mozilla/layout/reftests/table-background/border-separate-table-column-group.html
new file mode 100644
index 00000000000..a833ea0aa89
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-separate-table-column-group.html
@@ -0,0 +1,108 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-separate-table-column-ref.html b/mozilla/layout/reftests/table-background/border-separate-table-column-ref.html
new file mode 100644
index 00000000000..a6629347d2b
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-separate-table-column-ref.html
@@ -0,0 +1,89 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-separate-table-column.html b/mozilla/layout/reftests/table-background/border-separate-table-column.html
new file mode 100644
index 00000000000..9b58465cc14
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-separate-table-column.html
@@ -0,0 +1,108 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-separate-table-ref.html b/mozilla/layout/reftests/table-background/border-separate-table-ref.html
new file mode 100644
index 00000000000..a260d87e80c
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-separate-table-ref.html
@@ -0,0 +1,64 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-separate-table-row-group-ref.html b/mozilla/layout/reftests/table-background/border-separate-table-row-group-ref.html
new file mode 100644
index 00000000000..a40af43a62b
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-separate-table-row-group-ref.html
@@ -0,0 +1,89 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-separate-table-row-group.html b/mozilla/layout/reftests/table-background/border-separate-table-row-group.html
new file mode 100644
index 00000000000..1acd7faa5cc
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-separate-table-row-group.html
@@ -0,0 +1,108 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-separate-table-row-ref.html b/mozilla/layout/reftests/table-background/border-separate-table-row-ref.html
new file mode 100644
index 00000000000..cacab1f1310
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-separate-table-row-ref.html
@@ -0,0 +1,89 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-separate-table-row.html b/mozilla/layout/reftests/table-background/border-separate-table-row.html
new file mode 100644
index 00000000000..90c181fc4b0
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-separate-table-row.html
@@ -0,0 +1,108 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/border-separate-table.html b/mozilla/layout/reftests/table-background/border-separate-table.html
new file mode 100644
index 00000000000..44264f78583
--- /dev/null
+++ b/mozilla/layout/reftests/table-background/border-separate-table.html
@@ -0,0 +1,108 @@
+
+
+
+ Table background tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
+
+
+
+
+
+
+
+ | | | | |
+
+
+ | | | | |
+ | | | | |
+ | | | | |
+
+
+ | | | | |
+
+
+
+
+
diff --git a/mozilla/layout/reftests/table-background/reftest.list b/mozilla/layout/reftests/table-background/reftest.list
index 9f965d8ba8c..83fb3736084 100644
--- a/mozilla/layout/reftests/table-background/reftest.list
+++ b/mozilla/layout/reftests/table-background/reftest.list
@@ -1,24 +1,41 @@
-!= backgr_border-table-cell.html empty.html
-!= backgr_border-table-column-group.html empty.html
-!= backgr_border-table-column.html empty.html
-!= backgr_border-table-quirks.html empty.html
-!= backgr_border-table-row-group.html empty.html
-!= backgr_border-table-row.html empty.html
-!= backgr_border-table.html empty.html
-!= backgr_fixed-bg.html empty.html
-!= backgr_index.html empty.html
-!= backgr_layers-hide.html empty.html
-!= backgr_layers-opacity.html empty.html
-!= backgr_layers-show.html empty.html
-!= backgr_position-table-cell.html empty.html
-!= backgr_position-table-column-group.html empty.html
-!= backgr_position-table-column.html empty.html
-!= backgr_position-table-row-group.html empty.html
-!= backgr_position-table-row.html empty.html
-!= backgr_position-table.html empty.html
-!= backgr_simple-table-cell.html empty.html
-!= backgr_simple-table-column-group.html empty.html
-!= backgr_simple-table-column.html empty.html
-!= backgr_simple-table-row-group.html empty.html
-!= backgr_simple-table-row.html empty.html
-!= backgr_simple-table.html empty.html
+# these could be moved to crashtests
+!= backgr_border-table-cell.html empty.html
+!= backgr_border-table-column-group.html empty.html
+!= backgr_border-table-column.html empty.html
+!= backgr_border-table-quirks.html empty.html
+!= backgr_border-table-row-group.html empty.html
+!= backgr_border-table-row.html empty.html
+!= backgr_border-table.html empty.html
+!= backgr_fixed-bg.html empty.html
+!= backgr_index.html empty.html
+!= backgr_layers-hide.html empty.html
+!= backgr_layers-opacity.html empty.html
+!= backgr_layers-show.html empty.html
+!= backgr_position-table-cell.html empty.html
+!= backgr_position-table-column-group.html empty.html
+!= backgr_position-table-column.html empty.html
+!= backgr_position-table-row-group.html empty.html
+!= backgr_position-table-row.html empty.html
+!= backgr_position-table.html empty.html
+!= backgr_simple-table-cell.html empty.html
+!= backgr_simple-table-column-group.html empty.html
+!= backgr_simple-table-column.html empty.html
+!= backgr_simple-table-row-group.html empty.html
+!= backgr_simple-table-row.html empty.html
+!= backgr_simple-table.html empty.html
+
+# would also be good to test table-header-group and table-footer-group
+# (and rows and row groups in the presence of their reordering)
+# Also need to test different values of background-origin and background-clip.
+== border-separate-table-cell.html border-separate-table-cell-ref.html
+== border-separate-table-column-group.html border-separate-table-column-group-ref.html
+== border-separate-table-column.html border-separate-table-column-ref.html
+== border-separate-table-row-group.html border-separate-table-row-group-ref.html
+== border-separate-table-row.html border-separate-table-row-ref.html
+== border-separate-table.html border-separate-table-ref.html
+== border-collapse-table-cell.html border-collapse-table-cell-ref.html
+== border-collapse-table-column-group.html border-collapse-table-column-group-ref.html
+== border-collapse-table-column.html border-collapse-table-column-ref.html
+== border-collapse-table-row-group.html border-collapse-table-row-group-ref.html
+== border-collapse-table-row.html border-collapse-table-row-ref.html
+== border-collapse-table.html border-collapse-table-ref.html
diff --git a/mozilla/layout/reftests/table-background/repeatable-diagonal-gradient-with-ticks.png b/mozilla/layout/reftests/table-background/repeatable-diagonal-gradient-with-ticks.png
new file mode 100644
index 00000000000..9ac1548c8a6
Binary files /dev/null and b/mozilla/layout/reftests/table-background/repeatable-diagonal-gradient-with-ticks.png differ