Update web-platform-tests to revision d7afcb8708eac08a614d161d5622a48172daf7e3

This commit is contained in:
WPT Sync Bot 2019-05-15 10:40:54 -04:00 committed by Josh Matthews
parent 6f8bb4dd40
commit edff458e23
791 changed files with 17647 additions and 10322 deletions

View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<html class='reftest-wait'>
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<link rel="help" href="https://www.w3.org/TR/css-position-3/" />
<meta name="assert" content="This test checks that a dynamic change in constraints calculates the static position correctly."/>
<script src="/common/reftest-wait.js"></script>
<style>
ul {
margin: 0;
padding: 0;
width: 100px;
height: 100px;
background: red;
}
#target {
position: absolute;
width: 100px;
height: 100px;
background: green;
}
</style>
<p>Test passes if there is a filled green square.</p>
<ul>
<li style="position: relative;">
<div style="height: 50px;"></div>
<div id=target></div>
</li>
</ul>
<script>
document.body.offsetTop;
const target = document.getElementById('target');
target.style.top = '0px';
document.body.offsetTop;
takeScreenshot();
</script>

View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<html class='reftest-wait'>
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<link rel="help" href="https://www.w3.org/TR/css-position-3/" />
<meta name="assert" content="This test checks that scrollbars dissappear when an absolute positioned element no longer triggers overflow."/>
<script src="/common/reftest-wait.js"></script>
<style>
#container {
position: relative;
background: red;
box-sizing: border-box;
width: 100px;
max-height: 100px;
overflow: auto;
}
#target {
position: absolute;
width: 100px;
height: 200px;
}
</style>
<p>Test passes if there is a filled green square.</p>
<div id="container">
<div id="target"></div>
<div style="height: 100px; background: green;"></div>
</div>
<script>
document.body.offsetTop;
const target = document.getElementById('target');
target.style.width = '50px';
target.style.height = '50px';
document.body.offsetTop;
takeScreenshot();
</script>

View file

@ -0,0 +1,46 @@
<!DOCTYPE html>
<html class='reftest-wait'>
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<link rel="help" href="https://www.w3.org/TR/css-position-3/" />
<meta name="assert" content="This test checks that scrollbars dissappear when an absolute positioned element no longer triggers overflow."/>
<script src="/common/reftest-wait.js"></script>
<style>
#scrollable {
width: 100px;
overflow: auto;
}
#container {
width: 100px;
height: 50px;
position: relative;
background: green;
}
#target {
position: absolute;
width: 50px;
height: 20px;
left: 200px;
}
#green {
width: 100px;
height: 50px;
background: green;
}
</style>
<p>Test passes if there is a filled green square.</p>
<div id="scrollable">
<div id="container">
<div id="target"></div>
</div>
</div>
<div id="green"></div>
<script>
document.body.offsetTop;
const target = document.getElementById('target');
target.style.left = 'initial';
document.body.offsetTop;
takeScreenshot();
</script>

View file

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html class='reftest-wait'>
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<link rel="help" href="https://www.w3.org/TR/css-position-3/" />
<meta name="assert" content="This test checks that a dynamic change in constraints calculates the static position correctly."/>
<script src="/common/reftest-wait.js"></script>
<style>
#container {
position: relative;
background: red;
box-sizing: border-box;
border: solid green 10px;
width: 100px;
height: 100px;
}
#float {
float: left;
background: green;
width: 40px;
height: 80px;
}
#target {
position: absolute;
background: green;
display: inline;
width: 40px;
height: 80px;
top: -10px;
left: -10px;
}
</style>
<p>Test passes if there is a filled green square.</p>
<div id="container">
<div id="float"></div>
<div id="target"></div>
</div>
<script>
document.body.offsetTop;
const target = document.getElementById('target');
target.style.top = 'initial';
target.style.left = 'initial';
document.body.offsetTop;
takeScreenshot();
</script>

View file

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html class='reftest-wait'>
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<link rel="help" href="https://www.w3.org/TR/css-position-3/" />
<meta name="assert" content="This test checks that a dynamic change in constraints calculates the static position correctly."/>
<script src="/common/reftest-wait.js"></script>
<style>
#container {
position: relative;
background: red;
box-sizing: border-box;
border: solid green 10px;
width: 100px;
height: 100px;
}
#float {
float: left;
background: green;
width: 40px;
height: 80px;
}
#block {
background: green;
height: 40px;
}
#target {
position: absolute;
background: green;
display: inline;
width: 40px;
height: 40px;
top: -10px;
left: -10px;
}
</style>
<p>Test passes if there is a filled green square.</p>
<div id="container">
<div id="float"></div>
<div id="block"></div>
<div id="target"></div>
</div>
<script>
document.body.offsetTop;
const target = document.getElementById('target');
target.style.top = 'initial';
target.style.left = 'initial';
document.body.offsetTop;
takeScreenshot();
</script>

