Update web-platform-tests to revision 3bfdeb8976fc51748935c8d1f1014dfba8e08dfb

This commit is contained in:
WPT Sync Bot 2019-03-28 22:09:18 -04:00
parent fcd6beb608
commit cb63cfd5c7
185 changed files with 3083 additions and 1074 deletions

View file

@ -1,15 +0,0 @@
/dist
/dist_last
/build-temp
/tools/cache
/tools/_virtualenv
*.xcodeproj
*.DS_Store
*.pyc
*.svn
.directory*
*~
*.orig
*Thumbs.db
/_certs
/config.json

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference</title>
<style>
p {
color: fuchsia;
}
div {
color: orange;
}
h4 {
color: blue;
}
</style>
<body>
<p>This text should be fuchsia.</p>
<div>This text should be orange.</div>
<h4>This text should be blue.</h4>
</body>

View file

@ -5,6 +5,7 @@
<title>CSS Test: Selectors: Class selectors</title>
<link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" />
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#class-html" />
<link rel="match" href="class-000-ref.html"/>
<meta name="flags" content="" />
<meta name="assert" content="Browsers should apply each rule to the elements which have the specified class"/>
<style type="text/css">

View file

@ -5,6 +5,7 @@
<title>CSS Test: Selectors: Class selectors with the universal selector</title>
<link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" />
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#class-html" />
<link rel="match" href="class-000-ref.html"/>
<meta name="flags" content="" />
<meta name="assert" content="Browsers should apply each rule to the elements which have the specified class"/>
<style type="text/css">

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference</title>
<style>
p {
color: fuchsia;
}
div {
color: fuchsia;
border: thin solid;
}
h4 {
color: blue;
}
</style>
<body>
<p>This text should be fuchsia.</p>
<div>This text should be fuchsia with a thin fuchsia border.</div>
<h4>This text should be blue without any border.</h4>
</body>

View file

@ -5,6 +5,7 @@
<title>CSS Test: Selectors: Class selectors: Multiple classes</title>
<link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" />
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#class-html" />
<link rel="match" href="class-002-ref.html"/>
<meta name="flags" content="" />
<meta name="assert" content="Browsers should apply each rule to the elements which have the specified class or classes"/>
<style type="text/css">

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference</title>
<style>
p {
color: fuchsia;
}
div {
color: orange;
}
h4 {
color: blue;
}
.silver {
color: silver;
}
</style>
<body>
<p><em>This text should be fuchsia.</em> <span class="silver">Filler text.</span></p>
<div>This text should be orange.</div>
<p class="silver">Filler text.</p>
<h4>This text should be blue. <span class="silver">Filler text.</span></h4>
</body>

View file

@ -5,6 +5,7 @@
<title>CSS Test: Selectors: The :first-child pseudo-class</title>
<link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" />
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-child" />
<link rel="match" href="first-child-000-ref.html"/>
<meta name="flags" content="" />
<meta name="assert" content="Browsers should apply each rule to the element which is the first child of its parent"/>
<style type="text/css">

View file

@ -5,6 +5,7 @@
<title>CSS Test: Selectors: The :first-child pseudo-class with the universal selector</title>
<link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" />
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-child" />
<link rel="match" href="first-child-000-ref.html"/>
<meta name="flags" content="" />
<meta name="assert" content="Browsers should apply each rule to the element which is the first child of its parent"/>
<style type="text/css">

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference</title>
<style>
p {
color: fuchsia;
}
span {
color: silver;
}
</style>
<body>
<p>The first line of this paragraph should be fuchsia (same as in the next block).<br /><span>Filler text.</span></p>
<p>Lorem ipsum dolor.<br /><span>Filler text.</span></p>
</body>

View file

@ -5,6 +5,7 @@
<title>CSS Test: Selectors: The :first-line pseudo-element</title>
<link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" />
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-line-pseudo" />
<link rel="match" href="first-line-000-ref.html"/>
<meta name="flags" content="" />
<meta name="assert" content="Browsers should apply the rule only to the first line of a block-level element"/>
<style type="text/css">

