Tests for bug 1172774, r=jfkthame

This commit is contained in:
Simon Montagu 2015-06-10 23:43:26 -07:00
Родитель d4298ccd14
Коммит ea9c61217f
14 изменённых файлов: 511 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Writing Modes Test: margin percentage and 'vertical-rl'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
</head>
<body>
<div id="reference"><img src="blue-yellow-206w-165h.png" width="206" height="165" alt="Image download support must be enabled"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,59 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Writing Modes Test: margin percentage and 'vertical-rl'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<meta content="This test checks that percentages on the margin are calculated with respect to the inline-size (width) of the containing block if 'writing-mode' of such containing block is 'horizontal-tb'. In this test, div.outer's computed 'writing-mode' value is 'horizontal-tb' and it is the div.inner's containing block." name="assert">
<style type="text/css">
div.outer
{
background-color: blue;
border: blue solid 3px;
width: 200px;
}
hr
{
background-color: transparent;
border: transparent none 0px;
height: 3px;
margin: 0.5em auto;
}
div.inner
{
background-color: yellow;
height: 50px;
width: 50px;
-ah-writing-mode: vertical-rl;
-webkit-writing-mode: vertical-rl;
writing-mode: tb-rl; /* IE11 */
writing-mode: vertical-rl;
}
div.foo
{
margin-bottom: 2.5%; /* 5px */
margin-left: 50%; /* 100px */
margin-right: 25%; /* 50px */
margin-top: 10%; /* 20px */
}
div.bar
{
margin-bottom: 10%;
margin-left: 25%;
margin-right: 50%;
margin-top: 2.5%;
}
</style>
</head>
<body>
<div class="outer">
<div class="inner foo"></div>
<hr>
<div class="inner bar"></div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,59 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Writing Modes Test: margin percentage and 'vertical-lr'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<meta content="This test checks that percentages on the margin are calculated with respect to the inline-size (width) of the containing block if 'writing-mode' of such containing block is 'horizontal-tb'. In this test, div.outer's computed 'writing-mode' value is 'horizontal-tb' and it is the div.inner's containing block." name="assert">
<style type="text/css">
div.outer
{
background-color: blue;
border: blue solid 3px;
width: 200px;
}
hr
{
background-color: transparent;
border: transparent none 0px;
height: 3px;
margin: 0.5em auto;
}
div.inner
{
background-color: yellow;
height: 50px;
width: 50px;
-ah-writing-mode: vertical-lr;
-webkit-writing-mode: vertical-lr;
writing-mode: tb-lr; /* IE11 */
writing-mode: vertical-lr;
}
div.foo
{
margin-bottom: 2.5%; /* 5px */
margin-left: 50%; /* 100px */
margin-right: 25%; /* 50px */
margin-top: 10%; /* 20px */
}
div.bar
{
margin-bottom: 10%;
margin-left: 25%;
margin-right: 50%;
margin-top: 2.5%;
}
</style>
</head>
<body>
<div class="outer">
<div class="inner foo"></div>
<hr>
<div class="inner bar"></div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,63 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Writing Modes Test: margin percentage and 'vertical-rl'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<meta content="This test checks that percentages on the margin are calculated with respect to the inline size (height!) of the containing block if 'writing-mode' of such containing block is 'vertical-rl'. In this test, div.outer's computed 'writing-mode' value is 'vertical-rl' and it is the div.inner's containing block." name="assert">
<style type="text/css">
div.outer
{
background-color: blue;
border: blue solid 3px;
height: 200px;
-ah-writing-mode: vertical-rl;
-webkit-writing-mode: vertical-rl;
writing-mode: tb-rl; /* IE11 */
writing-mode: vertical-rl;
}
hr
{
background-color: transparent;
border: transparent none 0px;
width: 3px;
margin: auto 0.5em;
}
div.inner
{
background-color: yellow;
height: 50px;
width: 50px;
-ah-writing-mode: horizontal-tb;
-webkit-writing-mode: horizontal-tb;
writing-mode: lr-tb; /* IE11 */
writing-mode: horizontal-tb;
}
div.foo
{
margin-left: 2.5%; /* 5px */
margin-top: 50%; /* 100px */
margin-bottom: 25%; /* 50px */
margin-right: 10%; /* 20px */
}
div.bar
{
margin-left: 10%;
margin-top: 25%;
margin-bottom: 50%;
margin-right: 2.5%;
}
</style>
</head>
<body>
<div class="outer">
<div class="inner foo"></div>
<hr>
<div class="inner bar"></div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,63 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Writing Modes Test: margin percentage and 'vertical-lr'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<meta content="This test checks that percentages on the margin are calculated with respect to the inline size (height!) of the containing block if 'writing-mode' of such containing block is 'vertical-lr'. In this test, div.outer's computed 'writing-mode' value is 'vertical-lr' and it is the div.inner's containing block." name="assert">
<style type="text/css">
div.outer
{
background-color: blue;
border: blue solid 3px;
height: 200px;
-ah-writing-mode: vertical-lr;
-webkit-writing-mode: vertical-lr;
writing-mode: tb-lr; /* IE11 */
writing-mode: vertical-lr;
}
hr
{
background-color: transparent;
border: transparent none 0px;
width: 3px;
margin: auto 0.5em;
}
div.inner
{
background-color: yellow;
height: 50px;
width: 50px;
-ah-writing-mode: horizontal-tb;
-webkit-writing-mode: horizontal-tb;
writing-mode: lr-tb; /* IE11 */
writing-mode: horizontal-tb;
}
div.foo
{
margin-left: 2.5%; /* 5px */
margin-top: 50%; /* 100px */
margin-bottom: 25%; /* 50px */
margin-right: 10%; /* 20px */
}
div.bar
{
margin-left: 10%;
margin-top: 25%;
margin-bottom: 50%;
margin-right: 2.5%;
}
</style>
</head>
<body>
<div class="outer">
<div class="inner bar"></div>
<hr>
<div class="inner foo"></div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,57 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Writing Modes Test: padding percentage and 'vertical-rl'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<meta content="This test checks that percentages on the padding are calculated with respect to the inline-size (width) of the containing block if 'writing-mode' of such containing block is 'horizontal-tb'. In this test, div.outer's computed 'writing-mode' value is 'horizontal-tb' and it is the div.inner's containing block." name="assert">
<style type="text/css">
div.outer
{
background-color: blue;
border: blue solid 3px;
width: 200px;
}
hr
{
background-color: transparent;
border: transparent none 0px;
height: 3px;
margin: 3px auto;
}
div.inner
{
background-color: transparent;
height: 50px;
-ah-writing-mode: vertical-rl;
-webkit-writing-mode: vertical-rl;
writing-mode: tb-rl; /* IE11 */
writing-mode: vertical-rl;
}
div.foo
{
padding-bottom: 2.5%; /* 5px */
padding-left: 50%; /* 100px */
padding-right: 25%; /* 50px */
padding-top: 10%; /* 20px */
}
div.bar
{
padding-bottom: 10%;
padding-left: 25%;
padding-right: 50%;
padding-top: 2.5%;
}
</style>
</head>
<body>
<div class="outer">
<div class="inner foo"><img src="swatch-yellow.png" width="50" height="50" alt="Image download support must be enabled"></div>
<hr>
<div class="inner bar"><img src="swatch-yellow.png" width="50" height="50" alt="Image download support must be enabled"></div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,58 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Writing Modes Test: padding percentage and 'vertical-lr'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<meta content="This test checks that percentages on the padding are calculated with respect to the inline-size (width) of the containing block if 'writing-mode' of such containing block is 'horizontal-tb'. In this test, div.outer's computed 'writing-mode' value is 'horizontal-tb' and it is the div.inner's containing block." name="assert">
<style type="text/css">
div.outer
{
background-color: blue;
border: blue solid 3px;
width: 200px;
}
hr
{
background-color: transparent;
border: transparent none 0px;
height: 3px;
margin: 3px auto;
}
div.inner
{
background-color: transparent;
height: 50px;
-ah-writing-mode: vertical-lr;
-webkit-writing-mode: vertical-lr;
writing-mode: tb-lr; /* IE11 */
writing-mode: vertical-lr;
}
div.foo
{
padding-bottom: 2.5%; /* 5px */
padding-left: 50%; /* 100px */
padding-right: 25%; /* 50px */
padding-top: 10%; /* 20px */
}
div.bar
{
padding-bottom: 10%;
padding-left: 25%;
padding-right: 50%;
padding-top: 2.5%;
}
</style>
</head>
<body>
<div class="outer">
<div class="inner foo"><img src="swatch-yellow.png" width="50" height="50" alt="Image download support must be enabled"></div>
<hr>
<div class="inner bar"><img src="swatch-yellow.png" width="50" height="50" alt="Image download support must be enabled"></div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,62 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Writing Modes Test: padding percentage and 'vertical-rl'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<meta content="This test checks that percentages on the padding are calculated with respect to the inline size (height!) of the containing block if 'writing-mode' of such containing block is 'vertical-rl'. In this test, div.outer's computed 'writing-mode' value is 'vertical-rl' and it is the div.inner's containing block." name="assert">
<style type="text/css">
div.outer
{
background-color: blue;
border: blue solid 3px;
height: 200px;
-ah-writing-mode: vertical-rl;
-webkit-writing-mode: vertical-rl;
writing-mode: tb-rl; /* IE11 */
writing-mode: vertical-rl;
}
hr
{
background-color: transparent;
border: transparent none 0px;
width: 3px;
margin: auto 3px;
}
div.inner
{
background-color: transparent;
width: 50px;
-ah-writing-mode: horizontal-tb;
-webkit-writing-mode: horizontal-tb;
writing-mode: lr-tb; /* IE11 */
writing-mode: horizontal-tb;
}
div.foo
{
padding-left: 2.5%; /* 5px */
padding-top: 50%; /* 100px */
padding-bottom: 25%; /* 50px */
padding-right: 10%; /* 20px */
}
div.bar
{
padding-left: 10%;
padding-top: 25%;
padding-bottom: 50%;
padding-right: 2.5%;
}
</style>
</head>
<body>
<div class="outer">
<div class="inner foo"><img src="swatch-yellow.png" width="50" height="50" alt="Image download support must be enabled"></div>
<hr>
<div class="inner bar"><img src="swatch-yellow.png" width="50" height="50" alt="Image download support must be enabled"></div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,62 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Writing Modes Test: padding percentage and 'vertical-lr'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<meta content="This test checks that percentages on the padding are calculated with respect to the inline size (height!) of the containing block if 'writing-mode' of such containing block is 'vertical-lr'. In this test, div.outer's computed 'writing-mode' value is 'vertical-lr' and it is the div.inner's containing block." name="assert">
<style type="text/css">
div.outer
{
background-color: blue;
border: blue solid 3px;
height: 200px;
-ah-writing-mode: vertical-lr;
-webkit-writing-mode: vertical-lr;
writing-mode: tb-lr; /* IE11 */
writing-mode: vertical-lr;
}
hr
{
background-color: transparent;
border: transparent none 0px;
width: 3px;
margin: auto 3px;
}
div.inner
{
background-color: transparent;
width: 50px;
-ah-writing-mode: horizontal-tb;
-webkit-writing-mode: horizontal-tb;
writing-mode: lr-tb; /* IE11 */
writing-mode: horizontal-tb;
}
div.foo
{
padding-left: 2.5%; /* 5px */
padding-top: 50%; /* 100px */
padding-bottom: 25%; /* 50px */
padding-right: 10%; /* 20px */
}
div.bar
{
padding-left: 10%;
padding-top: 25%;
padding-bottom: 50%;
padding-right: 2.5%;
}
</style>
</head>
<body>
<div class="outer">
<div class="inner bar"><img src="swatch-yellow.png" width="50" height="50" alt="Image download support must be enabled"></div>
<hr>
<div class="inner foo"><img src="swatch-yellow.png" width="50" height="50" alt="Image download support must be enabled"></div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Writing Modes Test: margin percentage and 'vertical-rl'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
</head>
<body>
<div id="reference"><img src="blue-yellow-165w-206h.png" width="165" height="206" alt="Image download support must be enabled"></div>
</body>
</html>

