mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
Update web-platform-tests to revision 755d18230983e9c7d894768b73fabff8bc290d91
This commit is contained in:
parent
d544c186b9
commit
fa788e624b
70 changed files with 1929 additions and 380 deletions
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
div {
|
||||
margin-top: 50px;
|
||||
font-size: 10px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.inline-block {
|
||||
display: inline-block;
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
background: blue;
|
||||
}
|
||||
|
||||
.top .inline-block {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.bottom .inline-block {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<div class="top">
|
||||
<span>
|
||||
Next
|
||||
<span class="inline-block"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<span>
|
||||
Next
|
||||
<span class="inline-block"></span>
|
||||
</span>
|
||||
</div>
|
||||
</body>
|
|
@ -0,0 +1,49 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="match" href="vertical-align-top-bottom-padding-ref.html">
|
||||
<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#propdef-vertical-align" />
|
||||
<link rel="author" href="kojii@chromium.org">
|
||||
<style>
|
||||
div {
|
||||
margin-top: 50px;
|
||||
font-size: 10px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.inline-block {
|
||||
display: inline-block;
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
background: blue;
|
||||
}
|
||||
|
||||
.top .padding {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.top .inline-block {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.bottom .padding {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.bottom .inline-block {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<div class="top">
|
||||
<span class="padding">
|
||||
Next
|
||||
<span class="inline-block"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<span class="padding">
|
||||
Next
|
||||
<span class="inline-block"></span>
|
||||
</span>
|
||||
</div>
|
||||
</body>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<link rel="match" href="/css/reference/ref-filled-green-100px-square.xht">
|
||||
<link rel="help" href="https://crbug.com/968016">
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
||||
<div style="display: table-cell; background: red; height: 50px;">
|
||||
<div style="width: 100px; height: 100px; background: green; position: relative;">
|
||||
<div id="target" style="position: absolute; width: 10px; height: 10px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.body.offsetTop;
|
||||
document.getElementById('target').style.top = '10px';
|
||||
document.body.offsetTop;
|
||||
takeScreenshot();
|
||||
</script>
|
|
@ -0,0 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
<div style="padding: 100px">
|
||||
<div style="width: 256px; height: 256px; background: lime"></div>
|
||||
</div>
|
|
@ -0,0 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-will-change/#will-change">
|
||||
<link rel="match" href="will-change-transform-image-ref.html">
|
||||
<img style="padding: 100px; will-change: transform" src="../../images/green-256x256.png">
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Backdrop Filters Animation: Blur Reference</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<style>
|
||||
.square {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
background: blue;
|
||||
}
|
||||
.filt {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
backdrop-filter: blur(10px);
|
||||
}
|
||||
.greenbox {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 75px;
|
||||
left: 75px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<p>You should see a blurred rectangle with a green box.</p>
|
||||
<div class="square"></div>
|
||||
<div class="filt">
|
||||
<div class="greenbox"></div>
|
||||
</div>
|
|
@ -0,0 +1,49 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Backdrop Filters Animation: Blur</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
|
||||
<link rel="match" href="css-backdrop-filters-animation-blur-ref.html">
|
||||
<style>
|
||||
@keyframes animate {
|
||||
0% {
|
||||
backdrop-filter: blur(20px);
|
||||
}
|
||||
100% {
|
||||
backdrop-filter: none;
|
||||
}
|
||||
}
|
||||
|
||||
.square {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
background: blue;
|
||||
}
|
||||
.filt {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
animation-name: animate;
|
||||
animation-play-state: paused;
|
||||
animation-delay: -2s;
|
||||
animation-duration: 4s;
|
||||
animation-timing-function: linear;
|
||||
}
|
||||
.greenbox {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 75px;
|
||||
left: 75px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<p>You should see a blurred rectangle with a green box.</p>
|
||||
<div class="square"></div>
|
||||
<div class="filt">
|
||||
<div class="greenbox"></div>
|
||||
</div>
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Backdrop Filters Animation: Brightness Reference</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<style>
|
||||
.square {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
background: blue;
|
||||
}
|
||||
.filt {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
backdrop-filter: brightness(50%);
|
||||
}
|
||||
.greenbox {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 75px;
|
||||
left: 75px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<p>You should see a dark blue rectangle with a green box. Neither black nor blue.</p>
|
||||
<div class="square"></div>
|
||||
<div class="filt">
|
||||
<div class="greenbox"></div>
|
||||
</div>
|
|
@ -0,0 +1,48 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Backdrop Filters Animation: Brightness</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
|
||||
<link rel="match" href="css-backdrop-filters-animation-brightness-ref.html">
|
||||
<style>
|
||||
@keyframes animate {
|
||||
0% {
|
||||
backdrop-filter: brightness(0%);
|
||||
}
|
||||
100% {
|
||||
backdrop-filter: none;
|
||||
}
|
||||
}
|
||||
.square {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
background: blue;
|
||||
}
|
||||
.filt {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
animation-name: animate;
|
||||
animation-play-state: paused;
|
||||
animation-delay: -2s;
|
||||
animation-duration: 4s;
|
||||
animation-timing-function: linear;
|
||||
}
|
||||
.greenbox {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 75px;
|
||||
left: 75px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<p>You should see a dark blue rectangle with a green box. Neither black nor blue.</p>
|
||||
<div class="square"></div>
|
||||
<div class="filt">
|
||||
<div class="greenbox"></div>
|
||||
</div>
|
|
@ -0,0 +1,42 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Backdrop Filters Animation: Combined filters 001 Reference</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<style>
|
||||
.square {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
background: black;
|
||||
}
|
||||
.filt {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
backdrop-filter:
|
||||
blur(10px)
|
||||
brightness(50%)
|
||||
sepia(50%)
|
||||
grayscale(50%)
|
||||
saturate(50%)
|
||||
hue-rotate(45deg)
|
||||
invert(50%)
|
||||
opacity(50%)
|
||||
}
|
||||
.greenbox {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 75px;
|
||||
left: 75px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<p>You should see a gray blurred rectangle with a green box.</p>
|
||||
<div class="square"></div>
|
||||
<div class="filt">
|
||||
<div class="greenbox"></div>
|
||||
</div>
|
|
@ -0,0 +1,57 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Backdrop Filters Animation: Combined filters 001</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
|
||||
<link rel="match" href="css-backdrop-filters-animation-combined-ref.html">
|
||||
<style>
|
||||
@keyframes animate {
|
||||
0% {
|
||||
backdrop-filter:
|
||||
blur(20px)
|
||||
brightness(0%)
|
||||
sepia(100%)
|
||||
grayscale(100%)
|
||||
saturate(0%)
|
||||
hue-rotate(90deg)
|
||||
invert(100%)
|
||||
opacity(0%)
|
||||
}
|
||||
100% {
|
||||
backdrop-filter: none;
|
||||
}
|
||||
}
|
||||
.square {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
background: black;
|
||||
}
|
||||
.filt {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
animation-name: animate;
|
||||
animation-play-state: paused;
|
||||
animation-delay: -2s;
|
||||
animation-duration: 4s;
|
||||
animation-timing-function: linear;
|
||||
}
|
||||
.greenbox {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 75px;
|
||||
left: 75px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<p>You should see a gray blurred rectangle with a green box.</p>
|
||||
|
||||
<div class="square"></div>
|
||||
<div class="filt">
|
||||
<div class="greenbox"></div>
|
||||
</div>
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Backdrop Filters Animation: Contrast Reference</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<style>
|
||||
.square {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
background: black;
|
||||
}
|
||||
.filt {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
backdrop-filter: contrast(50%);
|
||||
}
|
||||
.greenbox {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 75px;
|
||||
left: 75px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<p>You should see a gray rectangle with a green box. Neither black nor white.</p>
|
||||
<div class="square"></div>
|
||||
<div class="filt">
|
||||
<div class="greenbox"></div>
|
||||
</div>
|
|
@ -0,0 +1,48 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Backdrop Filters Animation: Contrast</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
|
||||
<link rel="match" href="css-backdrop-filters-animation-contrast-ref.html">
|
||||
<style>
|
||||
@keyframes animate {
|
||||
0% {
|
||||
backdrop-filter: contrast(0%);
|
||||
}
|
||||
100% {
|
||||
backdrop-filter: none;
|
||||
}
|
||||
}
|
||||
.square {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
background: black;
|
||||
}
|
||||
.filt {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
animation-name: animate;
|
||||
animation-play-state: paused;
|
||||
animation-delay: -2s;
|
||||
animation-duration: 4s;
|
||||
animation-timing-function: linear;
|
||||
}
|
||||
.greenbox {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 75px;
|
||||
left: 75px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<p>You should see a gray rectangle with a green box. Neither black nor white.</p>
|
||||
<div class="square"></div>
|
||||
<div class="filt">
|
||||
<div class="greenbox"></div>
|
||||
</div>
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Backdrop Filters Animation: Drop Shadow Reference</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<style>
|
||||
.square {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
background: blue;
|
||||
}
|
||||
.filt {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
backdrop-filter: drop-shadow(15px 15px 0px rgba(0, 0, 0, 0.5));
|
||||
}
|
||||
.greenbox {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 75px;
|
||||
left: 75px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<p>You should see a blue rectangle in top of a gray one, with a green box on top.</p>
|
||||
<div class="square"></div>
|
||||
<div class="filt">
|
||||
<div class="greenbox"></div>
|
||||
</div>
|
|
@ -0,0 +1,48 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Backdrop Filters Animation: Drop Shadow</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
|
||||
<link rel="match" href="css-backdrop-filters-animation-drop-shadow-ref.html">
|
||||
<style>
|
||||
@keyframes animate {
|
||||
0% {
|
||||
backdrop-filter: drop-shadow(30px 30px 0px black);
|
||||
}
|
||||
100% {
|
||||
backdrop-filter: none;
|
||||
}
|
||||
}
|
||||
.square {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
background: blue;
|
||||
}
|
||||
.filt {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
animation-name: animate;
|
||||
animation-play-state: paused;
|
||||
animation-delay: -2s;
|
||||
animation-duration: 4s;
|
||||
animation-timing-function: linear;
|
||||
}
|
||||
.greenbox {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 75px;
|
||||
left: 75px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<p>You should see a blue rectangle in top of a gray one, with a green box on top.</p>
|
||||
<div class="square"></div>
|
||||
<div class="filt">
|
||||
<div class="greenbox"></div>
|
||||
</div>
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Backdrop Filters Animation: Blur Reference</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<style>
|
||||
.square {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
background: blue;
|
||||
}
|
||||
.filt {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
backdrop-filter: grayscale(50%);
|
||||
}
|
||||
.greenbox {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 75px;
|
||||
left: 75px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<p>You should see a dark blue rectangle with a green box.</p>
|
||||
<div class="square"></div>
|
||||
<div class="filt">
|
||||
<div class="greenbox"></div>
|
||||
</div>
|
|
@ -0,0 +1,48 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Backdrop Filters Animation: Grayscale</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
|
||||
<link rel="match" href="css-backdrop-filters-animation-grayscale-ref.html">
|
||||
<style>
|
||||
@keyframes animate {
|
||||
0% {
|
||||
backdrop-filter: grayscale(100%);
|
||||
}
|
||||
100% {
|
||||
backdrop-filter: none;
|
||||
}
|
||||
}
|
||||
.square {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
background: blue;
|
||||
}
|
||||
.filt {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
animation-name: animate;
|
||||
animation-play-state: paused;
|
||||
animation-delay: -2s;
|
||||
animation-duration: 4s;
|
||||
animation-timing-function: linear;
|
||||
}
|
||||
.greenbox {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 75px;
|
||||
left: 75px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<p>You should see a dark blue rectangle with a green box.</p>
|
||||
<div class="square"></div>
|
||||
<div class="filt">
|
||||
<div class="greenbox"></div>
|
||||
</div>
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Backdrop Filters Animation: Hue-rotate Reference</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<style>
|
||||
.square {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
background: blue;
|
||||
}
|
||||
.filt {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
backdrop-filter: hue-rotate(45deg);
|
||||
}
|
||||
.greenbox {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 75px;
|
||||
left: 75px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<p>You should see a violet rectangle with a green box. Neither red nor blue.</p>
|
||||
<div class="square"></div>
|
||||
<div class="filt">
|
||||
<div class="greenbox"></div>
|
||||
</div>
|
|
@ -0,0 +1,48 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Backdrop Filters Animation: Hue-rotate</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
|
||||
<link rel="match" href="css-backdrop-filters-animation-hue-rotate-ref.html">
|
||||
<style>
|
||||
@keyframes animate {
|
||||
0% {
|
||||
backdrop-filter: hue-rotate(90deg);
|
||||
}
|
||||
100% {
|
||||
backdrop-filter: none;
|
||||
}
|
||||
}
|
||||
.square {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
background: blue;
|
||||
}
|
||||
.filt {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
animation-name: animate;
|
||||
animation-play-state: paused;
|
||||
animation-delay: -2s;
|
||||
animation-duration: 4s;
|
||||
animation-timing-function: linear;
|
||||
}
|
||||
.greenbox {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 75px;
|
||||
left: 75px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<p>You should see a violet rectangle with a green box. Neither red nor blue.</p>
|
||||
<div class="square"></div>
|
||||
<div class="filt">
|
||||
<div class="greenbox"></div>
|
||||
</div>
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Backdrop Filters Animation: Invert Reference</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<style>
|
||||
.square {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
background: black;
|
||||
}
|
||||
.filt {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
backdrop-filter: invert(50%);
|
||||
}
|
||||
.greenbox {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 75px;
|
||||
left: 75px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<p>You should see a gray rectangle with a green box. Neither black nor white.</p>
|
||||
<div class="square"></div>
|
||||
<div class="filt">
|
||||
<div class="greenbox"></div>
|
||||
</div>
|
|
@ -0,0 +1,48 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Backdrop Filters Animation: Invert</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
|
||||
<link rel="match" href="css-backdrop-filters-animation-invert-ref.html">
|
||||
<style>
|
||||
@keyframes animate {
|
||||
0% {
|
||||
backdrop-filter: invert(100%);
|
||||
}
|
||||
100% {
|
||||
backdrop-filter: none;
|
||||
}
|
||||
}
|
||||
.square {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
background: black;
|
||||
}
|
||||
.filt {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
animation-name: animate;
|
||||
animation-play-state: paused;
|
||||
animation-delay: -2s;
|
||||
animation-duration: 4s;
|
||||
animation-timing-function: linear;
|
||||
}
|
||||
.greenbox {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 75px;
|
||||
left: 75px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<p>You should see a gray rectangle with a green box. Neither black nor white.</p>
|
||||
<div class="square"></div>
|
||||
<div class="filt">
|
||||
<div class="greenbox"></div>
|
||||
</div>
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Backdrop Filters Animation: Opacity Reference</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<style>
|
||||
.square {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
background: black;
|
||||
}
|
||||
.filt {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
backdrop-filter: opacity(50%);
|
||||
}
|
||||
.greenbox {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 75px;
|
||||
left: 75px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<p>You should see a gray rectangle with a green box. Neither black nor white.</p>
|
||||
<div class="square"></div>
|
||||
<div class="filt">
|
||||
<div class="greenbox"></div>
|
||||
</div>
|
|
@ -0,0 +1,48 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Backdrop Filters Animation: Opacity</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
|
||||
<link rel="match" href="css-backdrop-filters-animation-opacity-ref.html">
|
||||
<style>
|
||||
@keyframes animate {
|
||||
0% {
|
||||
backdrop-filter: opacity(0%);
|
||||
}
|
||||
100% {
|
||||
backdrop-filter: none;
|
||||
}
|
||||
}
|
||||
.square {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
background: black;
|
||||
}
|
||||
.filt {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
animation-name: animate;
|
||||
animation-play-state: paused;
|
||||
animation-delay: -2s;
|
||||
animation-duration: 4s;
|
||||
animation-timing-function: linear;
|
||||
}
|
||||
.greenbox {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 75px;
|
||||
left: 75px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<p>You should see a gray rectangle with a green box. Neither black nor white.</p>
|
||||
<div class="square"></div>
|
||||
<div class="filt">
|
||||
<div class="greenbox"></div>
|
||||
</div>
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Backdrop Filters Animation: Saturate Reference</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<style>
|
||||
.square {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
background: #f4fbff;
|
||||
}
|
||||
.filt {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
backdrop-filter: saturate(2500%);
|
||||
}
|
||||
.greenbox {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 75px;
|
||||
left: 75px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<p>You should see a light-blue rectangle with a green box. Neither cyan nor white.</p>
|
||||
<div class="square"></div>
|
||||
<div class="filt">
|
||||
<div class="greenbox"></div>
|
||||
</div>
|
|
@ -0,0 +1,48 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Backdrop Filters Animation: Saturate</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
|
||||
<link rel="match" href="css-backdrop-filters-animation-saturate-ref.html">
|
||||
<style>
|
||||
@keyframes animate {
|
||||
0% {
|
||||
backdrop-filter: saturate(4900%);
|
||||
}
|
||||
100% {
|
||||
backdrop-filter: none;
|
||||
}
|
||||
}
|
||||
.square {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
background: #f4fbff;
|
||||
}
|
||||
.filt {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
animation-name: animate;
|
||||
animation-play-state: paused;
|
||||
animation-delay: -2s;
|
||||
animation-duration: 4s;
|
||||
animation-timing-function: linear;
|
||||
}
|
||||
.greenbox {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 75px;
|
||||
left: 75px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<p>You should see a light-blue rectangle with a green box. Neither cyan nor white.</p>
|
||||
<div class="square"></div>
|
||||
<div class="filt">
|
||||
<div class="greenbox"></div>
|
||||
</div>
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Backdrop Filters Animation: Sepia Reference</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<style>
|
||||
.square {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
background: blue;
|
||||
}
|
||||
.filt {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
backdrop-filter: sepia(50%);
|
||||
}
|
||||
.greenbox {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 75px;
|
||||
left: 75px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<p>You should see a dark blue rectangle with a green box.</p>
|
||||
<div class="square"></div>
|
||||
<div class="filt">
|
||||
<div class="greenbox"></div>
|
||||
</div>
|
|
@ -0,0 +1,48 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Backdrop Filters Animation: Sepia</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
|
||||
<link rel="match" href="css-backdrop-filters-animation-sepia-ref.html">
|
||||
<style>
|
||||
@keyframes animate {
|
||||
0% {
|
||||
backdrop-filter: sepia(100%);
|
||||
}
|
||||
100% {
|
||||
backdrop-filter: none;
|
||||
}
|
||||
}
|
||||
.square {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
background: blue;
|
||||
}
|
||||
.filt {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
animation-name: animate;
|
||||
animation-play-state: paused;
|
||||
animation-delay: -2s;
|
||||
animation-duration: 4s;
|
||||
animation-timing-function: linear;
|
||||
}
|
||||
.greenbox {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 75px;
|
||||
left: 75px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<p>You should see a dark blue rectangle with a green box.</p>
|
||||
<div class="square"></div>
|
||||
<div class="filt">
|
||||
<div class="greenbox"></div>
|
||||
</div>
|
|
@ -3,7 +3,7 @@
|
|||
<title>Drop cap with U+05D0 in the document</title>
|
||||
<meta name="assert" content="The text placement within :first-line should not be affected by later presence of a right-to-left character.">
|
||||
<link rel=help href=https://drafts.csswg.org/css-pseudo-4/#first-line-styling>
|
||||
<link rel=match href=/css/selectors/floating-first-letter-ref.html>
|
||||
<link rel=match href=floating-first-letter-ref.html>
|
||||
<style>
|
||||
p:first-line {
|
||||
background: lightblue;
|
||||
|
@ -17,4 +17,4 @@
|
|||
color: transparent;
|
||||
}
|
||||
</style>
|
||||
<p>Ab</p><div>א</div>
|
||||
<p>Ab</p><div>א</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<title>Drop cap with U+FEFF in the document</title>
|
||||
<meta name="assert" content="The text placement within :first-line should not be affected by later presence of U+FEFF.">
|
||||
<link rel=help href=https://drafts.csswg.org/css-pseudo-4/#first-line-styling>
|
||||
<link rel=match href=/css/selectors/floating-first-letter-ref.html>
|
||||
<link rel=match href=floating-first-letter-ref.html>
|
||||
<style>
|
||||
p:first-line {
|
||||
background: lightblue;
|
||||
|
@ -14,4 +14,4 @@
|
|||
font-size: 4rem;
|
||||
}
|
||||
</style>
|
||||
<p>Ab</p>
|
||||
<p>Ab</p>
|
||||
|
|
|
@ -5,14 +5,14 @@ Adding new commands to testdriver.js
|
|||
## Assumptions
|
||||
We assume the following in this writeup:
|
||||
- You know what web-platform-tests is and you have a working checkout and can run tests
|
||||
- You know what WebDriver or Selenium is
|
||||
- You know what WebDriver is
|
||||
- Familiarity with JavaScript and Python
|
||||
|
||||
## Introduction!
|
||||
|
||||
Let's implement window resizing. We can do this via the [Set Window Rect](https://w3c.github.io/webdriver/webdriver-spec.html#dfn-set-window-rect) command in WebDriver.
|
||||
|
||||
First, we need to think of what the API will look like a little. We will be using Selenium and Marionette for this, so we can look and see that they take in x, y coordinates, width and height integers.
|
||||
First, we need to think of what the API will look like a little. We will be using WebDriver and Marionette for this, so we can look and see that they take in x, y coordinates, width and height integers.
|
||||
|
||||
The first part of this will be browser agnostic, but later we will need to implement a specific layer for each browser (here we will do Firefox and Chrome).
|
||||
|
||||
|
@ -190,12 +190,12 @@ Now we write the browser specific implementations.
|
|||
|
||||
### Chrome
|
||||
|
||||
We will use [executorselenium](https://github.com/web-platform-tests/wpt/blob/master/tools/wptrunner/wptrunner/executors/executorselenium.py) and use the Selenium API (in the future there are plans to use the WebDriver API directly).
|
||||
We will use [executorwebdriver](https://github.com/web-platform-tests/wpt/blob/master/tools/wptrunner/wptrunner/executors/executorwebdriver.py) and use the WebDriver API.
|
||||
|
||||
There isn't too much work to do here, we just need to define a subclass of the protocol part we defined earlier.
|
||||
|
||||
```python
|
||||
class SeleniumSetWindowRectProtocolPart(SetWindowRectProtocolPart):
|
||||
class WebDriverSetWindowRectProtocolPart(SetWindowRectProtocolPart):
|
||||
def setup(self):
|
||||
self.webdriver = self.parent.webdriver
|
||||
|
||||
|
@ -217,20 +217,20 @@ from .protocol import (BaseProtocolPart,
|
|||
TestDriverProtocolPart)
|
||||
```
|
||||
|
||||
Here we have the setup method which just redefines the webdriver object at this level. The important part is the `set_window_rect` function (and it's important it is named that since we called it that earlier). This will be call the Selenium API for [set window rect](http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.set_window_rect) (`self.webdriver` is a Selenium WebDriver instance here).
|
||||
Here we have the setup method which just redefines the webdriver object at this level. The important part is the `set_window_rect` function (and it's important it is named that since we called it that earlier). This will call the WebDriver API for [set window rect](https://w3c.github.io/webdriver/#set-window-rect).
|
||||
|
||||
Finally, we just need to tell the SeleniumProtocol to implement this part.
|
||||
Finally, we just need to tell the WebDriverProtocol to implement this part.
|
||||
|
||||
```python
|
||||
class SeleniumProtocol(Protocol):
|
||||
implements = [SeleniumBaseProtocolPart,
|
||||
SeleniumTestharnessProtocolPart,
|
||||
SeleniumSelectorProtocolPart,
|
||||
SeleniumClickProtocolPart,
|
||||
SeleniumSendKeysProtocolPart,
|
||||
class WebDriverProtocol(Protocol):
|
||||
implements = [WebDriverBaseProtocolPart,
|
||||
WebDriverTestharnessProtocolPart,
|
||||
WebDriverSelectorProtocolPart,
|
||||
WebDriverClickProtocolPart,
|
||||
WebDriverSendKeysProtocolPart,
|
||||
{... other protocol parts}
|
||||
SeleniumSetWindowRectProtocolPart,
|
||||
SeleniumTestDriverProtocolPart]
|
||||
WebDriverSetWindowRectProtocolPart, # add this!
|
||||
WebDriverTestDriverProtocolPart]
|
||||
```
|
||||
|
||||
|
||||
|
@ -264,9 +264,9 @@ from .protocol import (BaseProtocolPart,
|
|||
TestDriverProtocolPart)
|
||||
```
|
||||
|
||||
Here we have the setup method which just redefines the webdriver object at this level. The important part is the `set_window_rect` function (and it's important it is named that since we called it that earlier). This will be call the Marionette API for [set window rect](http://marionette-client.readthedocs.io/en/master/reference.html#marionette_driver.marionette.Marionette.set_window_rect) (`self.marionette` is a marionette instance here).
|
||||
Here we have the setup method which just redefines the webdriver object at this level. The important part is the `set_window_rect` function (and it's important it is named that since we called it that earlier). This will call the Marionette API for [set window rect](https://firefox-source-docs.mozilla.org/python/marionette_driver.html#marionette_driver.marionette.Marionette.set_window_rect) (`self.marionette` is a marionette instance here).
|
||||
|
||||
Finally, we just need to tell the SeleniumProtocol to implement this part.
|
||||
Finally, we just need to tell the MarionetteProtocol to implement this part.
|
||||
|
||||
```python
|
||||
class MarionetteProtocol(Protocol):
|
||||
|
@ -278,13 +278,13 @@ class MarionetteProtocol(Protocol):
|
|||
MarionetteClickProtocolPart,
|
||||
MarionetteSendKeysProtocolPart,
|
||||
{... other protocol parts}
|
||||
MarionetteSetWindowRectProtocolPart # add this
|
||||
MarionetteSetWindowRectProtocolPart, # add this
|
||||
MarionetteTestDriverProtocolPart]
|
||||
```
|
||||
|
||||
### Other Browsers
|
||||
|
||||
Other browsers may also use executorselenium (such as safari), or a completely new executor (such as servo). For these, you must change the executor in the same way as we did with chrome and firefox.
|
||||
Other browsers (such as safari) may use executorselenium, or a completely new executor (such as servo). For these, you must change the executor in the same way as we did with chrome and firefox.
|
||||
|
||||
### Write an infra test
|
||||
|
||||
|
@ -311,7 +311,7 @@ promise_test(async t => {
|
|||
### What about testdriver-vendor.js?
|
||||
|
||||
The file [testdriver-vendor.js](https://github.com/web-platform-tests/wpt/blob/master/resources/testdriver-vendor.js) is the equivalent to testdriver-extra.js above, except it is
|
||||
run instead of testdriver-extra.js in browser specific test environments. For example, in [Chromium LayoutTests](https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/?q=LayoutTests&sq=package:chromium&dr).
|
||||
run instead of testdriver-extra.js in browser-specific test environments. For example, in [Chromium web_tests](https://cs.chromium.org/chromium/src/third_party/blink/web_tests/).
|
||||
|
||||
### What if I need to return a value from my testdriver API?
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
<!doctype html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>input multiline placeholder (CRLF)</title>
<link rel="help" href="https://html.spec.whatwg.org/multipage/input.html#the-placeholder-attribute">
<meta name="assert" content="input element's placeholder strips newlines (CRLF)">
<link rel="match" href="/html/input/the-placeholder-attribute/multiline-ref.html">
<input placeholder="this is
a multiline
placeholder">
<input placeholder="this is
a multiline

placeholder">
<input id="dynamic">
<script>
document.querySelector("#dynamic")
.setAttribute("placeholder", "this is\ra multiline\r\rplaceholder");
document.documentElement.classList.remove("reftest-wait");
</script>
</html>
|
|
@ -0,0 +1 @@
|
|||
<!doctype html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>input multiline placeholder (CR)</title>
<link rel="help" href="https://html.spec.whatwg.org/multipage/input.html#the-placeholder-attribute">
<meta name="assert" content="input element's placeholder strips newlines (CR)">
<link rel="match" href="multiline-placeholder-ref.html">
<input placeholder="this is
a multiline
placeholder">
<input placeholder="this is
a multiline

placeholder">
<input id="dynamic">
<script>
document.querySelector("#dynamic")
.setAttribute("placeholder", "this is\ra multiline\r\rplaceholder");
document.documentElement.classList.remove("reftest-wait");
</script>
</html>
|
|
@ -4,7 +4,7 @@
|
|||
<title>input multiline placeholder (CRLF)</title>
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/input.html#the-placeholder-attribute">
|
||||
<meta name="assert" content="input element's placeholder strips newlines (CRLF)">
|
||||
<link rel="match" href="/html/input/the-placeholder-attribute/multiline-ref.html">
|
||||
<link rel="match" href="multiline-placeholder-ref.html">
|
||||
<input placeholder="this is
|
||||
a multiline
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
<title>input multiline placeholder</title>
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/input.html#the-placeholder-attribute">
|
||||
<meta name="assert" content="input element's placeholder strips newlines">
|
||||
<link rel="match" href="/html/input/the-placeholder-attribute/multiline-ref.html">
|
||||
<link rel="match" href="multiline-placeholder-ref.html">
|
||||
<input placeholder="this is
|
||||
a multiline
|
||||
|
|
@ -100,8 +100,8 @@ CR AT EOL: WebIDL/valid/idl/documentation-dos.widl
|
|||
CR AT EOL: cors/resources/cors-headers.asis
|
||||
CR AT EOL: html/semantics/forms/the-textarea-element/multiline-placeholder-cr.html
|
||||
CR AT EOL: html/semantics/forms/the-textarea-element/multiline-placeholder-crlf.html
|
||||
CR AT EOL: html/input/the-placeholder-attribute/multiline-cr.html
|
||||
CR AT EOL: html/input/the-placeholder-attribute/multiline-crlf.html
|
||||
CR AT EOL: html/semantics/forms/the-input-element/multiline-placeholder-cr.html
|
||||
CR AT EOL: html/semantics/forms/the-input-element/multiline-placeholder-crlf.html
|
||||
CR AT EOL: webvtt/parsing/file-parsing/tests/support/newlines.vtt
|
||||
|
||||
# Intentional use of tabs
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
function run() {
|
||||
var target0 = document.getElementById("target0");
|
||||
var btnComplete = document.getElementById("btnComplete");
|
||||
var clickIsReceived = false;
|
||||
var actions_promise;
|
||||
|
||||
// Check if touch-action attribute works properly for embedded divs
|
||||
// Scrollable-Parent, Child: `auto`, Grand-Child: `none`
|
||||
|
@ -103,7 +103,11 @@
|
|||
assert_equals(target0.scrollLeft, 0, "scroll x offset should be 0 in the end of the test");
|
||||
assert_equals(target0.scrollTop, 0, "scroll y offset should be 0 in the end of the test");
|
||||
});
|
||||
clickIsReceived = true;
|
||||
|
||||
// Make sure the test finishes after all the input actions are completed.
|
||||
actions_promise.then( () => {
|
||||
test_touchaction.done();
|
||||
});
|
||||
updateDescriptionComplete();
|
||||
});
|
||||
|
||||
|
@ -112,15 +116,10 @@
|
|||
});
|
||||
|
||||
// Inject touch inputs.
|
||||
touchScrollInTarget(scrollTarget, 'down').then(function() {
|
||||
actions_promise = touchScrollInTarget(scrollTarget, 'down').then(function() {
|
||||
return touchScrollInTarget(scrollTarget, 'right');
|
||||
}).then(function() {
|
||||
return clickInTarget("touch", btnComplete);
|
||||
}).then(function() {
|
||||
test_touchaction.step(function () {
|
||||
assert_true(clickIsReceived, "click should be received before the test finishes");
|
||||
}, "click should be received before the test finishes");
|
||||
test_touchaction.done();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-actions.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="pointerevent_support.js"></script>
|
||||
<style>
|
||||
#target0 {
|
||||
|
@ -84,6 +87,7 @@
|
|||
var target0 = document.getElementById("target0");
|
||||
|
||||
var test_touchaction = async_test("touch-action attribute test");
|
||||
var actions_promise;
|
||||
|
||||
xScr0 = target0.scrollLeft;
|
||||
yScr0 = target0.scrollTop;
|
||||
|
@ -107,10 +111,25 @@
|
|||
}
|
||||
|
||||
if(xScrollIsReceived && yScrollIsReceived) {
|
||||
test_touchaction.done();
|
||||
// Make sure the test finishes after all the input actions are completed.
|
||||
actions_promise.then( () => {
|
||||
test_touchaction.done();
|
||||
});
|
||||
updateDescriptionComplete();
|
||||
}
|
||||
});
|
||||
|
||||
// Inject keyboard scroll inputs.
|
||||
actions_promise = new test_driver.Actions()
|
||||
.pointerMove(0, 0, {origin: target0})
|
||||
.pointerDown()
|
||||
.pointerUp()
|
||||
.addTick()
|
||||
.keyDown("\uE015")
|
||||
.keyUp("\uE015")
|
||||
.keyDown("\uE014")
|
||||
.keyUp("\uE014")
|
||||
.send();
|
||||
}
|
||||
|
||||
function updateDescriptionNextStepKeyboard() {
|
|
@ -188,7 +188,7 @@ function test5() {
|
|||
function test6() {
|
||||
let target = document.querySelector('polygon');
|
||||
let helper = new ResizeTestHelper(
|
||||
"test6: observe svg:path",
|
||||
"test6: observe svg:polygon",
|
||||
[
|
||||
{
|
||||
setup: observer => {
|
||||
|
@ -311,6 +311,58 @@ function test10() {
|
|||
return helper.start();
|
||||
}
|
||||
|
||||
function test11() {
|
||||
// <svg>
|
||||
// <view></view>
|
||||
// <defs>
|
||||
// <linearGradient>
|
||||
// <stop></stop>
|
||||
// </linearGradient>
|
||||
// </defs>
|
||||
// </svg>
|
||||
const svgNS = "http://www.w3.org/2000/svg";
|
||||
let svg = document.createElementNS(svgNS, 'svg');
|
||||
document.body.appendChild(svg);
|
||||
|
||||
let view = document.createElementNS(svgNS, 'view');
|
||||
svg.appendChild(view);
|
||||
|
||||
let defs = document.createElementNS(svgNS, 'defs');
|
||||
let linearGradient = document.createElementNS(svgNS, 'linearGradient');
|
||||
let stop = document.createElementNS(svgNS, 'stop');
|
||||
linearGradient.appendChild(stop);
|
||||
defs.appendChild(linearGradient);
|
||||
svg.appendChild(defs);
|
||||
|
||||
let helper = new ResizeTestHelper(
|
||||
"test11: observe svg non-displayable element",
|
||||
[
|
||||
{
|
||||
setup: observer => {
|
||||
observer.observe(view);
|
||||
},
|
||||
notify: (entries, observer) => {
|
||||
assert_unreached("no entries should be observed on <view> Element");
|
||||
},
|
||||
timeout: () => {
|
||||
// expected
|
||||
}
|
||||
},
|
||||
{
|
||||
setup: observer => {
|
||||
observer.observe(stop);
|
||||
},
|
||||
notify: (entries, observer) => {
|
||||
assert_unreached("no entries should be observed on <stop> Element");
|
||||
},
|
||||
timeout: () => {
|
||||
// expected
|
||||
}
|
||||
},
|
||||
]);
|
||||
return helper.start(() => svg.remove());
|
||||
}
|
||||
|
||||
let guard;
|
||||
test(_ => {
|
||||
assert_own_property(window, "ResizeObserver");
|
||||
|
@ -328,6 +380,7 @@ test0()
|
|||
.then(() => { return test8(); })
|
||||
.then(() => { return test9(); })
|
||||
.then(() => { return test10(); })
|
||||
.then(() => { return test11(); })
|
||||
.then(() => { guard.done(); });
|
||||
|
||||
</script>
|
||||
|
|
|
@ -17,88 +17,72 @@ function build_script_url(allowed_path, origin) {
|
|||
return `${url}?pipe=header(Service-Worker-Allowed,${allowed_path})`;
|
||||
}
|
||||
|
||||
promise_test(async t => {
|
||||
const script = build_script_url('/allowed-path');
|
||||
const scope = '/allowed-path';
|
||||
const registration = await service_worker_unregister_and_register(
|
||||
t, script, scope);
|
||||
assert_true(registration instanceof ServiceWorkerRegistration, 'registered');
|
||||
assert_equals(registration.scope, normalizeURL(scope));
|
||||
return registration.unregister();
|
||||
}, 'Registering within Service-Worker-Allowed path');
|
||||
// register_test is a promise_test that registers a service worker.
|
||||
function register_test(script, scope, description) {
|
||||
promise_test(async t => {
|
||||
t.add_cleanup(() => {
|
||||
return service_worker_unregister(t, scope);
|
||||
});
|
||||
|
||||
promise_test(async t => {
|
||||
const script = build_script_url(new URL('/allowed-path', document.location));
|
||||
const scope = '/allowed-path';
|
||||
const registration = await service_worker_unregister_and_register(
|
||||
t, script, scope);
|
||||
assert_true(registration instanceof ServiceWorkerRegistration, 'registered');
|
||||
assert_equals(registration.scope, normalizeURL(scope));
|
||||
return registration.unregister();
|
||||
}, 'Registering within Service-Worker-Allowed path (absolute URL)');
|
||||
const registration = await service_worker_unregister_and_register(
|
||||
t, script, scope);
|
||||
assert_true(registration instanceof ServiceWorkerRegistration, 'registered');
|
||||
assert_equals(registration.scope, normalizeURL(scope));
|
||||
}, description);
|
||||
}
|
||||
|
||||
promise_test(async t => {
|
||||
const script = build_script_url('../allowed-path-with-parent');
|
||||
const scope = 'allowed-path-with-parent';
|
||||
const registration = await service_worker_unregister_and_register(
|
||||
t, script, scope);
|
||||
assert_true(registration instanceof ServiceWorkerRegistration, 'registered');
|
||||
assert_equals(registration.scope, normalizeURL(scope));
|
||||
return registration.unregister();
|
||||
}, 'Registering within Service-Worker-Allowed path with parent reference');
|
||||
// register_fail_test is like register_test but expects a SecurityError.
|
||||
function register_fail_test(script, scope, description) {
|
||||
promise_test(async t => {
|
||||
t.add_cleanup(() => {
|
||||
return service_worker_unregister(t, scope);
|
||||
});
|
||||
|
||||
promise_test(async t => {
|
||||
const script = build_script_url('../allowed-path');
|
||||
const scope = '/disallowed-path';
|
||||
await service_worker_unregister(t, scope);
|
||||
return promise_rejects(t,
|
||||
'SecurityError',
|
||||
navigator.serviceWorker.register(script, {scope: scope}),
|
||||
'register should fail');
|
||||
}, 'Registering outside Service-Worker-Allowed path');
|
||||
await service_worker_unregister(t, scope);
|
||||
await promise_rejects(t,
|
||||
'SecurityError',
|
||||
navigator.serviceWorker.register(script, {scope}));
|
||||
}, description);
|
||||
}
|
||||
|
||||
promise_test(async t => {
|
||||
const script = build_script_url('../allowed-path-with-parent');
|
||||
const scope = '/allowed-path-with-parent';
|
||||
await service_worker_unregister(t, scope);
|
||||
return promise_rejects(t,
|
||||
'SecurityError',
|
||||
navigator.serviceWorker.register(script, {scope: scope}),
|
||||
'register should fail');
|
||||
}, 'Registering outside Service-Worker-Allowed path with parent reference');
|
||||
register_test(
|
||||
build_script_url('/allowed-path'),
|
||||
'/allowed-path',
|
||||
'Registering within Service-Worker-Allowed path');
|
||||
|
||||
promise_test(async t => {
|
||||
const script = build_script_url(
|
||||
host_info.HTTPS_REMOTE_ORIGIN + '/');
|
||||
const scope = 'resources/this-scope-is-normally-allowed'
|
||||
const registration = await service_worker_unregister_and_register(
|
||||
t, script, scope);
|
||||
assert_true(registration instanceof ServiceWorkerRegistration, 'registered');
|
||||
assert_equals(registration.scope, normalizeURL(scope));
|
||||
return registration.unregister();
|
||||
}, 'Service-Worker-Allowed is cross-origin to script, registering on a normally allowed scope');
|
||||
register_test(
|
||||
build_script_url(new URL('/allowed-path', document.location)),
|
||||
'/allowed-path',
|
||||
'Registering within Service-Worker-Allowed path (absolute URL)');
|
||||
|
||||
promise_test(async t => {
|
||||
const script = build_script_url(
|
||||
host_info.HTTPS_REMOTE_ORIGIN + '/');
|
||||
const scope = '/this-scope-is-normally-disallowed'
|
||||
const registration = await service_worker_unregister_and_register(
|
||||
t, script, scope);
|
||||
assert_true(registration instanceof ServiceWorkerRegistration, 'registered');
|
||||
assert_equals(registration.scope, normalizeURL(scope));
|
||||
return registration.unregister();
|
||||
}, 'Service-Worker-Allowed is cross-origin to script, registering on a normally disallowed scope');
|
||||
register_test(
|
||||
build_script_url('../allowed-path-with-parent'),
|
||||
'allowed-path-with-parent',
|
||||
'Registering within Service-Worker-Allowed path with parent reference');
|
||||
|
||||
promise_test(async t => {
|
||||
const script = build_script_url(
|
||||
host_info.HTTPS_REMOTE_ORIGIN + '/cross-origin/',
|
||||
host_info.HTTPS_REMOTE_ORIGIN);
|
||||
const scope = '/cross-origin/';
|
||||
await service_worker_unregister(t, scope);
|
||||
return promise_rejects(t,
|
||||
'SecurityError',
|
||||
navigator.serviceWorker.register(script, {scope: scope}),
|
||||
'register should fail');
|
||||
}, 'Service-Worker-Allowed is cross-origin to page, same-origin to script');
|
||||
register_fail_test(
|
||||
build_script_url('../allowed-path'),
|
||||
'/disallowed-path',
|
||||
'Registering outside Service-Worker-Allowed path'),
|
||||
|
||||
register_fail_test(
|
||||
build_script_url('../allowed-path-with-parent'),
|
||||
'/allowed-path-with-parent',
|
||||
'Registering outside Service-Worker-Allowed path with parent reference');
|
||||
|
||||
register_fail_test(
|
||||
build_script_url(host_info.HTTPS_REMOTE_ORIGIN + '/'),
|
||||
'resources/this-scope-is-normally-allowed',
|
||||
'Service-Worker-Allowed is cross-origin to script, registering on a normally allowed scope');
|
||||
|
||||
register_fail_test(
|
||||
build_script_url(host_info.HTTPS_REMOTE_ORIGIN + '/'),
|
||||
'/this-scope-is-normally-disallowed',
|
||||
'Service-Worker-Allowed is cross-origin to script, registering on a normally disallowed scope');
|
||||
|
||||
register_fail_test(
|
||||
build_script_url(host_info.HTTPS_REMOTE_ORIGIN + '/cross-origin/',
|
||||
host_info.HTTPS_REMOTE_ORIGIN),
|
||||
'/cross-origin/',
|
||||
'Service-Worker-Allowed is cross-origin to page, same-origin to script');
|
||||
</script>
|
||||
|
|
|
@ -3,6 +3,6 @@ mozinfo==1.1.0
|
|||
mozlog==4.1
|
||||
mozdebug==0.1.1
|
||||
pillow==6.0.0
|
||||
urllib3[secure]==1.25.2
|
||||
urllib3[secure]==1.25.3
|
||||
requests==2.22.0
|
||||
six>=1.8
|
||||
six==1.12.0
|
||||
|
|
|
@ -257,6 +257,25 @@ class MarionettePrefsProtocolPart(PrefsProtocolPart):
|
|||
case prefInterface.PREF_INT:
|
||||
prefInterface.setIntPref(pref, value);
|
||||
break;
|
||||
case prefInterface.PREF_INVALID:
|
||||
// Pref doesn't seem to be defined already; guess at the
|
||||
// right way to set it based on the type of value we have.
|
||||
switch (typeof value) {
|
||||
case "boolean":
|
||||
prefInterface.setBoolPref(pref, value);
|
||||
break;
|
||||
case "string":
|
||||
prefInterface.setCharPref(pref, value);
|
||||
break;
|
||||
case "number":
|
||||
prefInterface.setIntPref(pref, value);
|
||||
break;
|
||||
default:
|
||||
throw new Error("Unknown pref value type: " + (typeof value));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new Error("Unknown pref type " + type);
|
||||
}
|
||||
""" % (name, value)
|
||||
with self.marionette.using_context(self.marionette.CONTEXT_CHROME):
|
||||
|
|
|
@ -52,11 +52,13 @@ function xr_session_promise_test(
|
|||
.then((session) => {
|
||||
testSession = session;
|
||||
session.mode = sessionMode;
|
||||
let glLayer = new XRWebGLLayer(session, gl, {
|
||||
compositionDisabled: session.mode == 'inline'
|
||||
});
|
||||
// Session must have a baseLayer or frame requests
|
||||
// will be ignored.
|
||||
session.updateRenderState({
|
||||
baseLayer: new XRWebGLLayer(session, gl),
|
||||
outputContext: getOutputContext()
|
||||
baseLayer: glLayer
|
||||
});
|
||||
resolve(func(session, testDeviceController, t));
|
||||
})
|
||||
|
@ -78,15 +80,6 @@ function xr_session_promise_test(
|
|||
properties);
|
||||
}
|
||||
|
||||
// A utility function to create an output context as required by non-immersive
|
||||
// sessions.
|
||||
// https://immersive-web.github.io/webxr/#xrsessioncreationoptions-interface
|
||||
function getOutputContext() {
|
||||
let outputCanvas = document.createElement('canvas');
|
||||
document.body.appendChild(outputCanvas);
|
||||
return outputCanvas.getContext('xrpresent');
|
||||
}
|
||||
|
||||
// This functions calls a callback with each API object as specified
|
||||
// by https://immersive-web.github.io/webxr/spec/latest/, allowing
|
||||
// checks to be made on all ojects.
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<body>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src="resources/webxr_util.js"></script>
|
||||
<canvas></canvas>
|
||||
<script>
|
||||
xr_promise_test(
|
||||
"Ensure that XRPresentationContexts are properly transfered between session",
|
||||
(t) => {
|
||||
return XRTest.simulateDeviceConnection({ supportsImmersive:false })
|
||||
.then( (controller) => {
|
||||
return Promise.all([
|
||||
navigator.xr.requestSession('inline'),
|
||||
navigator.xr.requestSession('inline')
|
||||
]).then((sessions) => {
|
||||
t.step(() => {
|
||||
assert_not_equals(sessions[0], null);
|
||||
assert_not_equals(sessions[1], null);
|
||||
});
|
||||
|
||||
const webglCanvas = document.getElementsByTagName('canvas')[0];
|
||||
let gl = webglCanvas.getContext('webgl', {xrCompatible: true});
|
||||
let outputContext = getOutputContext();
|
||||
|
||||
sessions[0].updateRenderState({
|
||||
baseLayer: new XRWebGLLayer(sessions[0], gl),
|
||||
outputContext: outputContext
|
||||
});
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
sessions[0].requestAnimationFrame((time, xrFrame) => {
|
||||
sessions[1].updateRenderState({
|
||||
baseLayer: new XRWebGLLayer(sessions[1], gl),
|
||||
outputContext: outputContext
|
||||
});
|
||||
|
||||
t.step(() => {
|
||||
// outputContext reassignment should not happen until the next frame is processed.
|
||||
assert_equals(sessions[0].renderState.outputContext, outputContext);
|
||||
assert_equals(sessions[1].renderState.outputContext, null);
|
||||
});
|
||||
|
||||
sessions[1].requestAnimationFrame((time, xrFrame) => {
|
||||
t.step(() => {
|
||||
// Ensure the outputContext was properly reassigned from one context to the other.
|
||||
assert_equals(sessions[0].renderState.outputContext, null);
|
||||
assert_equals(sessions[1].renderState.outputContext, outputContext);
|
||||
});
|
||||
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
Loading…
Add table
Add a link
Reference in a new issue