diff options
author | Patrick Walton <pcwalton@mimiga.net> | 2014-03-28 13:36:29 -0700 |
---|---|---|
committer | Patrick Walton <pcwalton@mimiga.net> | 2014-04-03 14:50:57 -0700 |
commit | 42170c75858eec2106e9e52551455e7eb1cc894b (patch) | |
tree | 30ef3738a4582497d65cef19e9321f67b1d4008a /src | |
parent | 4c53a21aa3cae42ec94b53b92cd1239c171e3641 (diff) | |
download | servo-42170c75858eec2106e9e52551455e7eb1cc894b.tar.gz servo-42170c75858eec2106e9e52551455e7eb1cc894b.zip |
test: Add many reftests for parts of Acid2.
Diffstat (limited to 'src')
24 files changed, 446 insertions, 3 deletions
diff --git a/src/test/ref/background_external_stylesheet.html b/src/test/ref/background_external_stylesheet.html index 791bfa41c87..9465a1b4cae 100644 --- a/src/test/ref/background_external_stylesheet.html +++ b/src/test/ref/background_external_stylesheet.html @@ -5,6 +5,6 @@ <link rel="stylesheet" href="subdirectory/background_image.css"> </head> <body> -<div class="test" style="width:200px; height:200px;"></div> +<div class="test" style="width:206px; height:206px;"></div> </body> </html> diff --git a/src/test/ref/background_position_a.html b/src/test/ref/background_position_a.html new file mode 100644 index 00000000000..c282dedc5fa --- /dev/null +++ b/src/test/ref/background_position_a.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> +<head> +<title>You see here a scroll labeled FOOBIE BLETCH.</title> +<style> +#foo { + background: url(400x400_green.png); + background-position: 128px 0px; + width: 32px; + height: 32px; + margin-left: 0; +} +</style> +</head> +<body> +<div id=foo></div> +</body> +</html> + diff --git a/src/test/ref/background_position_b.html b/src/test/ref/background_position_b.html new file mode 100644 index 00000000000..adb36abedae --- /dev/null +++ b/src/test/ref/background_position_b.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> +<head> +<title>You see here a scroll labeled FOOBIE BLETCH.</title> +<style> +#foo { + background: url(400x400_green.png); + width: 32px; + height: 32px; + margin-left: 128px; +} +</style> +</head> +<body> +<div id=foo></div> +</body> +</html> + + diff --git a/src/test/ref/background_ref.html b/src/test/ref/background_ref.html index 11faa177fb7..81f0d15e1fc 100644 --- a/src/test/ref/background_ref.html +++ b/src/test/ref/background_ref.html @@ -4,6 +4,6 @@ <title></title> </head> <body> -<img class="test" src="rust-0.png" style="width:200px; height:200px;" /> +<img class="test" src="rust-0.png" style="width:206px; height:206px;" /> </body> </html> diff --git a/src/test/ref/background_repeat_both_a.html b/src/test/ref/background_repeat_both_a.html new file mode 100644 index 00000000000..2f5bb3353ce --- /dev/null +++ b/src/test/ref/background_repeat_both_a.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> +<head> +<title>You see here a scroll labeled XIXAXA XOXAXA XUXAXA.</title> +<style> +div { + width: 412px; + height: 412px; + background: url(rust-0.png); + background-repeat: repeat; +} +</style> +</head> +<body> +<div id=repeat></div> +</body> +</html> + + diff --git a/src/test/ref/background_repeat_both_b.html b/src/test/ref/background_repeat_both_b.html new file mode 100644 index 00000000000..4a452813855 --- /dev/null +++ b/src/test/ref/background_repeat_both_b.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<html> +<head> +<title>You see here a scroll labeled XIXAXA XOXAXA XUXAXA.</title> +<style> +.repeaty { + width: 412px; + height: 206px; + background: url(rust-0.png); +} +.repeatx { + width: 206px; + height: 206px; + background: url(rust-0.png); + float: left; +} +</style> +</head> +<body> +<div> +<div class=repeaty><div class=repeatx></div><div class=repeatx></div></div> +<div class=repeaty><div class=repeatx></div><div class=repeatx></div></div> +</div> +</body> +</html> + + diff --git a/src/test/ref/background_repeat_none_a.html b/src/test/ref/background_repeat_none_a.html new file mode 100644 index 00000000000..81fadc33961 --- /dev/null +++ b/src/test/ref/background_repeat_none_a.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> +<head> +<title>You see here a scroll labeled XIXAXA XOXAXA XUXAXA.</title> +<style> +div { + width: 400px; + height: 400px; + background: url(rust-0.png); + background-repeat: no-repeat; +} +</style> +</head> +<body> +<div id=repeat></div> +</body> +</html> + + diff --git a/src/test/ref/background_repeat_none_b.html b/src/test/ref/background_repeat_none_b.html new file mode 100644 index 00000000000..4448cf19eb9 --- /dev/null +++ b/src/test/ref/background_repeat_none_b.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html> +<head> +<title>You see here a scroll labeled XIXAXA XOXAXA XUXAXA.</title> +<style> +div { + width: 200px; + height: 200px; + background: url(rust-0.png); +} +</style> +</head> +<body> +<div id=repeat></div> +</body> +</html> + + diff --git a/src/test/ref/background_repeat_x_a.html b/src/test/ref/background_repeat_x_a.html new file mode 100644 index 00000000000..9acdc7cf9d4 --- /dev/null +++ b/src/test/ref/background_repeat_x_a.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> +<head> +<title>You see here a scroll labeled XIXAXA XOXAXA XUXAXA.</title> +<style> +div { + width: 412px; + height: 412px; + background: url(rust-0.png); + background-repeat: repeat-x; +} +</style> +</head> +<body> +<div></div> +</body> +</html> + + diff --git a/src/test/ref/background_repeat_x_b.html b/src/test/ref/background_repeat_x_b.html new file mode 100644 index 00000000000..8757fc5d114 --- /dev/null +++ b/src/test/ref/background_repeat_x_b.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html> +<head> +<title>You see here a scroll labeled XIXAXA XOXAXA XUXAXA.</title> +<style> +.repeaty { + width: 206px; + height: 206px; + background: url(rust-0.png); + float: left; +} +</style> +</head> +<body> +<div> +<div class=repeaty></div> +<div class=repeaty></div> +</div> +</body> +</html> + + diff --git a/src/test/ref/background_repeat_y_a.html b/src/test/ref/background_repeat_y_a.html new file mode 100644 index 00000000000..46842c9501c --- /dev/null +++ b/src/test/ref/background_repeat_y_a.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> +<head> +<title>You see here a scroll labeled XIXAXA XOXAXA XUXAXA.</title> +<style> +div { + width: 412px; + height: 412px; + background: url(rust-0.png); + background-repeat: repeat-y; +} +</style> +</head> +<body> +<div id=repeat></div> +</body> +</html> + + diff --git a/src/test/ref/background_repeat_y_b.html b/src/test/ref/background_repeat_y_b.html new file mode 100644 index 00000000000..706e76af3c6 --- /dev/null +++ b/src/test/ref/background_repeat_y_b.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> +<head> +<title>You see here a scroll labeled XIXAXA XOXAXA XUXAXA.</title> +<style> +.repeaty { + width: 206px; + height: 206px; + background: url(rust-0.png); +} +</style> +</head> +<body> +<div> +<div class=repeaty></div> +<div class=repeaty></div> +</div> +</body> +</html> + + diff --git a/src/test/ref/background_style_attr.html b/src/test/ref/background_style_attr.html index 28bc8f6b21d..1879b52816b 100644 --- a/src/test/ref/background_style_attr.html +++ b/src/test/ref/background_style_attr.html @@ -4,6 +4,6 @@ <title></title> </head> <body> -<div class="test" style="background: url(rust-0.png); width:200px; height:200px;"></div> +<div class="test" style="background: url(rust-0.png); width:206px; height:206px;"></div> </body> </html> diff --git a/src/test/ref/basic.list b/src/test/ref/basic.list index 8108ab7a9c9..684f393a10a 100644 --- a/src/test/ref/basic.list +++ b/src/test/ref/basic.list @@ -54,3 +54,13 @@ == position_relative_a.html position_relative_b.html == position_relative_top_percentage_a.html position_relative_top_percentage_b.html == background_none_a.html background_none_b.html +== negative_margins_a.html negative_margins_b.html +== negative_margin_uncle_a.html negative_margin_uncle_b.html +== inline_padding_a.html inline_padding_b.html +== min_max_height_a.html min_max_height_b.html +== minimum_line_height_a.html minimum_line_height_b.html +== background_position_a.html background_position_b.html +== background_repeat_x_a.html background_repeat_x_b.html +== background_repeat_y_a.html background_repeat_y_b.html +== background_repeat_none_a.html background_repeat_none_b.html +== background_repeat_both_a.html background_repeat_both_b.html diff --git a/src/test/ref/inline_padding_a.html b/src/test/ref/inline_padding_a.html new file mode 100644 index 00000000000..3caceb80cd6 --- /dev/null +++ b/src/test/ref/inline_padding_a.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html> +<head> +<title>You see here a scroll labeled READ ME.</title> +<style> +#a { + padding: 0 0 0 64px; + color: blue; +} +</style> +</head> +<body> +<div><span id=a>blah blah blah</span></div> +</body> +</html> + diff --git a/src/test/ref/inline_padding_b.html b/src/test/ref/inline_padding_b.html new file mode 100644 index 00000000000..101efc121c4 --- /dev/null +++ b/src/test/ref/inline_padding_b.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> +<head> +<title>You see here a scroll labeled READ ME.</title> +<style> +#a { + padding: 0 0 0 64px; + color: blue; + margin: 0; +} +</style> +</head> +<body> +<div id=a>blah blah blah</div> +</body> +</html> + diff --git a/src/test/ref/min_max_height_a.html b/src/test/ref/min_max_height_a.html new file mode 100644 index 00000000000..ace1cac6df3 --- /dev/null +++ b/src/test/ref/min_max_height_a.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html> +<head> +<title>You see here a scroll labeled VE FORBRYDERNE.</title> +<style> +div { + width: 50px; +} +#a { + background: red; + height: 50px; + min-height: 100px; +} +#b { + background: green; + height: 100px; + max-height: 50px; +} +#c { + background: blue; + height: 50px; + min-height: 100px; /* <-- this one overrides per the spec */ + max-height: 25px; +} +</style> +</head> +<body> +<div id=a></div> +<div id=b></div> +<div id=c></div> +</body> +</html> + diff --git a/src/test/ref/min_max_height_b.html b/src/test/ref/min_max_height_b.html new file mode 100644 index 00000000000..8723d65b258 --- /dev/null +++ b/src/test/ref/min_max_height_b.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<html> +<head> +<title>You see here a scroll labeled VE FORBRYDERNE.</title> +<style> +div { + width: 50px; +} +#a { + background: red; + height: 100px; +} +#b { + background: green; + height: 50px; +} +#c { + background: blue; + height: 100px; +} +</style> +</head> +<body> +<div id=a></div> +<div id=b></div> +<div id=c></div> +</body> +</html> + diff --git a/src/test/ref/minimum_line_height_a.html b/src/test/ref/minimum_line_height_a.html new file mode 100644 index 00000000000..819c4ecdc8f --- /dev/null +++ b/src/test/ref/minimum_line_height_a.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> +<head> +<style> +#a { + line-height: 100px; +} + +#b { + line-height: 6px; +} +</style> +<body> +<div id=a><span id=b>Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal. Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battle-field of that war. We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this.</span></div> +</body> +</html> + diff --git a/src/test/ref/minimum_line_height_b.html b/src/test/ref/minimum_line_height_b.html new file mode 100644 index 00000000000..3805578b1ec --- /dev/null +++ b/src/test/ref/minimum_line_height_b.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> +<head> +<style> +#a { + line-height: 100px; +} + +#b { + line-height: 100px; +} +</style> +<body> +<div id=a><span id=b>Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal. Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battle-field of that war. We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this.</span></div> +</body> +</html> + diff --git a/src/test/ref/negative_margin_uncle_a.html b/src/test/ref/negative_margin_uncle_a.html new file mode 100644 index 00000000000..a96c2bdd700 --- /dev/null +++ b/src/test/ref/negative_margin_uncle_a.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html> +<head> +<title>You see here a scroll labeled KERNOD WEL.</title> +<style> +body { + font-size: 40px; +} +#d { + float: right; + background: green; + color: white; +} +#b { + margin: 0 0 -100px 0; +} +#c { + margin: 100px 0 0 0; + clear: both; + background-color: blue; + color: white; +} +</style> +</head> +<body> +<div id=d>Beetlejuice</div> +<div id=a><div id=b>Beetlejuice</div></div> +<div id=c>Beetlejuice</div> +</body> +</html> + diff --git a/src/test/ref/negative_margin_uncle_b.html b/src/test/ref/negative_margin_uncle_b.html new file mode 100644 index 00000000000..3269c47c2d6 --- /dev/null +++ b/src/test/ref/negative_margin_uncle_b.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<html> +<head> +<title>You see here a scroll labeled KERNOD WEL.</title> +<style> +body { + font-size: 40px; +} +#d { + float: right; + background: green; + color: white; +} +#c { + clear: both; + background-color: blue; + color: white; +} +</style> +</head> +<body> +<div id=d>Beetlejuice</div> +<div id=a>Beetlejuice</div> +<div id=c>Beetlejuice</div> +</body> +</html> + diff --git a/src/test/ref/negative_margins_a.html b/src/test/ref/negative_margins_a.html new file mode 100644 index 00000000000..3f4197f0e4a --- /dev/null +++ b/src/test/ref/negative_margins_a.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> +<head> +<title>You see here a scroll labeled JUYED AWK YACC.</title> +<style> +* { + line-height: 14px; +} +#b { + margin-top: -14px; +} +</style> +</head> +<body> +<div id=a>Here lies the body of Jonathan Blake.</div> +<div id=b>Stepped on the gas instead of the brake.</div> +</body> +</html> + diff --git a/src/test/ref/negative_margins_b.html b/src/test/ref/negative_margins_b.html new file mode 100644 index 00000000000..092ad0316d3 --- /dev/null +++ b/src/test/ref/negative_margins_b.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<html> +<head> +<title>You see here a scroll labeled JUYED AWK YACC.</title> +<style> +* { + line-height: 14px; +} +#a { + position: relative; +} +#b { + position: absolute; + top: 0; + left: 0; + right: 0; +} +</style> +</head> +<body> +<div id=a>Here lies the body of Jonathan Blake. +<div id=b>Stepped on the gas instead of the brake.</div></div> +</body> +</html> + |