diff --git a/layout/base/tests/Makefile.in b/layout/base/tests/Makefile.in
index 4b58fa5097ac..899c432b0b89 100644
--- a/layout/base/tests/Makefile.in
+++ b/layout/base/tests/Makefile.in
@@ -180,6 +180,7 @@ _TEST_FILES = \
test_bug603550.html \
test_bug629838.html \
test_bug646757.html \
+ test_font_inflation_reftests.html \
$(NULL)
# Tests for bugs 441782, 467672 and 570378 don't pass reliably on Windows, because of bug 469208
@@ -377,10 +378,16 @@ _BROWSER_FILES = \
browser_bug617076.js \
$(NULL)
+_INFLATION_REFTEST_FILES = \
+ $(shell find $(srcdir)/font-inflation/ -name '*.html' -o -name '*.xhtml') \
+ $(NULL)
+
libs:: $(_TEST_FILES)
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
libs:: $(_BROWSER_FILES)
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
+libs:: $(_INFLATION_REFTEST_FILES)
+ $(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)/font-inflation/
check::
@$(EXIT_ON_ERROR) \
diff --git a/layout/base/tests/font-inflation/bullet-1-ref.html b/layout/base/tests/font-inflation/bullet-1-ref.html
new file mode 100644
index 000000000000..6f87b9407558
--- /dev/null
+++ b/layout/base/tests/font-inflation/bullet-1-ref.html
@@ -0,0 +1,9 @@
+
+
+
diff --git a/layout/base/tests/font-inflation/bullet-1.html b/layout/base/tests/font-inflation/bullet-1.html
new file mode 100644
index 000000000000..6433753fd622
--- /dev/null
+++ b/layout/base/tests/font-inflation/bullet-1.html
@@ -0,0 +1,9 @@
+
+
+
diff --git a/layout/base/tests/font-inflation/bullet-2-ref.html b/layout/base/tests/font-inflation/bullet-2-ref.html
new file mode 100644
index 000000000000..5f84a9d64e8c
--- /dev/null
+++ b/layout/base/tests/font-inflation/bullet-2-ref.html
@@ -0,0 +1,9 @@
+
+
+
+ - item
+
diff --git a/layout/base/tests/font-inflation/bullet-2.html b/layout/base/tests/font-inflation/bullet-2.html
new file mode 100644
index 000000000000..9e1ce9240038
--- /dev/null
+++ b/layout/base/tests/font-inflation/bullet-2.html
@@ -0,0 +1,9 @@
+
+
+
+ - item
+
diff --git a/layout/base/tests/font-inflation/css-transform-1-ref.html b/layout/base/tests/font-inflation/css-transform-1-ref.html
new file mode 100644
index 000000000000..36ea266158ac
--- /dev/null
+++ b/layout/base/tests/font-inflation/css-transform-1-ref.html
@@ -0,0 +1,6 @@
+
+
+Hello world
diff --git a/layout/base/tests/font-inflation/css-transform-1.html b/layout/base/tests/font-inflation/css-transform-1.html
new file mode 100644
index 000000000000..7fc0e8fe5305
--- /dev/null
+++ b/layout/base/tests/font-inflation/css-transform-1.html
@@ -0,0 +1,10 @@
+
+
+
+Hello world
diff --git a/layout/base/tests/font-inflation/css-transform-2-ref.html b/layout/base/tests/font-inflation/css-transform-2-ref.html
new file mode 100644
index 000000000000..b0916faad805
--- /dev/null
+++ b/layout/base/tests/font-inflation/css-transform-2-ref.html
@@ -0,0 +1,6 @@
+
+
+
diff --git a/layout/base/tests/font-inflation/css-transform-2.html b/layout/base/tests/font-inflation/css-transform-2.html
new file mode 100644
index 000000000000..856ee8e2c625
--- /dev/null
+++ b/layout/base/tests/font-inflation/css-transform-2.html
@@ -0,0 +1,10 @@
+
+
+
+
diff --git a/layout/base/tests/font-inflation/decoration-1-ref.html b/layout/base/tests/font-inflation/decoration-1-ref.html
new file mode 100644
index 000000000000..ce2b0c0ef0b8
--- /dev/null
+++ b/layout/base/tests/font-inflation/decoration-1-ref.html
@@ -0,0 +1,8 @@
+
+
+Hello world
diff --git a/layout/base/tests/font-inflation/decoration-1.html b/layout/base/tests/font-inflation/decoration-1.html
new file mode 100644
index 000000000000..9392fafcd187
--- /dev/null
+++ b/layout/base/tests/font-inflation/decoration-1.html
@@ -0,0 +1,13 @@
+
+
+
+Hello world
diff --git a/layout/base/tests/font-inflation/input-text-1-ref.html b/layout/base/tests/font-inflation/input-text-1-ref.html
new file mode 100644
index 000000000000..2514297cc930
--- /dev/null
+++ b/layout/base/tests/font-inflation/input-text-1-ref.html
@@ -0,0 +1,11 @@
+
+
+
+
diff --git a/layout/base/tests/font-inflation/input-text-1.html b/layout/base/tests/font-inflation/input-text-1.html
new file mode 100644
index 000000000000..48bf661cc79c
--- /dev/null
+++ b/layout/base/tests/font-inflation/input-text-1.html
@@ -0,0 +1,11 @@
+
+
+
+
diff --git a/layout/base/tests/font-inflation/input-text-2-ref.html b/layout/base/tests/font-inflation/input-text-2-ref.html
new file mode 100644
index 000000000000..7e52747742e5
--- /dev/null
+++ b/layout/base/tests/font-inflation/input-text-2-ref.html
@@ -0,0 +1,11 @@
+
+
+
+
diff --git a/layout/base/tests/font-inflation/input-text-2.html b/layout/base/tests/font-inflation/input-text-2.html
new file mode 100644
index 000000000000..cda175fdeae2
--- /dev/null
+++ b/layout/base/tests/font-inflation/input-text-2.html
@@ -0,0 +1,11 @@
+
+
+
+
diff --git a/layout/base/tests/font-inflation/input-text-3-ref.html b/layout/base/tests/font-inflation/input-text-3-ref.html
new file mode 100644
index 000000000000..65173d430ba4
--- /dev/null
+++ b/layout/base/tests/font-inflation/input-text-3-ref.html
@@ -0,0 +1,11 @@
+
+
+
+
diff --git a/layout/base/tests/font-inflation/input-text-3.html b/layout/base/tests/font-inflation/input-text-3.html
new file mode 100644
index 000000000000..a4cb881f1a81
--- /dev/null
+++ b/layout/base/tests/font-inflation/input-text-3.html
@@ -0,0 +1,11 @@
+
+
+
+
diff --git a/layout/base/tests/font-inflation/text-1-ref.html b/layout/base/tests/font-inflation/text-1-ref.html
new file mode 100644
index 000000000000..cdf5d8544804
--- /dev/null
+++ b/layout/base/tests/font-inflation/text-1-ref.html
@@ -0,0 +1,6 @@
+
+
+Hello world
diff --git a/layout/base/tests/font-inflation/text-1.html b/layout/base/tests/font-inflation/text-1.html
new file mode 100644
index 000000000000..3bc6129d3641
--- /dev/null
+++ b/layout/base/tests/font-inflation/text-1.html
@@ -0,0 +1,10 @@
+
+
+
+Hello world
diff --git a/layout/base/tests/font-inflation/text-2-ref.html b/layout/base/tests/font-inflation/text-2-ref.html
new file mode 100644
index 000000000000..ea117963c01e
--- /dev/null
+++ b/layout/base/tests/font-inflation/text-2-ref.html
@@ -0,0 +1,6 @@
+
+
+Hello world
diff --git a/layout/base/tests/font-inflation/text-2.html b/layout/base/tests/font-inflation/text-2.html
new file mode 100644
index 000000000000..848a40eb3a75
--- /dev/null
+++ b/layout/base/tests/font-inflation/text-2.html
@@ -0,0 +1,10 @@
+
+
+
+Hello world
diff --git a/layout/base/tests/font-inflation/text-3-ref.html b/layout/base/tests/font-inflation/text-3-ref.html
new file mode 100644
index 000000000000..c2565f0c97b7
--- /dev/null
+++ b/layout/base/tests/font-inflation/text-3-ref.html
@@ -0,0 +1,7 @@
+
+
+Hello world
diff --git a/layout/base/tests/font-inflation/text-3.html b/layout/base/tests/font-inflation/text-3.html
new file mode 100644
index 000000000000..e410a10acea0
--- /dev/null
+++ b/layout/base/tests/font-inflation/text-3.html
@@ -0,0 +1,11 @@
+
+
+
+Hello world
diff --git a/layout/base/tests/font-inflation/text-4-ref.html b/layout/base/tests/font-inflation/text-4-ref.html
new file mode 100644
index 000000000000..b8930c11719e
--- /dev/null
+++ b/layout/base/tests/font-inflation/text-4-ref.html
@@ -0,0 +1,7 @@
+
+
+Hello world
diff --git a/layout/base/tests/font-inflation/text-4.html b/layout/base/tests/font-inflation/text-4.html
new file mode 100644
index 000000000000..ba9ab9ef8055
--- /dev/null
+++ b/layout/base/tests/font-inflation/text-4.html
@@ -0,0 +1,11 @@
+
+
+
+Hello world
diff --git a/layout/base/tests/font-inflation/textarea-1-ref.html b/layout/base/tests/font-inflation/textarea-1-ref.html
new file mode 100644
index 000000000000..c393cb09c1ae
--- /dev/null
+++ b/layout/base/tests/font-inflation/textarea-1-ref.html
@@ -0,0 +1,11 @@
+
+
+
+
diff --git a/layout/base/tests/font-inflation/textarea-1.html b/layout/base/tests/font-inflation/textarea-1.html
new file mode 100644
index 000000000000..34e2446c4b0d
--- /dev/null
+++ b/layout/base/tests/font-inflation/textarea-1.html
@@ -0,0 +1,11 @@
+
+
+
+
diff --git a/layout/base/tests/font-inflation/textarea-2-ref.html b/layout/base/tests/font-inflation/textarea-2-ref.html
new file mode 100644
index 000000000000..da650e128fe1
--- /dev/null
+++ b/layout/base/tests/font-inflation/textarea-2-ref.html
@@ -0,0 +1,11 @@
+
+
+
+
diff --git a/layout/base/tests/font-inflation/textarea-2.html b/layout/base/tests/font-inflation/textarea-2.html
new file mode 100644
index 000000000000..7405f70754b3
--- /dev/null
+++ b/layout/base/tests/font-inflation/textarea-2.html
@@ -0,0 +1,11 @@
+
+
+
+
diff --git a/layout/base/tests/font-inflation/textarea-3-ref.html b/layout/base/tests/font-inflation/textarea-3-ref.html
new file mode 100644
index 000000000000..4f9d6065bcff
--- /dev/null
+++ b/layout/base/tests/font-inflation/textarea-3-ref.html
@@ -0,0 +1,11 @@
+
+
+
+
diff --git a/layout/base/tests/font-inflation/textarea-3.html b/layout/base/tests/font-inflation/textarea-3.html
new file mode 100644
index 000000000000..e4ed681f4af5
--- /dev/null
+++ b/layout/base/tests/font-inflation/textarea-3.html
@@ -0,0 +1,11 @@
+
+
+
+
diff --git a/layout/base/tests/test_font_inflation_reftests.html b/layout/base/tests/test_font_inflation_reftests.html
new file mode 100644
index 000000000000..81c29f252788
--- /dev/null
+++ b/layout/base/tests/test_font_inflation_reftests.html
@@ -0,0 +1,127 @@
+
+
+
+
+ Font size inflation reftests
+
+
+
+
+
+
+Mozilla Bug 627842
+
+
+
+
+
diff --git a/testing/mochitest/tests/SimpleTest/WindowSnapshot.js b/testing/mochitest/tests/SimpleTest/WindowSnapshot.js
index 91215f83cdd3..35034abc2527 100644
--- a/testing/mochitest/tests/SimpleTest/WindowSnapshot.js
+++ b/testing/mochitest/tests/SimpleTest/WindowSnapshot.js
@@ -45,3 +45,19 @@ function compareSnapshots(s1, s2, expected) {
return [correct, s1Str, s2Str];
}
+
+function assertSnapshots(s1, s2, expected, s1name, s2name) {
+ var [correct, s1Str, s2Str] = compareSnapshots(s1, s2, expected);
+ var sym = expected ? "==" : "!=";
+ ok(correct, "reftest comparison: " + sym + " " + s1name + " " + s2name);
+ if (!correct) {
+ var report = "REFTEST TEST-UNEXPECTED-FAIL | " + s1name + " | image comparison (" + sym + ")\n";
+ if (expected) {
+ report += "REFTEST IMAGE 1 (TEST): " + s1Str + "\n";
+ report += "REFTEST IMAGE 2 (REFERENCE): " + s2Str + "\n";
+ } else {
+ report += "REFTEST IMAGE: " + s1Str + "\n";
+ }
+ dump(report);
+ }
+}