View file

@ -5,6 +5,7 @@
<title>CSS Test: Selectors: ID selectors</title>
<link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" />
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#id-selectors" />
<link rel="match" href="class-000-ref.html"/>
<meta name="flags" content="" />
<meta name="assert" content="Browsers should apply each rule to the elements which have the specified ID"/>
<style type="text/css">

View file

@ -5,6 +5,7 @@
<title>CSS Test: Selectors: ID selectors with universal selector</title>
<link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" />
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#id-selectors" />
<link rel="match" href="class-000-ref.html"/>
<meta name="flags" content="" />
<meta name="assert" content="Browsers should apply each rule to the elements which have the specified ID"/>
<style type="text/css">

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference</title>
<style>
.green {
background-color: green;
color: white;
}
</style>
<body>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<p class="green">This line should be green <em>and this should also be green</em></p>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green<p>This line should NOT be green</p></div>
<p>This line should NOT be green <em>and this should not be green either</em></p>
</body>

View file

@ -5,6 +5,7 @@
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org">
<link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com">
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#attribute-selectors">
<link rel="match" href="attribute-value-selector-007-ref.html" />
<meta name="flags" content="HTMLonly">
<meta name="assert" content="lang attribute selector with att=val in HTML should not be case sensitive, and should only match when att is exactly val">
<style type="text/css">

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference</title>
<style>
.green {
background-color: green;
color: white;
}
</style>
<body>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<p class="green">This line should be green <em>and this should also be green</em></p>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green<p>This line should NOT be green</p></div>
<p>This line should NOT be green <em>and this should not be green either</em></p>
</body>

View file

