Skip to content

Commit

Permalink
Move reftests for bug 645642 to w3-css/submitted and add CSS test met…
Browse files Browse the repository at this point in the history
…adata
  • Loading branch information
smontagu committed May 10, 2015
1 parent 6960f20 commit 312397b
Show file tree
Hide file tree
Showing 16 changed files with 159 additions and 120 deletions.
6 changes: 0 additions & 6 deletions layout/reftests/text/reftest.list
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,6 @@ HTTP(..) == synthetic-bold-papyrus-01.html synthetic-bold-papyrus-01-ref.html
!= text-align-justify-last-end.html text-align-justify-last-justify.html
!= text-align-justify-last-center.html text-align-justify-last-justify.html
== text-align-left-in-rtl-block.html text-align-left-in-rtl-block-ref.html
== text-align-match-parent-01.html text-align-match-parent-ref.html
== text-align-match-parent-02.html text-align-match-parent-ref.html
== text-align-match-parent-03.html text-align-match-parent-ref.html
== text-align-match-parent-04.html text-align-match-parent-ref.html
== text-align-match-parent-root-ltr.html text-align-match-parent-root-ltr-ref.html
== text-align-match-parent-root-rtl.html text-align-match-parent-root-rtl-ref.html
HTTP(..) == variation-selector-unsupported-1.html variation-selector-unsupported-1-ref.html
== white-space-1a.html white-space-1-ref.html
== white-space-1b.html white-space-1-ref.html
Expand Down
13 changes: 0 additions & 13 deletions layout/reftests/text/text-align-match-parent-root-ltr-ref.html

This file was deleted.

13 changes: 0 additions & 13 deletions layout/reftests/text/text-align-match-parent-root-ltr.html

This file was deleted.

13 changes: 0 additions & 13 deletions layout/reftests/text/text-align-match-parent-root-rtl-ref.html

This file was deleted.

13 changes: 0 additions & 13 deletions layout/reftests/text/text-align-match-parent-root-rtl.html

This file was deleted.

2 changes: 1 addition & 1 deletion layout/reftests/w3c-css/submitted/reftest.list
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ include ruby/reftest.list
# include selectors4/reftest.list

# Text Level 3
# include text3/reftest.list
include text3/reftest.list

# Text Decoration Level 3
include text-decor-3/reftest.list
Expand Down
6 changes: 6 additions & 0 deletions layout/reftests/w3c-css/submitted/text3/reftest.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
== text-align-match-parent-01.html text-align-match-parent-ref.html
== text-align-match-parent-02.html text-align-match-parent-ref.html
== text-align-match-parent-03.html text-align-match-parent-ref.html
== text-align-match-parent-04.html text-align-match-parent-ref.html
== text-align-match-parent-root-ltr.html text-align-match-parent-root-ltr-ref.html
== text-align-match-parent-root-rtl.html text-align-match-parent-root-rtl-ref.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@
<html>
<head>
<meta charset="utf-8">
<title>Text-align: match-parent</title>
<style>
<title>CSS Text: text-align: match-parent</title>
<link rel="author" title="Simon Montagu" href="mailto:[email protected]">
<link rel="help" href="http://www.w3.org/TR/css-text-3/#text-align-property">
<meta name="assert" content="Text checks that an element with
text-align: match-parent inherits its parent's value and calculates
'start' and 'end' with respect to its parent's direction"
<link rel="match" href="text-align-match-parent-ref.html">
<style type="text/css">
div.start { text-align: start; }
div.end { text-align: end; }
div.left { text-align: left; }
Expand All @@ -12,6 +18,8 @@
</style>
</head>
<body>
<div>Test passes if each line that says "Left" is aligned left and
each line that says "Right" is aligned right</div>
<div class="start" dir="ltr"><div dir="ltr">Left</div></div>
<div class="start" dir="ltr"><div dir="rtl">Left</div></div>
<div class="start" dir="rtl"><div dir="ltr">Right</div></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,40 @@
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<title>Text-align: match-parent</title>
<style>
<title>CSS Text: text-align: match-parent</title>
<link rel="author" title="Simon Montagu" href="mailto:[email protected]">
<link rel="help" href="http://www.w3.org/TR/css-text-3/#text-align-property">
<meta name="flags" content="dom">
<meta name="assert" content="Text checks that an element with
text-align: match-parent still aligns correctly if the parent's
dir attribute is changed">
<link rel="match" href="text-align-match-parent-ref.html">
<style type="text/css">
div.start { text-align: start; }
div.end { text-align: end; }
div.left { text-align: left; }
div.right { text-align: right; }
div > div { text-align: match-parent; }
</style>
<script type="text/javascript">
function changeParentDir()
{
for (parent = 0; parent < 16; ++parent) {
var parentDiv = document.getElementById("d" + parent);
if (parentDiv.dir == "rtl") {
parentDiv.dir = "ltr";
} else {
parentDiv.dir = "rtl";
}
}

document.documentElement.removeAttribute("class");
}
</script>
</head>
<body>
<body onload="changeParentDir()">
<div>Test passes if each line that says "Left" is aligned left and
each line that says "Right" is aligned right</div>
<div id="d0" class="start" dir="rtl"><div dir="ltr">Left</div></div>
<div id="d1" class="start" dir="rtl"><div dir="rtl">Left</div></div>
<div id="d2" class="start" dir="ltr"><div dir="ltr">Right</div></div>
Expand All @@ -28,23 +52,5 @@
<div id="d13" class="right" dir="rtl"><div dir="rtl">Right</div></div>
<div id="d14" class="right" dir="ltr"><div dir="ltr">Right</div></div>
<div id="d15" class="right" dir="ltr"><div dir="rtl">Right</div></div>

