Add some tests for @font-face (static cases, not dynamic ones). (Bug 457821)
authorL. David Baron <dbaron@dbaron.org>
Sat, 08 Nov 2008 08:35:54 -0800
changeset 21532 229683caa4c3d61be3013d18b99f83e44fd9c4d5
parent 21531 70826688e82207c95e5c1c5d0202d5b384377aba
child 21533 cb9d21b64b173dddbacc6274475b4e325f66ef3c
push id3559
push userdbaron@mozilla.com
push dateSat, 08 Nov 2008 16:36:32 +0000
treeherdermozilla-central@229683caa4c3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs457821
milestone1.9.1b2pre
Add some tests for @font-face (static cases, not dynamic ones). (Bug 457821)
layout/reftests/font-face/cross-iframe-1-inner-1.html
layout/reftests/font-face/cross-iframe-1-inner-2.html
layout/reftests/font-face/cross-iframe-1-ref.html
layout/reftests/font-face/cross-iframe-1.html
layout/reftests/font-face/download-1-notref.html
layout/reftests/font-face/download-1.html
layout/reftests/font-face/download-2-ref.html
layout/reftests/font-face/download-2.html
layout/reftests/font-face/fallback-to-system-1-ref.html
layout/reftests/font-face/fallback-to-system-1.html
layout/reftests/font-face/multiple-descriptor-1-notref.html
layout/reftests/font-face/multiple-descriptor-1-ref.html
layout/reftests/font-face/multiple-descriptor-1.html
layout/reftests/font-face/multiple-in-family-1-notref.html
layout/reftests/font-face/multiple-in-family-1-ref.html
layout/reftests/font-face/multiple-in-family-1.html
layout/reftests/font-face/name-override-1-ref.html
layout/reftests/font-face/name-override-1.html
layout/reftests/font-face/name-override-simple-1-ref.html
layout/reftests/font-face/name-override-simple-1.html
layout/reftests/font-face/order-1.html
layout/reftests/font-face/order-2.html
layout/reftests/font-face/order-3.html
layout/reftests/font-face/prop-order-over-rule-order-1a.html
layout/reftests/font-face/prop-order-over-rule-order-1b.html
layout/reftests/font-face/prop-order-over-rule-order-2a.html
layout/reftests/font-face/prop-order-over-rule-order-2b.html
layout/reftests/font-face/reftest.list
layout/reftests/font-face/src-list-1-ref.html
layout/reftests/font-face/src-list-1.html
layout/reftests/font-face/src-list-2-ref.html
layout/reftests/font-face/src-list-2.html
layout/reftests/font-face/src-list-3-ref.html
layout/reftests/font-face/src-list-3.html
layout/reftests/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/cross-iframe-1-inner-1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "MarkA";
+		src: url(../fonts/markA.ttf);
+	}
+
+	html, body {
+		margin: 0;
+		padding: 0;
+	}
+
+	</style>
+</head>
+<body>
+
+<p><span style="font-family: MarkA">A</span><span style="font-family: MarkB">B</span><span style="font-family: MarkC">C</span></p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/cross-iframe-1-inner-2.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "MarkB";
+		src: url(../fonts/markB.ttf);
+	}
+
+	html, body {
+		margin: 0;
+		padding: 0;
+	}
+
+	</style>
+</head>
+<body>
+
+<p><span style="font-family: MarkA">A</span><span style="font-family: MarkB">B</span><span style="font-family: MarkC">C</span></p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/cross-iframe-1-ref.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "MarkD";
+		src: url(../fonts/markD.ttf);
+	}
+
+	div {
+		margin: 0;
+		border: none;
+		padding: 0;
+		position: absolute;
+		left: 0;
+	}
+
+	</style>
+</head>
+<body>
+
+<!-- use nonexistent family to prevent kerning -->
+<p><span style="font-family: Nonexistent1">A</span><span style="font-family: Nonexistent2">B</span><span style="font-family: MarkD">D</span></p>
+
+<div style="top: 4em" src="cross-iframe-1-inner-1.html">
+<p><span style="font-family: MarkD">D</span><span style="font-family: Nonexistent2">B</span><span style="font-family: Nonexistent1">C</span></p>
+</div>
+<div style="top: 7em" src="cross-iframe-1-inner-2.html">
+<p><span>A</span><span style="font-family: MarkD">D</span><span>C</span></p>
+</div>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/cross-iframe-1.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "MarkC";
+		src: url(../fonts/markC.ttf);
+	}
+
+	iframe {
+		margin: 0;
+		border: none;
+		padding: 0;
+		position: absolute;
+		left: 0;
+	}
+
+	</style>
+</head>
+<body>
+
+<p><span style="font-family: MarkA">A</span><span style="font-family: MarkB">B</span><span style="font-family: MarkC">C</span></p>
+
+<iframe style="top: 4em" src="cross-iframe-1-inner-1.html"></iframe>
+<iframe style="top: 7em" src="cross-iframe-1-inner-2.html"></iframe>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/download-1-notref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	body { font-family: "MarkA"; }
+
+	</style>
+</head>
+<body>
+
+<p>ABC</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/download-1.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "MarkA";
+		src: url(../fonts/markA.ttf);
+	}
+
+	body { font-family: "MarkA"; }
+
+	</style>
+</head>
+<body>
+
+<p>ABC</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/download-2-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "MarkB";
+		src: url(../fonts/markB.ttf);
+	}
+
+	body { font-family: "MarkB"; }
+
+	</style>
+</head>
+<body>
+
+<p>B</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/download-2.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "MarkA";
+		src: url(../fonts/markA.ttf);
+	}
+
+	body { font-family: "MarkA"; }
+
+	</style>
+</head>
+<body>
+
+<p>A</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/fallback-to-system-1-ref.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	span {
+		/* to ensure the same vertical positioning of the text */
+		display: inline-block;
+		height: 3em;
+		width: 1em;
+		vertical-align: baseline;
+	}
+
+	</style>
+</head>
+<body>
+
+<p>DEF<span></span></p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/fallback-to-system-1.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "MarkA";
+		src: url(../fonts/markA.ttf);
+	}
+
+	body { font-family: "MarkA"; line-height: 1.5em; }
+
+	span {
+		/* to ensure the same vertical positioning of the text */
+		display: inline-block;
+		height: 3em;
+		width: 1em;
+		vertical-align: baseline;
+	}
+
+	</style>
+</head>
+<body>
+
+<p>DEF<span></span></p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/multiple-descriptor-1-notref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+<body>
+
+<p>ABC</p>
+<p>ABC</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/multiple-descriptor-1-ref.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	/* The last descriptor in a given rule wins, per CSS 2.0 */
+
+	@font-face {
+		src: url(../fonts/markA.ttf);
+		font-family: "MarkA";
+	}
+
+	</style>
+</head>
+<body>
+
+<p>ABC</p>
+<p style="font-family: MarkA">ABC</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/multiple-descriptor-1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	/* The last descriptor in a given rule wins, per CSS 2.0 */
+
+	@font-face {
+		font-family: "One";
+		src: url(../fonts/markB.ttf);
+		src: url(../fonts/markA.ttf);
+		font-family: "Two";
+	}
+
+	</style>
+</head>
+<body>
+
+<p style="font-family: One">ABC</p>
+<p style="font-family: Two">ABC</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/multiple-in-family-1-notref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "MarkA";
+		src: url(../fonts/markA.ttf);
+	}
+
+	body { font-family: "MarkA"; }
+
+	</style>
+</head>
+<body>
+
+<p>ABC</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/multiple-in-family-1-ref.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "MarkA";
+		src: url(../fonts/markA.ttf);
+	}
+
+	@font-face {
+		font-family: "MarkB";
+		src: url(../fonts/markB.ttf);
+	}
+
+	</style>
+</head>
+<body>
+
+<p><span style="font-family: MarkA">A</span><span style="font-family: MarkB">B</span>C</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/multiple-in-family-1.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "MarkA";
+		src: url(../fonts/markA.ttf);
+	}
+
+	@font-face {
+		font-family: "MarkB";
+		src: url(../fonts/markB.ttf);
+	}
+
+	body { font-family: "MarkA", "MarkB"; }
+
+	</style>
+</head>
+<body>
+
+<p>ABC</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/name-override-1-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "MarkD";
+		src: url(../fonts/markD.ttf);
+	}
+
+	body { font-family: "MarkD"; }
+
+	</style>
+</head>
+<body>
+
+<p>DBD</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/name-override-1.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "Foobar";
+		src: url(../fonts/markA.ttf), url(../fonts/markC.ttf);
+	}
+
+	body { font-family: "Foobar"; }
+
+	</style>
+</head>
+<body>
+
+<p>ABC</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/name-override-simple-1-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "MarkD";
+		src: url(../fonts/markD.ttf);
+	}
+
+	body { font-family: "MarkD"; }
+
+	</style>
+</head>
+<body>
+
+<p>ABD</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/name-override-simple-1.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "Foobar";
+		src: url(../fonts/markC.ttf);
+	}
+
+	body { font-family: "Foobar"; }
+
+	</style>
+</head>
+<body>
+
+<p>ABC</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/order-1.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "One";
+		src: url(../fonts/mark2A.ttf);
+	}
+
+	@font-face {
+		font-family: "One";
+		src: url(../fonts/markA.ttf);
+	}
+
+	body { font-family: "One"; }
+
+	</style>
+</head>
+<body>
+
+<p>ABC</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/order-2.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "One";
+		src: url(../fonts/markB.ttf);
+	}
+
+	@font-face {
+		font-family: "One";
+		src: url(../fonts/mark2B.ttf);
+	}
+
+	@font-face {
+		font-family: "One";
+		src: url(../fonts/mark2A.ttf);
+	}
+
+	@font-face {
+		font-family: "One";
+		src: url(../fonts/markA.ttf);
+	}
+
+	body { font-family: "One"; }
+
+	</style>
+</head>
+<body>
+
+<p>ABC</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/order-3.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "One";
+		src: url(../fonts/markB.ttf);
+	}
+
+	@font-face {
+		font-family: "One";
+		src: url(../fonts/mark2A.ttf);
+	}
+
+	@font-face {
+		font-family: "One";
+		src: url(../fonts/mark2B.ttf);
+	}
+
+	@font-face {
+		font-family: "One";
+		src: url(../fonts/markA.ttf);
+	}
+
+	body { font-family: "One"; }
+
+	</style>
+</head>
+<body>
+
+<p>ABC</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/prop-order-over-rule-order-1a.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "MarkA";
+		src: url(../fonts/markA.ttf);
+	}
+
+	@font-face {
+		font-family: "MarkB";
+		src: url(../fonts/markB.ttf);
+	}
+
+	body { font-family: "MarkA", "MarkB"; }
+
+	</style>
+</head>
+<body>
+
+<p>ABC</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/prop-order-over-rule-order-1b.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "MarkA";
+		src: url(../fonts/markA.ttf);
+	}
+
+	@font-face {
+		font-family: "MarkB";
+		src: url(../fonts/markB.ttf);
+	}
+
+	body { font-family: "MarkB", "MarkA"; }
+
+	</style>
+</head>
+<body>
+
+<p>ABC</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/prop-order-over-rule-order-2a.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "MarkB";
+		src: url(../fonts/markB.ttf);
+	}
+
+	@font-face {
+		font-family: "MarkA";
+		src: url(../fonts/markA.ttf);
+	}
+
+	body { font-family: "MarkA", "MarkB"; }
+
+	</style>
+</head>
+<body>
+
+<p>ABC</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/prop-order-over-rule-order-2b.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "MarkB";
+		src: url(../fonts/markB.ttf);
+	}
+
+	@font-face {
+		font-family: "MarkA";
+		src: url(../fonts/markA.ttf);
+	}
+
+	body { font-family: "MarkB", "MarkA"; }
+
+	</style>
+</head>
+<body>
+
+<p>ABC</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/reftest.list
@@ -0,0 +1,27 @@
+# Everything here uses HTTP(..) because they use fonts in ../fonts/.  We
+# can't use file:/// URLs because of cross-directory access restrictions
+# on file: URLs.
+
+fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") HTTP(..) != download-1.html download-1-notref.html
+fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") HTTP(..) == download-2.html download-2-ref.html
+HTTP(..) != download-2.html about:blank
+HTTP(..) == fallback-to-system-1.html fallback-to-system-1-ref.html
+fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") HTTP(..) == name-override-simple-1.html name-override-simple-1-ref.html
+fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") HTTP(..) != name-override-simple-1.html download-1-notref.html
+fails HTTP(..) == name-override-1.html name-override-1-ref.html
+HTTP(..) == multiple-descriptor-1.html multiple-descriptor-1-ref.html
+fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") HTTP(..) != multiple-descriptor-1.html multiple-descriptor-1-notref.html
+HTTP(..) == src-list-1.html src-list-1-ref.html
+fails-if(MOZ_WIDGET_TOOLKIT!="gtk2") HTTP(..) == src-list-2.html src-list-2-ref.html
+fails-if(MOZ_WIDGET_TOOLKIT!="gtk2") HTTP(..) == src-list-3.html src-list-3-ref.html
+# FIXME: The behavior here is neither mandated nor specified by the spec, but
+# it really ought to be.
+HTTP(..) == order-1.html src-list-1-ref.html
+fails-if(MOZ_WIDGET_TOOLKIT!="gtk2") HTTP(..) == order-2.html src-list-2-ref.html
+fails-if(MOZ_WIDGET_TOOLKIT!="gtk2") HTTP(..) == order-3.html src-list-3-ref.html
+fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") random-if(MOZ_WIDGET_TOOLKIT=="windows") HTTP(..) == multiple-in-family-1.html multiple-in-family-1-ref.html
+fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") random-if(MOZ_WIDGET_TOOLKIT=="windows") HTTP(..) != multiple-in-family-1.html multiple-in-family-1-notref.html
+random-if(MOZ_WIDGET_TOOLKIT=="windows") HTTP(..) == prop-order-over-rule-order-1a.html prop-order-over-rule-order-2a.html
+random-if(MOZ_WIDGET_TOOLKIT=="windows") HTTP(..) == prop-order-over-rule-order-1b.html prop-order-over-rule-order-2b.html
+random-if(MOZ_WIDGET_TOOLKIT=="windows") fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") HTTP(..) != prop-order-over-rule-order-1a.html prop-order-over-rule-order-1b.html
+fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") HTTP(..) == cross-iframe-1.html cross-iframe-1-ref.html
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/src-list-1-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "MarkA";
+		src: url(../fonts/markA.ttf);
+	}
+
+	body { font-family: "MarkA"; }
+
+	</style>
+</head>
+<body>
+
+<p>ABC</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/src-list-1.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "One";
+		src: url(../fonts/markA.ttf), url(../fonts/mark2A.ttf);
+	}
+
+	body { font-family: "One"; }
+
+	</style>
+</head>
+<body>
+
+<p>ABC</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/src-list-2-ref.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "MarkA";
+		src: url(../fonts/markA.ttf);
+	}
+
+	@font-face {
+		font-family: "Mark2B";
+		src: url(../fonts/mark2B.ttf);
+	}
+
+	</style>
+</head>
+<body>
+
+<p><span style="font-family: MarkA">A</span><span style="font-family: Mark2B">B</span>C</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/src-list-2.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "One";
+		src: url(../fonts/markA.ttf), url(../fonts/mark2A.ttf), url(../fonts/mark2B.ttf), url(../fonts/markB.ttf);
+	}
+
+	body { font-family: "One"; }
+
+	</style>
+</head>
+<body>
+
+<p>ABC</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/src-list-3-ref.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "MarkA";
+		src: url(../fonts/markA.ttf);
+	}
+
+	@font-face {
+		font-family: "Mark2B";
+		src: url(../fonts/mark2B.ttf);
+	}
+
+	</style>
+</head>
+<body>
+
+<p><span style="font-family: MarkA">A</span><span style="font-family: Mark2B">B</span>C</p>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-face/src-list-3.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+
+	@font-face {
+		font-family: "One";
+		src: url(../fonts/markA.ttf), url(../fonts/mark2B.ttf), url(../fonts/mark2A.ttf), url(../fonts/markB.ttf);
+	}
+
+	body { font-family: "One"; }
+
+	</style>
+</head>
+<body>
+
+<p>ABC</p>
+
+</body>
+</html>
--- a/layout/reftests/reftest.list
+++ b/layout/reftests/reftest.list
@@ -48,16 +48,19 @@ include counters/reftest.list
 include generated-content/reftest.list
 
 # first-letter/
 include first-letter/reftest.list
 
 # first-line/
 include first-line/reftest.list
 
+# font-face
+include font-face/reftest.list
+
 # forms
 include forms/reftest.list
 
 # block-inside-inline splits
 include ib-split/reftest.list
 
 # image-region/
 include image-region/reftest.list