@ -5,6 +5,7 @@
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org"/>
<link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#attribute-selectors"/>
<link rel="match" href="attribute-value-selector-008-ref.html" />
<meta name="flags" content="nonHTML"/>
<meta name="assert" content="attribute selector with att=val in XHTML should be case sensitive, and should only match when att is exactly val"/>
<style type="text/css"><![CDATA[

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference</title>
<style>
.green {
background-color: green;
color: white;
}
</style>
<body>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<p class="green">This line should be green <em>and this should be green too</em></p>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green<p>This line should NOT be green</p></div>
<p>This line should NOT be green <em>and this should not be green either</em></p>
</body>

View file

@ -5,6 +5,7 @@
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org"/>
<link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#attribute-selectors"/>
<link rel="match" href="attribute-value-selector-009-ref.html" />
<meta name="flags" content="nonHTML"/>
<meta name="assert" content="lang attribute selector with 'att |= val' in XHTML should be case sensitive, and match hyphen-separated list"/>
<style type="text/css"><![CDATA[

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference</title>
<style>
.green {
background-color: green;
color: white;
}
</style>
<body>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<p class="green">This line should be green <em>and this should be green too</em></p>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green<p>This line should NOT be green</p></div>
<p>This line should NOT be green <em>and this should not be green either</em></p>
</body>

View file

@ -5,6 +5,7 @@
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org">
<link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com">
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#attribute-selectors">
<link rel="match" href="attribute-value-selector-010-ref.html" />
<meta name="flags" content="HTMLonly">
<meta name="assert" content="lang attribute selector with 'att |= val' in HTML should not be case sensitive, and match hyphen-separated list">
<style type="text/css">

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference</title>
<style>
.green {
background-color: green;
color: white;
}
</style>
<body>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<p class="green">This line should be green <em>and this should be green too</em></p>
<div><p class="green">This line should be green</p>This line should NOT be green</div>
<p>This line should NOT be green <em class="green">but this should be green</em></p>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
</body>

View file

@ -5,6 +5,7 @@
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org">
<link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com">
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#lang">
<link rel="match" href="lang-pseudoclass-001-ref.html" />
<meta name="flags" content="HTMLonly" >
<meta name="assert" content=":lang pseudoclass in HTML should not be case-sensitive, and match a substring">
<style type="text/css">

View file

@ -5,6 +5,7 @@
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org"/>
<link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#lang"/>
<link rel="match" href="lang-pseudoclass-001-ref.html" />
<meta name="flags" content="nonHTML" />
<meta name="assert" content=":lang pseudoclass in XHTML should be case sensitive, and match a substring"/>
<style type="text/css"><![CDATA[
@ -24,8 +25,6 @@
<div xml:lang="en-GB">This line should be green</div>
<div xml:lang="en-GB-scouse">This line should be green</div>
<div xml:lang="es">This line should be green</div>
<p xml:lang="es">This line should be green <em>and this should be green too</em></p>
<div xml:lang="fr"><p>This line should be green</p>This line should NOT be green</div>

View file

@ -0,0 +1,94 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Box Alignment Test: Synthesized baseline flexbox</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#flex-baselines">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#valdef-align-items-baseline">
<meta name="flags" content="ahem">
<meta name="assert" content="This test check the synthesized of a flexbox container if it has no items (it should use the flex container margin box) or if the items have no baseline (in that case it should use the flex item's border box).">
<style>
.wrapper {
border: solid thick;
position: relative;
width: 200px;
height: 150px;
margin: 10px;
}
canvas {
width: 100px;
height: 100px;
background: blue;
}
.magenta-dotted-border {
border: 5px dotted magenta;
}
.border-padding-margin {
border: 10px solid cyan;
padding: 15px;
margin: 20px 0px;
background: yellow;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body onload="checkLayout('.wrapper')">
<div id="log"></div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-flex;" class="border-padding-margin"
data-offset-y="30"></div>
</div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-block;" class="magenta-dotted-border"
data-offset-y="5">
<div style="display: inline-flex;" class="border-padding-margin"
data-offset-y="30"></div>
</div>
</div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-block;" class="magenta-dotted-border"
data-offset-y="0">
<div style="display: flex;" class="border-padding-margin"
data-offset-y="25"></div>
</div>
</div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-flex;" class="magenta-dotted-border"
data-offset-y="25">
<div class="border-padding-margin" data-offset-y="50"></div>
</div>
</div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-block;" class="magenta-dotted-border"
data-offset-y="25">
<div style="display: flex;"
data-offset-y="30">
<div class="border-padding-margin" data-offset-y="50"></div>
</div>
</div>
</div>
<div class="wrapper" style="display: flex; align-items: baseline;">
<canvas></canvas>
<div style="display: inline-flex;" class="magenta-dotted-border"
data-offset-y="25">
<div class="border-padding-margin" data-offset-y="50"></div>
</div>
</div>
<div class="wrapper" style="display: flex; align-items: baseline;">
<canvas></canvas>
<div style="display: flex;" class="magenta-dotted-border"
data-offset-y="25">
<div class="border-padding-margin" data-offset-y="50"></div>
</div>
</div>
</body>

View file

@ -0,0 +1,94 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Box Alignment Test: Synthesized baseline grid container</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules">
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-baselines">
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#valdef-align-items-baseline">
<meta name="flags" content="ahem">
<meta name="assert" content="This test check the synthesized of a grid container if it has no items (it should use the grid container margin box) or if the items have no baseline (in that case it should use the grid item's border box).">
<style>
.wrapper {
border: solid thick;
position: relative;
width: 300px;
height: 150px;
margin: 10px;
}
canvas {
width: 100px;
height: 100px;
background: blue;
}
.magenta-dotted-border {
border: 5px dotted magenta;
}
.border-padding-margin {
border: 10px solid cyan;
padding: 15px;
margin: 20px 0px;
background: yellow;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body onload="checkLayout('.wrapper')">
<div id="log"></div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-grid;" class="border-padding-margin"
data-offset-y="30"></div>
</div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-block;" class="magenta-dotted-border"
data-offset-y="5">
<div style="display: inline-grid;" class="border-padding-margin"
data-offset-y="30"></div>
</div>
</div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-block;" class="magenta-dotted-border"
data-offset-y="0">
<div style="display: grid;" class="border-padding-margin"
data-offset-y="25"></div>
</div>
</div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-grid;" class="magenta-dotted-border"
data-offset-y="25">
<div class="border-padding-margin" data-offset-y="50"></div>
</div>
</div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-block;" class="magenta-dotted-border"
data-offset-y="25">
<div style="display: grid;"
data-offset-y="30">
<div class="border-padding-margin" data-offset-y="50"></div>
</div>
</div>
</div>
<div class="wrapper" style="display: flex; align-items: baseline;">
<canvas></canvas>
<div style="display: inline-grid;" class="magenta-dotted-border"
data-offset-y="25">
<div class="border-padding-margin" data-offset-y="50"></div>
</div>
</div>
<div class="wrapper" style="display: flex; align-items: baseline;">
<canvas></canvas>
<div style="display: grid;" class="magenta-dotted-border"
data-offset-y="25">
<div class="border-padding-margin" data-offset-y="50"></div>
</div>
</div>
</body>

View file

@ -0,0 +1,61 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Box Alignment Test: Synthesized baseline inline blocks</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules">
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#alignment-baseline-property">
<meta name="flags" content="ahem">
<meta name="assert" content="Inline blocks synthesized baseline use the margin box.">
<style>
.wrapper {
border: solid thick;
position: relative;
width: 200px;
height: 150px;
margin: 10px;
}
canvas {
width: 100px;
height: 100px;
background: blue;
}
.magenta-dotted-border {
border: 5px dotted magenta;
}
.border-padding-margin {
border: 10px solid cyan;
padding: 15px;
margin: 20px 0px;
background: yellow;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body onload="checkLayout('.wrapper')">
<div id="log"></div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-block;" class="border-padding-margin"
data-offset-y="30"></div>
</div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-block;" class="magenta-dotted-border"
data-offset-y="5">
<div style="display: inline-block;" class="border-padding-margin"
data-offset-y="30"></div>
</div>
</div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-block;" class="magenta-dotted-border"
data-offset-y="0">
<div class="border-padding-margin" data-offset-y="25"></div>
</div>
</div>
</body>

View file

@ -1,23 +0,0 @@
<!DOCTYPE html>
<title>flexbox | paged overflow</title>
<link rel="author" href="http://opera.com" title="Opera Software">
<link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#pagination">
<meta name="flags" content="interact paged">
<style>
* {widows: 1; orphans: 1; margin: 0;}
html {
overflow: -o-paged-x;
}
h4 {
position: fixed;
}
div {
display: flex;
break-before: page;
background: red;
}
</style>
<h4>There should be NO RED onload.</h4>
<div>FAIL</div>

View file

@ -1,47 +0,0 @@
<!DOCTYPE html>
<title>flexbox | @page and paged overflow</title>
<link rel="author" href="http://opera.com" title="Opera Software">
<link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#pagination">
<meta name="flags" content="interact paged">
<style>
* {widows: 1; orphans: 1; margin: 0;}
@page {
width: 600px;
height: 3em;
}
html {
overflow: -o-paged-x;
}
h4 {
position: fixed;
top: 10em;
}
div {
width: 12em;
display: flex;
flex-wrap: wrap;
}
p {
margin: 0;
width: 3em;
height: 4em;
flex: auto;
}
p:nth-child(2) {
break-before: page;
}
p:nth-child(2)~p {
background: red;
}
</style>
<h4>There should be NO RED onload.</h4>
<div>
<p>x</p>
<p>x</p>
<p>fail</p>
<p>fail</p>
</div>

View file

@ -1 +0,0 @@
node_modules

View file

@ -0,0 +1,30 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://www.w3.org/TR/CSS22/box.html#propdef-padding-left">
<link rel="help" href="https://www.w3.org/TR/css-sizing-3/#valdef-width-fit-content-length-percentage">
<meta name="assert" content="The shrink-to-fit container (#stf) should be just wide enough to fit both floats beside each other. The percentage padding shouldn't be affected by intrinsic sizing; it's simply resolved from its containing block (#container), which doesn't participate in the intrinsic size calculation at all.">
<div id="container" style="width:400px; height:200px;">
<div id="stf" style="width:fit-content; padding-left:20%;">
<div style="float:left; width:50px; height:100px; background:cyan;"></div>
<div style="float:left; width:50px; height:100px; background:hotpink;"></div>
</div>
</div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
var container = document.getElementById("container");
var stf = document.getElementById("stf");
test(()=> {
assert_equals(stf.offsetWidth, 180);
}, "Initial layout");
test(()=> {
container.style.width = "300px";
assert_equals(stf.offsetWidth, 160);
}, "Shrink width");
test(()=> {
container.style.width = "500px";
assert_equals(stf.offsetWidth, 200);
}, "Grow width");
</script>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<style>
td, th {
border: 1px solid black;
}
</style>
<table>
<tr>
<th colspan="4">This cell must span all columns for repro in chrome</th>
</tr>
<tr>
<td rowspan="3" style="height:200px">A</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
</table>

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org">
<link rel="help" href="https://www.w3.org/TR/CSS2/visuren.html#display-prop">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=764031">
<link rel="match" href="toggle-row-display-property-001-ref.html">
<meta name="flags" content="" />
<meta name="assert" content="After setting display:table-row on tr elements with display:none, the table should look same as if display:none were never used." />
<style>
td, th {
border: 1px solid black;
}
tr {
display: none;
}
</style>
<table id=theTable>
<tr>
<th colspan="4">This cell must span all columns for repro in chrome</th>
</tr>
<tr>
<td rowspan="3" style="height:200px">A</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
</table>
<script>
theTable.offsetTop;
let rows = document.querySelectorAll('tr');
for (var i = 0; i < rows.length; i++) {
rows[i].style.display = 'table-row';
}
</script>

View file

@ -9,9 +9,10 @@
<meta name="assert" content="A Single leading white-space constitutes a soft breaking opportunity, honoring the 'white-space: break-spaces' property, that must prevent the word to be broken.">
<style>
div {
position: relative;
font-size: 20px;
font-family: Ahem;
position: relative;
font-size: 20px;
font-family: Ahem;
line-height: 1em;
}
.red {
position: absolute;
@ -23,8 +24,8 @@ div {
}
.test {
color: green;
line-height: 1em;
width: 5ch;
white-space: break-spaces;
overflow-wrap: break-word;
}

View file

@ -11,8 +11,8 @@
<meta name="assert" content="The word is not broken if there are previous breaking opportunities, honoring the 'white-space: break-spaces' value.">
<style>
div {
position: relative;
font: 20px/1 Ahem;
position: relative;
font: 20px/1 Ahem;
}
.fail {
position: absolute;

View file

@ -9,8 +9,8 @@
<meta name="assert" content="If 'white-space' is set to 'break-spaces', collapsing preserved white-spaces' advance width is not allowed, so that they can be wrapped honoring the 'white-space' propery.">
<style>
div {
position: relative;
font: 10px/1 Ahem;
position: relative;
font: 10px/1 Ahem;
}
.fail {
position: absolute;

View file

@ -11,8 +11,8 @@
<meta name="assert" content="White spaces are preserved, honoring the 'white-space: break-spaces', but the words are broken, honring the 'word-beak: break-all' even though there are previous breaking opportunities in the white-spaces.">
<style>
div {
position: relative;
font: 25px/1 Ahem;
position: relative;
font: 25px/1 Ahem;
}
.fail {
position: absolute;

View file

@ -11,8 +11,8 @@
<meta name="assert" content="A single leading white-space should be used, honoring white-space: break-spaces, to avoid overflow; however, a single preserved white-space at the end of the line cannot be wrapped, hence it hangs when breaking after it to move the rest of the text to the next line.">
<style>
div {
position: relative;
font: 25px/1 Ahem;
position: relative;
font: 25px/1 Ahem;
}
.fail {
position: absolute;

View file

@ -11,8 +11,8 @@
<meta name="assert" content="White spaces are preserved, honoring the 'white-space: break-spaces', which may lead to overfow. However, we can break before the first white-space after the word honoring the 'break-all' value.">
<style>
div {
position: relative;
font: 25px/1 Ahem;
position: relative;
font: 25px/1 Ahem;
}
.fail {
position: absolute;

View file

@ -9,8 +9,8 @@
<meta name="assert" content="The text is broken at the end of the space between the two words, never before, so it hangs and cause an overflow">
<style>
div {
position: relative;
font: 20px/1 Ahem;
position: relative;
font: 20px/1 Ahem;
}
.ref {
position: absolute;

View file

@ -12,6 +12,7 @@ div {
position: relative;
font-size: 20px;
font-family: Ahem;
line-height: 1em;
}
.red {
position: absolute;
@ -24,7 +25,6 @@ div {
}
.test {
color: green;
line-height: 1em;
width: 2ch;
white-space: pre-wrap;

View file

@ -26,6 +26,7 @@ div {
.test {
color: green;
width: 5ch;
white-space: pre-wrap;
word-break: break-all;
}

View file

@ -9,9 +9,10 @@
<meta name="assert" content="The word is broken even if white-space: break-spaces provides a former breaking opportunity in leading white-space.">
<style>
div {
position: relative;
font-size: 20px;
font-family: Ahem;
position: relative;
font-size: 20px;
font-family: Ahem;
line-height: 1em;
}
.red {
position: absolute;
@ -24,7 +25,6 @@ div {
}
.test {
color: green;
line-height: 1em;
width: 5ch;
white-space: break-spaces;

View file

@ -9,9 +9,10 @@
<meta name="assert" content="A single leading white-space should account as soft breaking opportunity, honoring the 'white-space: break-spaces', on top to the ones provided by 'word-break: break-all'.">
<style>
div {
position: relative;
font-size: 20px;
font-family: Ahem;
position: relative;
font-size: 20px;
font-family: Ahem;
line-height: 1em;
}
.red {
position: absolute;
@ -24,7 +25,6 @@ div {
}
.test {
color: green;
line-height: 1em;
width: 1ch;
white-space: break-spaces;
word-break: break-all;

View file

@ -0,0 +1,44 @@
<!DOCTYPE html>
<title>Ellipsizing inline blocks that have absolute positioned objects should not crash</title>
<link rel="author" href="kojii@chromium.org">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=945690">
<meta name="assert" content="Ellipsizing inline blocks that have absolute positioned objects should not crash">
<style>
div {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 5ch;
}
.inline-block {
display: inline-block;
}
.abs {
position: absolute;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div>
12345678
<span class="inline-block">
<span class="abs">abs</span>
</span>
</div>
<div>
12345678
<span class="inline-block">
999
<span class="abs">abs</span>
</span>
</div>
<div>
12
<span class="inline-block">
3456789
<span class="abs">abs</span>
</span>
</div>
<script>
test(() => {}, 'No crash or DCHECK failure');
</script>

View file

@ -124,9 +124,8 @@ class Indexer:
def __writeTemplate(self, template, data, outfile):
o = self.tt.process(template, data)
f = open(outfile, 'w')
f.write(o.encode('utf-8'))
f.close()
with open(outfile, 'w') as f:
f.write(o.encode('utf-8'))
def writeOverview(self, destDir, errorOut=sys.stderr, addTests=[]):
"""Write format-agnostic pages such as test suite overview pages,

View file

@ -525,7 +525,8 @@ class FileSource:
def data(self):
"""Return file contents as a byte string."""
if (self._data is None):
self._data = open(self.sourcepath, 'r').read()
with open(self.sourcepath, 'r') as f:
self._data = f.read()
if (self._data.startswith(codecs.BOM_UTF8)):
self.encoding = 'utf-8-sig' # XXX look for other unicode BOMs
return self._data
@ -580,8 +581,8 @@ class FileSource:
def write(self, format):
"""Writes FileSource.data() out to `self.relpath` through Format `format`."""
data = self.data()
f = open(format.dest(self.relpath), 'w')
f.write(data)
with open(format.dest(self.relpath), 'w') as f:
f.write(data)
if (self.metaSource):
self.metaSource.write(format) # XXX need to get output path from format, but not let it choose actual format
@ -818,7 +819,8 @@ class ConfigSource(FileSource):
"""Merge contents of all config files represented by this source."""
data = ''
for src in self.sourcepath:
data += open(src).read()
with open(src) as f:
data += f.read()
data += '\n'
return data
@ -868,35 +870,36 @@ class ReftestManifest(ConfigSource):
for src in self.sourcepath:
relbase = basepath(self.relpath)
srcbase = basepath(src)
for line in open(src):
strip = self.baseRE.search(line)
if strip:
striplist.append(strip.group(1))
line = self.stripRE.sub('', line)
m = self.parseRE.search(line)
if m:
record = ((join(srcbase, m.group(2)), join(srcbase, m.group(3))), \
(join(relbase, m.group(2)), join(relbase, m.group(3))), \
m.group(1))
# for strip in striplist:
# strip relrecord
if not exists(record[0][0]):
raise ReftestFilepathError("Manifest Error in %s: "
"Reftest test file %s does not exist." \
% (src, record[0][0]))
elif not exists(record[0][1]):
raise ReftestFilepathError("Manifest Error in %s: "
"Reftest reference file %s does not exist." \
% (src, record[0][1]))
elif not isPathInsideBase(record[1][0]):
raise ReftestFilepathError("Manifest Error in %s: "
"Reftest test replath %s not within relpath root." \
% (src, record[1][0]))
elif not isPathInsideBase(record[1][1]):
raise ReftestFilepathError("Manifest Error in %s: "
"Reftest test replath %s not within relpath root." \
% (src, record[1][1]))
yield record
with open(src) as f:
for line in f:
strip = self.baseRE.search(line)
if strip:
striplist.append(strip.group(1))
line = self.stripRE.sub('', line)
m = self.parseRE.search(line)
if m:
record = ((join(srcbase, m.group(2)), join(srcbase, m.group(3))), \
(join(relbase, m.group(2)), join(relbase, m.group(3))), \
m.group(1))
# for strip in striplist:
# strip relrecord
if not exists(record[0][0]):
raise ReftestFilepathError("Manifest Error in %s: "
"Reftest test file %s does not exist." \
% (src, record[0][0]))
elif not exists(record[0][1]):
raise ReftestFilepathError("Manifest Error in %s: "
"Reftest reference file %s does not exist." \
% (src, record[0][1]))
elif not isPathInsideBase(record[1][0]):
raise ReftestFilepathError("Manifest Error in %s: "
"Reftest test replath %s not within relpath root." \
% (src, record[1][0]))
elif not isPathInsideBase(record[1][1]):
raise ReftestFilepathError("Manifest Error in %s: "
"Reftest test replath %s not within relpath root." \
% (src, record[1][1]))
yield record
import Utils # set up XML catalog
xhtmlns = '{http://www.w3.org/1999/xhtml}'
@ -1026,9 +1029,8 @@ class XMLSource(FileSource):
output = self.unicode()
# write
f = open(format.dest(self.relpath), 'w')
f.write(output.encode(self.encoding, 'xmlcharrefreplace'))
f.close()
with open(format.dest(self.relpath), 'w') as f:
f.write(output.encode(self.encoding, 'xmlcharrefreplace'))
def compact(self):
self.tree = None