<script type="text/javascript">
function changeParentDir()
{
for (parent = 0; parent < 16; ++parent) {
var parentDiv = document.getElementById("d" + parent);
if (parentDiv.dir == "rtl") {
parentDiv.dir = "ltr";
} else {
parentDiv.dir = "rtl";
}
}

document.documentElement.removeAttribute("class");
}

document.addEventListener("MozReftestInvalidate", changeParentDir, false);
</script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,36 @@
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<title>Text-align: match-parent</title>
<style>
<title>CSS Text: text-align: match-parent</title>
<link rel="author" title="Simon Montagu" href="mailto:[email protected]">
<link rel="help" href="http://www.w3.org/TR/css-text-3/#text-align-property">
<meta name="flags" content="dom">
<meta name="assert" content="Text checks that an element whose
text-align property is changed to match-parent aligns correctly">
<link rel="match" href="text-align-match-parent-ref.html">
<style type="text/css">
div.start { text-align: start; }
div.end { text-align: end; }
div.left { text-align: left; }
div.right { text-align: right; }
div.center { text-align: center; }
div.match { text-align: match-parent; }
</style>
<script type="text/javascript">
function changeChildAlign()
{
for (child = 0; child < 16; ++child) {
var childDiv = document.getElementById("d" + child);
childDiv.className = "match";
}

document.documentElement.removeAttribute("class");
}
</script>
</head>
<body>
<body onload="changeChildAlign()">
<div>Test passes if each line that says "Left" is aligned left and
each line that says "Right" is aligned right</div>
<div class="start" dir="ltr"><div id="d0" class="center" dir="ltr">Left</div></div>
<div class="start" dir="ltr"><div id="d1" class="center" dir="rtl">Left</div></div>
<div class="start" dir="rtl"><div id="d2" class="center" dir="ltr">Right</div></div>
Expand All @@ -29,19 +48,5 @@
<div class="right" dir="ltr"><div id="d13" class="center" dir="rtl">Right</div></div>
<div class="right" dir="rtl"><div id="d14" class="center" dir="ltr">Right</div></div>
<div class="right" dir="rtl"><div id="d15" class="center" dir="rtl">Right</div></div>

<script type="text/javascript">
function changeChildAlign()
{
for (child = 0; child < 16; ++child) {
var childDiv = document.getElementById("d" + child);
childDiv.className = "match";
}

document.documentElement.removeAttribute("class");
}