Двоичные данные
layout/reftests/writing-mode/blue-yellow-165w-206h.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 460 B

Двоичные данные
layout/reftests/writing-mode/blue-yellow-206w-165h.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 463 B

Просмотреть файл

@ -140,6 +140,14 @@ fails == 1147834-relative-overconstrained-vertical-rl-rtl.html 1147834-top-left-
== 1157758-1-vertical-arabic.html 1157758-1-vertical-arabic-ref.html
== 1158549-1-vertical-block-size-constraints.html 1158549-1-vertical-block-size-constraints-ref.html
== 1163238-orthogonal-auto-margins.html 1163238-orthogonal-auto-margins-ref.html
== 1172774-percent-margin-1.html 1172774-percent-horizontal-ref.html
== 1172774-percent-margin-2.html 1172774-percent-horizontal-ref.html
== 1172774-percent-margin-3.html 1172774-percent-vertical-ref.html
== 1172774-percent-margin-4.html 1172774-percent-vertical-ref.html
== 1172774-percent-padding-1.html 1172774-percent-horizontal-ref.html
== 1172774-percent-padding-2.html 1172774-percent-horizontal-ref.html
== 1172774-percent-padding-3.html 1172774-percent-vertical-ref.html
== 1172774-percent-padding-4.html 1172774-percent-vertical-ref.html
# Suite of tests from Gérard Talbot in bug 1079151
include abspos/reftest.list

Двоичные данные
layout/reftests/writing-mode/swatch-yellow.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 84 B