diff --git a/layout/reftests/abs-pos/reftest.list b/layout/reftests/abs-pos/reftest.list
index 6c496dc143c..40f629299cb 100644
--- a/layout/reftests/abs-pos/reftest.list
+++ b/layout/reftests/abs-pos/reftest.list
@@ -5,6 +5,11 @@ fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azur
== table-1.html table-1-ref.html
== table-2.html table-2-ref.html
== table-3.html table-3-ref.html
+== table-caption-1.html table-internal-1-ref.html
+== table-caption-2.html table-internal-2-ref.html
+== table-caption-3.html table-internal-3-ref.html
+== table-caption-4.html table-internal-8-ref.html
+skip-if(B2G&&browserIsRemote) != table-caption-5.html table-print-1-ref.html # TODO: change to == when bug 967870 is fixed
== table-cell-1.html table-internal-1-ref.html
== table-cell-2.html table-internal-2-ref.html
== table-cell-3.html table-internal-3-ref.html
@@ -12,6 +17,7 @@ fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azur
== table-cell-5.html table-internal-5-ref.html
== table-cell-6.html table-internal-6-ref.html
== table-cell-7.html table-internal-7-ref.html
+skip-if(B2G&&browserIsRemote) != table-cell-8.html table-print-1-ref.html # TODO: change to == when bug 967870 is fixed
== table-row-1.html table-internal-1-ref.html
== table-row-2.html table-internal-2-ref.html
== table-row-3.html table-internal-3-ref.html
diff --git a/layout/reftests/abs-pos/table-caption-1.html b/layout/reftests/abs-pos/table-caption-1.html
new file mode 100644
index 00000000000..28295e2f141
--- /dev/null
+++ b/layout/reftests/abs-pos/table-caption-1.html
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+ The green square should not completely cover the blue square.
+
+
+
+
diff --git a/layout/reftests/abs-pos/table-caption-2.html b/layout/reftests/abs-pos/table-caption-2.html
new file mode 100644
index 00000000000..8e5c0827bdf
--- /dev/null
+++ b/layout/reftests/abs-pos/table-caption-2.html
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+ The green square should not completely cover the blue square.
+
+
+
+
diff --git a/layout/reftests/abs-pos/table-caption-3.html b/layout/reftests/abs-pos/table-caption-3.html
new file mode 100644
index 00000000000..a0169df6016
--- /dev/null
+++ b/layout/reftests/abs-pos/table-caption-3.html
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+ The green square should not touch the blue square.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/layout/reftests/abs-pos/table-caption-4.html b/layout/reftests/abs-pos/table-caption-4.html
new file mode 100644
index 00000000000..47b4cc7bd3b
--- /dev/null
+++ b/layout/reftests/abs-pos/table-caption-4.html
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+ The green square should completely cover the red square.
+
+
+
+
diff --git a/layout/reftests/abs-pos/table-caption-5.html b/layout/reftests/abs-pos/table-caption-5.html
new file mode 100644
index 00000000000..964f679f8c7
--- /dev/null
+++ b/layout/reftests/abs-pos/table-caption-5.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/layout/reftests/abs-pos/table-cell-8.html b/layout/reftests/abs-pos/table-cell-8.html
new file mode 100644
index 00000000000..068a3fbeb5b
--- /dev/null
+++ b/layout/reftests/abs-pos/table-cell-8.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/layout/reftests/abs-pos/table-internal-8-ref.html b/layout/reftests/abs-pos/table-internal-8-ref.html
new file mode 100644
index 00000000000..3bff829deb3
--- /dev/null
+++ b/layout/reftests/abs-pos/table-internal-8-ref.html
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+ The green square should completely cover the red square.
+
+
+
diff --git a/layout/reftests/abs-pos/table-print-1-ref.html b/layout/reftests/abs-pos/table-print-1-ref.html
new file mode 100644
index 00000000000..1ed20cd56d0
--- /dev/null
+++ b/layout/reftests/abs-pos/table-print-1-ref.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/layout/reftests/columns/columns-table-caption-000-ref.html b/layout/reftests/columns/columns-table-caption-000-ref.html
new file mode 100644
index 00000000000..4c98005080e
--- /dev/null
+++ b/layout/reftests/columns/columns-table-caption-000-ref.html
@@ -0,0 +1,78 @@
+
+
+
+
+ Testcase for table caption column layout
+
+
+
+
+
+
+1 2 3
a table with a two column caption
+
+
+
1 2 3
+
a table with a two column caption
+
+
+1111 2 3
a table with a two column caption
+
+
+
+
+
+1111 2 3 4
a table with a two column caption
+
+1111 2 3 4
a table with a two column caption
+
+
+
diff --git a/layout/reftests/columns/columns-table-caption-000.html b/layout/reftests/columns/columns-table-caption-000.html
new file mode 100644
index 00000000000..68dec43db34
--- /dev/null
+++ b/layout/reftests/columns/columns-table-caption-000.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Testcase for table caption column layout
+
+
+
+
+
+
+
+1 2 3 a table with a two column caption
+
+1 2 3 a table with a two column caption
+
+1111 2 3 a table with a two column caption
+
+
+
+
+
+1111 2 3 4 a table with a two column caption
+
+1111 2 3 4 a table with a two column caption
+
+
+
diff --git a/layout/reftests/columns/reftest.list b/layout/reftests/columns/reftest.list
index c3816f3168e..5bbfc0cae3a 100644
--- a/layout/reftests/columns/reftest.list
+++ b/layout/reftests/columns/reftest.list
@@ -32,4 +32,5 @@ skip-if(B2G) == columnfill-overflow.html columnfill-overflow-ref.html # bug 7734
== column-balancing-nested-000.html column-balancing-nested-000-ref.html
== column-balancing-nested-001.html column-balancing-nested-001-ref.html
== columnrule-overflow.html columnrule-overflow-ref.html
+== columns-table-caption-000.html columns-table-caption-000-ref.html
== positioning-transforms-bug1112501.html positioning-transforms-bug1112501-ref.html
diff --git a/layout/reftests/table-overflow/reftest.list b/layout/reftests/table-overflow/reftest.list
index ab29763ffd2..6937f8dae19 100644
--- a/layout/reftests/table-overflow/reftest.list
+++ b/layout/reftests/table-overflow/reftest.list
@@ -2,3 +2,4 @@
== bug785684-y.html bug785684-ref.html
== table-row-pagination.html table-row-pagination-ref.html
== 963441.html 963441-ref.html
+== table-caption-scroll.html table-caption-scroll-ref.html
diff --git a/layout/reftests/table-overflow/table-caption-scroll-ref.html b/layout/reftests/table-overflow/table-caption-scroll-ref.html
new file mode 100644
index 00000000000..5c024f8d2ba
--- /dev/null
+++ b/layout/reftests/table-overflow/table-caption-scroll-ref.html
@@ -0,0 +1,49 @@
+
+
+
+ Testing table captions with overflow:auto/scroll/hidden
+
+
+
+
+
+0 1 2 3 4 5 6 7 8 9
+TTTTTTTTTT
+
+
+
+
+
+
+
+00000 1 2 3 4 5 6 7 8 9
+TTTTTTTTTT
+
+
+
+
+
+00000 1 2 3 4 5 6 7 8 9
+TTTTTTTTTT
+
+
+
+
diff --git a/layout/reftests/table-overflow/table-caption-scroll.html b/layout/reftests/table-overflow/table-caption-scroll.html
new file mode 100644
index 00000000000..70c5c0f5669
--- /dev/null
+++ b/layout/reftests/table-overflow/table-caption-scroll.html
@@ -0,0 +1,49 @@
+
+
+
+ Testing table captions with overflow:auto/scroll/hidden
+
+
+
+
+
+0 1 2 3 4 5 6 7 8 9
+TTTTTTTTTT
+
+
+
+
+
+
+
+00000 1 2 3 4 5 6 7 8 9
+TTTTTTTTTT
+
+
+
+
+
+00000 1 2 3 4 5 6 7 8 9
+TTTTTTTTTT
+
+
+
+