document.addEventListener("MozReftestInvalidate", changeChildAlign, false);
</script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,36 @@
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<title>Text-align: match-parent</title>
<style>
<title>CSS Text: text-align: match-parent</title>
<link rel="author" title="Simon Montagu" href="mailto:[email protected]">
<link rel="help" href="http://www.w3.org/TR/css-text-3/#text-align-property">
<meta name="flags" content="dom">
<meta name="assert" content="Text checks that an element with
text-align: match-parent still aligns correctly if the parent's
width is changed">
<link rel="match" href="text-align-match-parent-ref.html">
<style type="text/css">
div.start { text-align: start; }
div.end { text-align: end; }
div.left { text-align: left; }
div.right { text-align: right; }
div > div { text-align: match-parent; }
</style>
<script type="text/javascript">
function changeParentWidth()
{
for (parent = 0; parent < 16; ++parent) {
var parentDiv = document.getElementById("d" + parent);
parentDiv.style.width = "";
}

document.documentElement.removeAttribute("class");
}
</script>
</head>
<body>
<body onload="changeParentWidth()">
<div>Test passes if each line that says "Left" is aligned left and
each line that says "Right" is aligned right</div>
<div id="d0" style="width: 50%;" class="start" dir="ltr"><div dir="ltr">Left</div></div>
<div id="d1" style="width: 50%;" class="start" dir="ltr"><div dir="rtl">Left</div></div>
<div id="d2" style="width: 50%;" class="start" dir="rtl"><div dir="ltr">Right</div></div>
Expand All @@ -28,19 +48,5 @@
<div id="d13" style="width: 50%;" class="right" dir="ltr"><div dir="rtl">Right</div></div>
<div id="d14" style="width: 50%;" class="right" dir="rtl"><div dir="ltr">Right</div></div>
<div id="d15" style="width: 50%;" class="right" dir="rtl"><div dir="rtl">Right</div></div>

<script type="text/javascript">
function changeParentWidth()
{
for (parent = 0; parent < 16; ++parent) {
var parentDiv = document.getElementById("d" + parent);
parentDiv.style.width = "";
}

document.documentElement.removeAttribute("class");
}

document.addEventListener("MozReftestInvalidate", changeParentWidth, false);
</script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
<html>
<head>
<meta charset="utf-8">
<title>Text-align: match-parent</title>
<style>
div.start { text-align: start; }
div.end { text-align: end; }
<title>CSS Reftest Reference</title>
<link rel="author" title="Simon Montagu" href="mailto:[email protected]">
<style type="text/css">
div.left { text-align: left; }
div.right { text-align: right; }
</style>
</head>
<body>
<div>Test passes if each line that says "Left" is aligned left and
each line that says "Right" is aligned right</div>
<div class="left">Left</div>
<div class="left">Left</div>
<div class="right">Right</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html dir="ltr">
<head>
<meta charset="utf-8">
<title>CSS Reftest Reference</title>
<link rel="author" title="Simon Montagu" href="mailto:[email protected]">
<style type="text/css">
html { text-align: start; }
</style>
</head>
<body>
<p>This line should be aligned left</p>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html dir="ltr">
<head>
<meta charset="utf-8">
<title>CSS Text: text-align: match-parent</title>
<link rel="author" title="Simon Montagu" href="mailto:[email protected]">
<link rel="help" href="http://www.w3.org/TR/css-text-3/#text-align-property">
<meta name="assert" content="Text checks that
text-align: match-parent on a root element with dir=ltr is
equivalent to text-align: start">
<link rel="match" href="text-align-match-parent-root-ltr-ref.html">
<style type="text/css">
html { text-align: match-parent; }
</style>
</head>
<body>
<p>This line should be aligned left</p>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html dir="rtl">
<head>
<meta charset="utf-8">
<title>CSS Reftest Reference</title>
<link rel="author" title="Simon Montagu" href="mailto:[email protected]">
<style type="text/css">
html { text-align: start; }
</style>
</head>
<body>
<p>This line should be aligned right</p>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html dir="rtl">
<head>
<title>CSS Text: text-align: match-parent</title>
<link rel="author" title="Simon Montagu" href="mailto:[email protected]">
<link rel="help" href="http://www.w3.org/TR/css-text-3/#text-align-property">
<meta name="assert" content="Text checks that
text-align: match-parent on a root element with dir=rtl is
equivalent to text-align: start">
<link rel="match" href="text-align-match-parent-root-rtl-ref.html">
<style type="text/css">
html { text-align: match-parent; }
</style>
</head>
<body>
<p>This line should be aligned right</p>
</body>
</html>

0 comments on commit 312397b

Please sign in to comment.