summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-page
diff options
context:
space:
mode:
Diffstat (limited to 'layout/reftests/css-page')
-rw-r--r--layout/reftests/css-page/generate-page-name-two-page-test.py117
-rw-r--r--layout/reftests/css-page/page-name-two-page-001.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-002.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-003.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-004.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-005.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-006.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-007.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-008.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-009.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-010.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-011.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-012.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-013.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-014.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-015.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-016.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-017.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-018.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-019.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-020.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-021.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-022.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-023.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-024.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-025.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-026.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-027.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-028.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-029.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-030.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-031.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-032.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-033.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-034.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-035.html8
-rw-r--r--layout/reftests/css-page/page-name-two-page-ref.html7
-rw-r--r--layout/reftests/css-page/reftest.list36
38 files changed, 440 insertions, 0 deletions
diff --git a/layout/reftests/css-page/generate-page-name-two-page-test.py b/layout/reftests/css-page/generate-page-name-two-page-test.py
new file mode 100644
index 0000000000..9b06b8a159
--- /dev/null
+++ b/layout/reftests/css-page/generate-page-name-two-page-test.py
@@ -0,0 +1,117 @@
+#!/usr/bin/env python
+#
+# Any copyright is dedicated to the Public Domain.
+# http://creativecommons.org/publicdomain/zero/1.0/
+#
+# Generates HTML test files with permutations for frame tree hierarchies to
+# test page-name breaks.
+# These should all have page-name-two-pages-ref.html as their ref case.
+#
+# The generated tests have the structure of two <p> elements that will have
+# different page name values through various means:
+# * Both <p> elements have different values for the `page` property.
+# * One <p> element has a specified non-default `page` property and the other
+# does not.
+# * One <p> element has a specified non-default `page` property and the other
+# has `page: auto`.
+#
+# Additionally, the <p> elements may be contained in a <div> element, which may
+# also have the `page` property set on it.
+
+import os
+import sys
+
+# Test count, used for file numbers
+i = 1
+
+# Generate tests that enumerate putting each paragraph element into a div or
+# not, and applying the page-name to the div or the paragraph element.
+
+# Data that is used to generate the structure and element attributes for a page.
+ALL_DATA_COMBOS = (
+ {"p_page": True, "use_div": False, "div_page": False},
+ {"p_page": True, "use_div": True, "div_page": False},
+ {"p_page": False, "use_div": True, "div_page": True},
+)
+
+# Process ALL_DATA_COMBOS to generate data combos for a page with a given name.
+
+
+def gen_data_combos(name):
+ combos = [{"p_page": False, "use_div": False, "div_page": False}]
+ for data in ALL_DATA_COMBOS:
+ data_copy = data.copy()
+ data_copy["p_page"] = data["p_page"] and name
+ data_copy["div_page"] = data["div_page"] and name
+ combos.append(data_copy)
+ # Make page: auto versions for parts with empty page values.
+ for k in ("p_page", "div_page"):
+ # Only care about div page when there is a div
+ if k == "div_page" and not data["use_div"]:
+ continue
+ if not data[k]:
+ data_copy_auto = data_copy.copy()
+ data_copy_auto[k] = "auto"
+ combos.append(data_copy_auto)
+ return combos
+
+
+A_DATA_COMBOS = gen_data_combos("a")
+B_DATA_COMBOS = gen_data_combos("b")
+
+
+def tag(name, page, inner=""):
+ # Build the opening
+ open_tag = "<" + name
+ if page:
+ open_tag += ' style="page:' + page + '"'
+ open_tag += ">"
+
+ close_tag = "</" + name + ">"
+ return open_tag + inner + close_tag
+
+
+def generate_page_html(txt, p_page, use_div, div_page):
+ p = tag("p", p_page, txt)
+ if use_div:
+ return tag("div", div_page, p)
+ return p
+
+
+# Preamble to all test cases
+BEGIN = """\
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+"""
+
+# Closing tags for all test cases.
+END = """
+</body>
+</html>
+"""
+
+directory = os.path.dirname(sys.argv[0])
+
+
+def data_has_no_page(d):
+ return (not d["p_page"] or d["p_page"] == "auto") and (
+ not d["div_page"] or d["div_page"] == "auto"
+ )
+
+
+for a in A_DATA_COMBOS:
+ for b in B_DATA_COMBOS:
+ # Test for the case of empty or auto page-names in both data
+ if data_has_no_page(a) and data_has_no_page(b):
+ continue
+ file_name = "page-name-two-page-" + str(i).rjust(3, "0") + ".html"
+ i += 1
+ f = open(os.path.join(directory, file_name), "w")
+ f.write(BEGIN)
+ f.write(generate_page_html("a", **a))
+ f.write("\n")
+ f.write(generate_page_html("b", **b))
+ f.write(END)
+ f.close()
diff --git a/layout/reftests/css-page/page-name-two-page-001.html b/layout/reftests/css-page/page-name-two-page-001.html
new file mode 100644
index 0000000000..f72637eb77
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-001.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<p>a</p>
+<p style="page:b">b</p>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-002.html b/layout/reftests/css-page/page-name-two-page-002.html
new file mode 100644
index 0000000000..422006f5f0
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-002.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<p>a</p>
+<div><p style="page:b">b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-003.html b/layout/reftests/css-page/page-name-two-page-003.html
new file mode 100644
index 0000000000..fc12c465bb
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-003.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<p>a</p>
+<div style="page:auto"><p style="page:b">b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-004.html b/layout/reftests/css-page/page-name-two-page-004.html
new file mode 100644
index 0000000000..cc63f3c409
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-004.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<p>a</p>
+<div style="page:b"><p>b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-005.html b/layout/reftests/css-page/page-name-two-page-005.html
new file mode 100644
index 0000000000..953246c3ad
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-005.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<p>a</p>
+<div style="page:b"><p style="page:auto">b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-006.html b/layout/reftests/css-page/page-name-two-page-006.html
new file mode 100644
index 0000000000..e02e3f079e
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-006.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<p style="page:a">a</p>
+<p>b</p>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-007.html b/layout/reftests/css-page/page-name-two-page-007.html
new file mode 100644
index 0000000000..0cd5ab8af5
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-007.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<p style="page:a">a</p>
+<p style="page:b">b</p>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-008.html b/layout/reftests/css-page/page-name-two-page-008.html
new file mode 100644
index 0000000000..8cfcef46dd
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-008.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<p style="page:a">a</p>
+<div><p style="page:b">b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-009.html b/layout/reftests/css-page/page-name-two-page-009.html
new file mode 100644
index 0000000000..53429ba135
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-009.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<p style="page:a">a</p>
+<div style="page:auto"><p style="page:b">b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-010.html b/layout/reftests/css-page/page-name-two-page-010.html
new file mode 100644
index 0000000000..ff1584fdd8
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-010.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<p style="page:a">a</p>
+<div style="page:b"><p>b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-011.html b/layout/reftests/css-page/page-name-two-page-011.html
new file mode 100644
index 0000000000..13b0c69513
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-011.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<p style="page:a">a</p>
+<div style="page:b"><p style="page:auto">b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-012.html b/layout/reftests/css-page/page-name-two-page-012.html
new file mode 100644
index 0000000000..881f374af9
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-012.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div><p style="page:a">a</p></div>
+<p>b</p>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-013.html b/layout/reftests/css-page/page-name-two-page-013.html
new file mode 100644
index 0000000000..c551eec04e
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-013.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div><p style="page:a">a</p></div>
+<p style="page:b">b</p>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-014.html b/layout/reftests/css-page/page-name-two-page-014.html
new file mode 100644
index 0000000000..6f3cd7eb5d
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-014.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div><p style="page:a">a</p></div>
+<div><p style="page:b">b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-015.html b/layout/reftests/css-page/page-name-two-page-015.html
new file mode 100644
index 0000000000..ff502ae481
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-015.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div><p style="page:a">a</p></div>
+<div style="page:auto"><p style="page:b">b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-016.html b/layout/reftests/css-page/page-name-two-page-016.html
new file mode 100644
index 0000000000..3bafb1f095
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-016.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div><p style="page:a">a</p></div>
+<div style="page:b"><p>b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-017.html b/layout/reftests/css-page/page-name-two-page-017.html
new file mode 100644
index 0000000000..6f898f3c6e
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-017.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div><p style="page:a">a</p></div>
+<div style="page:b"><p style="page:auto">b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-018.html b/layout/reftests/css-page/page-name-two-page-018.html
new file mode 100644
index 0000000000..cb88ea56ab
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-018.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="page:auto"><p style="page:a">a</p></div>
+<p>b</p>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-019.html b/layout/reftests/css-page/page-name-two-page-019.html
new file mode 100644
index 0000000000..e0baf5bf8b
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-019.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="page:auto"><p style="page:a">a</p></div>
+<p style="page:b">b</p>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-020.html b/layout/reftests/css-page/page-name-two-page-020.html
new file mode 100644
index 0000000000..7966fb677e
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-020.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="page:auto"><p style="page:a">a</p></div>
+<div><p style="page:b">b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-021.html b/layout/reftests/css-page/page-name-two-page-021.html
new file mode 100644
index 0000000000..f0ce1e5e97
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-021.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="page:auto"><p style="page:a">a</p></div>
+<div style="page:auto"><p style="page:b">b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-022.html b/layout/reftests/css-page/page-name-two-page-022.html
new file mode 100644
index 0000000000..95db31942f
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-022.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="page:auto"><p style="page:a">a</p></div>
+<div style="page:b"><p>b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-023.html b/layout/reftests/css-page/page-name-two-page-023.html
new file mode 100644
index 0000000000..6eeeee372d
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-023.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="page:auto"><p style="page:a">a</p></div>
+<div style="page:b"><p style="page:auto">b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-024.html b/layout/reftests/css-page/page-name-two-page-024.html
new file mode 100644
index 0000000000..b62a55e8bd
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-024.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="page:a"><p>a</p></div>
+<p>b</p>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-025.html b/layout/reftests/css-page/page-name-two-page-025.html
new file mode 100644
index 0000000000..f5378945cd
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-025.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="page:a"><p>a</p></div>
+<p style="page:b">b</p>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-026.html b/layout/reftests/css-page/page-name-two-page-026.html
new file mode 100644
index 0000000000..abf1362b03
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-026.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="page:a"><p>a</p></div>
+<div><p style="page:b">b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-027.html b/layout/reftests/css-page/page-name-two-page-027.html
new file mode 100644
index 0000000000..3b5829fea6
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-027.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="page:a"><p>a</p></div>
+<div style="page:auto"><p style="page:b">b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-028.html b/layout/reftests/css-page/page-name-two-page-028.html
new file mode 100644
index 0000000000..ee855d5939
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-028.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="page:a"><p>a</p></div>
+<div style="page:b"><p>b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-029.html b/layout/reftests/css-page/page-name-two-page-029.html
new file mode 100644
index 0000000000..5cb21b2464
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-029.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="page:a"><p>a</p></div>
+<div style="page:b"><p style="page:auto">b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-030.html b/layout/reftests/css-page/page-name-two-page-030.html
new file mode 100644
index 0000000000..9309123b11
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-030.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="page:a"><p style="page:auto">a</p></div>
+<p>b</p>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-031.html b/layout/reftests/css-page/page-name-two-page-031.html
new file mode 100644
index 0000000000..42626652c1
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-031.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="page:a"><p style="page:auto">a</p></div>
+<p style="page:b">b</p>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-032.html b/layout/reftests/css-page/page-name-two-page-032.html
new file mode 100644
index 0000000000..2d9d604e8f
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-032.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="page:a"><p style="page:auto">a</p></div>
+<div><p style="page:b">b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-033.html b/layout/reftests/css-page/page-name-two-page-033.html
new file mode 100644
index 0000000000..51783f2a33
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-033.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="page:a"><p style="page:auto">a</p></div>
+<div style="page:auto"><p style="page:b">b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-034.html b/layout/reftests/css-page/page-name-two-page-034.html
new file mode 100644
index 0000000000..d8a117168c
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-034.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="page:a"><p style="page:auto">a</p></div>
+<div style="page:b"><p>b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-035.html b/layout/reftests/css-page/page-name-two-page-035.html
new file mode 100644
index 0000000000..ab7e4d1376
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-035.html
@@ -0,0 +1,8 @@
+<!-- AUTOGENERATED BY generate-page-name-two-page-test.py, DO NOT MODIFY -->
+<!DOCTYPE html>
+<html class="reftest-paged">
+<body>
+<div style="page:a"><p style="page:auto">a</p></div>
+<div style="page:b"><p style="page:auto">b</p></div>
+</body>
+</html>
diff --git a/layout/reftests/css-page/page-name-two-page-ref.html b/layout/reftests/css-page/page-name-two-page-ref.html
new file mode 100644
index 0000000000..752ba719b4
--- /dev/null
+++ b/layout/reftests/css-page/page-name-two-page-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html class="reftest-paged">
+ <body>
+ <p style="break-after: always">a</p>
+ <p>b</p>
+ </body>
+</html>
diff --git a/layout/reftests/css-page/reftest.list b/layout/reftests/css-page/reftest.list
new file mode 100644
index 0000000000..79fc41d125
--- /dev/null
+++ b/layout/reftests/css-page/reftest.list
@@ -0,0 +1,36 @@
+# Auto-generated test cases
+== page-name-two-page-001.html page-name-two-page-ref.html
+== page-name-two-page-002.html page-name-two-page-ref.html
+== page-name-two-page-003.html page-name-two-page-ref.html
+== page-name-two-page-004.html page-name-two-page-ref.html
+== page-name-two-page-005.html page-name-two-page-ref.html
+== page-name-two-page-006.html page-name-two-page-ref.html
+== page-name-two-page-007.html page-name-two-page-ref.html
+== page-name-two-page-008.html page-name-two-page-ref.html
+== page-name-two-page-009.html page-name-two-page-ref.html
+== page-name-two-page-010.html page-name-two-page-ref.html
+== page-name-two-page-011.html page-name-two-page-ref.html
+== page-name-two-page-012.html page-name-two-page-ref.html
+== page-name-two-page-013.html page-name-two-page-ref.html
+== page-name-two-page-014.html page-name-two-page-ref.html
+== page-name-two-page-015.html page-name-two-page-ref.html
+== page-name-two-page-016.html page-name-two-page-ref.html
+== page-name-two-page-017.html page-name-two-page-ref.html
+== page-name-two-page-018.html page-name-two-page-ref.html
+== page-name-two-page-019.html page-name-two-page-ref.html
+== page-name-two-page-020.html page-name-two-page-ref.html
+== page-name-two-page-021.html page-name-two-page-ref.html
+== page-name-two-page-022.html page-name-two-page-ref.html
+== page-name-two-page-023.html page-name-two-page-ref.html
+== page-name-two-page-024.html page-name-two-page-ref.html
+== page-name-two-page-025.html page-name-two-page-ref.html
+== page-name-two-page-026.html page-name-two-page-ref.html
+== page-name-two-page-027.html page-name-two-page-ref.html
+== page-name-two-page-028.html page-name-two-page-ref.html
+== page-name-two-page-029.html page-name-two-page-ref.html
+== page-name-two-page-030.html page-name-two-page-ref.html
+== page-name-two-page-031.html page-name-two-page-ref.html
+== page-name-two-page-032.html page-name-two-page-ref.html
+== page-name-two-page-033.html page-name-two-page-ref.html
+== page-name-two-page-034.html page-name-two-page-ref.html
+== page-name-two-page-035.html page-name-two-page-ref.html