View file

@ -0,0 +1,56 @@
<!DOCTYPE html>
<html class='reftest-wait'>
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<link rel="help" href="https://www.w3.org/TR/css-position-3/" />
<meta name="assert" content="This test checks that a dynamic change in constraints calculates the static position correctly."/>
<script src="/common/reftest-wait.js"></script>
<style>
#container {
position: relative;
background: red;
box-sizing: border-box;
border: solid green 10px;
width: 100px;
height: 100px;
}
#float {
float: left;
background: green;
width: 40px;
height: 80px;
}
#block {
background: green;
height: 40px;
}
#target {
position: absolute;
background: green;
display: inline;
width: 40px;
height: 40px;
top: -10px;
left: -10px;
}
</style>
<p>Test passes if there is a filled green square.</p>
<div id="container">
<div id="block">
<div id="float"></div>
</div>
<div id="target"></div>
</div>
<script>
document.body.offsetTop;
const target = document.getElementById('target');
target.style.top = 'initial';
target.style.left = 'initial';
document.body.offsetTop;
takeScreenshot();
</script>

View file

@ -0,0 +1,57 @@
<!DOCTYPE html>
<html class='reftest-wait'>
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<link rel="help" href="https://www.w3.org/TR/css-position-3/" />
<meta name="assert" content="This test checks that a dynamic change in constraints calculates the static position correctly."/>
<script src="/common/reftest-wait.js"></script>
<style>
#container {
position: relative;
background: red;
box-sizing: border-box;
border: solid green 10px;
width: 100px;
height: 100px;
}
#block {
background: green;
height: 40px;
margin-bottom: 20px;
}
#target {
position: absolute;
background: green;
width: 80px;
height: 20px;
top: -10px;
left: -10px;
}
#cover {
position: absolute;
background: green;
width: 80px;
height: 20px;
top: 40px;
left: 0px;
}
</style>
<p>Test passes if there is a filled green square.</p>
<div id="container">
<div id="block"></div>
<div id="target"></div>
<div id="cover"></div>
</div>
<script>
document.body.offsetTop;
const target = document.getElementById('target');
target.style.top = 'initial';
target.style.left = 'initial';
document.body.offsetTop;
takeScreenshot();
</script>

View file

@ -0,0 +1,59 @@
<!DOCTYPE html>
<html class='reftest-wait'>
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<link rel="help" href="https://www.w3.org/TR/css-position-3/" />
<meta name="assert" content="This test checks that a dynamic change in constraints calculates the static position correctly."/>
<script src="/common/reftest-wait.js"></script>
<style>
#container {
position: relative;
background: red;
box-sizing: border-box;
border: solid green 10px;
width: 100px;
height: 100px;
}
#block {
background: green;
height: 40px;
margin-bottom: 20px;
}
#target {
position: absolute;
background: green;
width: 80px;
height: 20px;
top: -10px;
left: -10px;
}
#cover {
position: absolute;
background: green;
width: 80px;
height: 20px;
top: 40px;
left: 0px;
}
</style>
<p>Test passes if there is a filled green square.</p>
<div id="container">
<div>
<div id="block"></div>
</div>
<div id="target"></div>
<div id="cover"></div>
</div>
<script>
document.body.offsetTop;
const target = document.getElementById('target');
target.style.top = 'initial';
target.style.left = 'initial';
document.body.offsetTop;
takeScreenshot();
</script>

View file

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html class='reftest-wait'>
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<link rel="help" href="https://www.w3.org/TR/css-position-3/" />
<meta name="assert" content="This test checks that a dynamic change in constraints calculates the static position correctly."/>
<script src="/common/reftest-wait.js"></script>
<style>
#container {
position: relative;
background: red;
box-sizing: border-box;
border: solid green 10px;
width: 100px;
height: 100px;
}
#target {
position: absolute;
background: green;
width: 80px;
height: 80px;
top: -10px;
left: -10px;
}
</style>
<p>Test passes if there is a filled green square.</p>
<div id="container">
<div id="target"></div>
</div>
<script>
document.body.offsetTop;
const target = document.getElementById('target');
target.style.top = 'initial';
target.style.left = 'initial';
document.body.offsetTop;
takeScreenshot();
</script>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos">
<p>Test passes if there is a filled green square, and no scrollbars</p>
<div id="container" style="overflow:auto; width:100px; height:100px; background:red;">
<div style="position:sticky; top:0; height:100px; background:green;"></div>
<div id="bigItem" style="height:600px;"></div>
</div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
container.scrollTop = 600;
requestAnimationFrame(()=>{
requestAnimationFrame(()=>{
bigItem.style.display = "none";
test(()=> {
assert_equals(container.scrollHeight, 100);
}, "Sticky position and its overflow contribution");
});
});
</script>