mirror of
https://github.com/servo/servo.git
synced 2025-08-21 13:25:34 +01:00
Update web-platform-tests to revision 5dbe45af3ad3a933c03187c72f1c12cbe2877703
This commit is contained in:
parent
6c0eb115f4
commit
9aa1b1e408
129 changed files with 2604 additions and 290 deletions
|
@ -72,6 +72,10 @@ testText("<div style='display:none'>abc", "abc", "display:none container");
|
|||
testText("<div style='display:none'>abc def", "abc def", "No whitespace compression in display:none container");
|
||||
testText("<div style='display:none'> abc def ", " abc def ", "No removal of leading/trailing whitespace in display:none container");
|
||||
testText("<div>123<span style='display:none'>abc", "123", "display:none child not rendered");
|
||||
testText("<div style='display:none'><span id='target'>abc", "abc", "display:none container with non-display-none target child");
|
||||
testTextInSVG("<div id='target'>abc", "", "non-display-none child of svg");
|
||||
testTextInSVG("<div style='display:none' id='target'>abc", "abc", "display:none child of svg");
|
||||
testTextInSVG("<div style='display:none'><div id='target'>abc", "abc", "child of display:none child of svg");
|
||||
|
||||
/**** display:contents ****/
|
||||
|
||||
|
|
|
@ -13,13 +13,25 @@
|
|||
.first-letter-float::first-letter { float:left; }
|
||||
</style>
|
||||
<div id="container"></div>
|
||||
<svg id="svgContainer"></svg>
|
||||
<script>
|
||||
function testText(html, expectedPlain, msg) {
|
||||
textTextInContainer(container, html, expectedPlain, msg);
|
||||
}
|
||||
function testTextInSVG(html, expectedPlain, msg) {
|
||||
textTextInContainer(svgContainer, html, expectedPlain, msg);
|
||||
}
|
||||
function textTextInContainer(cont, html, expectedPlain, msg) {
|
||||
test(function() {
|
||||
container.innerHTML = html;
|
||||
if (cont != container) {
|
||||
while (container.firstChild) {
|
||||
cont.appendChild(container.firstChild);
|
||||
}
|
||||
}
|
||||
var e = document.getElementById('target');
|
||||
if (!e) {
|
||||
e = container.firstChild;
|
||||
e = cont.firstChild;
|
||||
}
|
||||
var pokes = document.getElementsByClassName('poke');
|
||||
for (var i = 0; i < pokes.length; ++i) {
|
||||
|
@ -40,6 +52,7 @@ function testText(html, expectedPlain, msg) {
|
|||
e = e.nextSibling;
|
||||
}
|
||||
assert_equals(e.innerText, expectedPlain);
|
||||
cont.textContent = '';
|
||||
}, msg);
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue