Update web-platform-tests to revision fc33be9acfbf8e883fd9683c527aab22d842542b

This commit is contained in:
WPT Sync Bot 2018-03-30 21:21:31 -04:00
parent d232705106
commit 09b1413275
32 changed files with 1112 additions and 577 deletions

View file

@ -0,0 +1,72 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Box Alignment Test: computed value of normal on *-gap properties</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<link rel="help" href="https://www.w3.org/TR/css-align-3/#column-row-gap">
<meta assert="The computed value of [row-|column-]?gap is normal for all elements it applies to. Checking explicitely because earlier version of the spec called for 0px in some cases.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#col,
#grid,
#flex {
/* Not using the shorthand because that's not what we're interested in,
and there are implementations that support column-gap without supporting the shorthand */
colum-gap: normal;
row-gap: normal;
float: right; /* for shrinkwrap*/
}
#col {
column-count: 2;
column-width: 50px;
}
#grid {
display: grid;
grid-template-columns: 50px 50px;
grid-template-rows: 50px 50px;
}
#flex {
display: flex;
}
#flex * { width: 50px; height: 50px;}
</style>
<body>
<div id="log"></div>
<div id=col></div>
<div id=grid></div>
<div id=flex><span></span><span></span></div>
<script>
test(
function(){
var target = document.getElementById("col");
assert_equals(getComputedStyle(target).columnGap, "normal");
}, "colum-gap:normal computes to normal on multicol elements");
test(
function(){
var target = document.getElementById("col");
assert_equals(getComputedStyle(target).rowGap, "normal");
}, "row-gap:normal computes to normal on multicol elements");
test(
function(){
var target = document.getElementById("grid");
assert_equals(getComputedStyle(target).columnGap, "normal");
}, "colum-gap:normal computes to normal on grid");
test(
function(){
var target = document.getElementById("grid");
assert_equals(getComputedStyle(target).rowGap, "normal");
}, "row-gap:normal computes to normal on grid");
test(
function(){
var target = document.getElementById("flex");
assert_equals(getComputedStyle(target).columnGap, "normal");
}, "colum-gap:normal (main axis) computes to normal on flexbox");
test(
function(){
var target = document.getElementById("flex");
assert_equals(getComputedStyle(target).rowGap, "normal");
}, "row-gap:normal (cross axis) computes to normal on flexbox");
</script>
</body>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Box Alignment Test: used value of *-gap:normal on grid</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<link rel="help" href="https://www.w3.org/TR/css-align-3/#column-row-gap">
<meta assert="The used value of row-gap and column-gap normal for grids is 0">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht" />
<style>
#grid {
colum-gap: normal;
row-gap: normal;
display: grid;
grid-template-columns: 50px 50px;
grid-template-rows: 50px 50px;
position: absolute;
}
#grid * { background: green; }
#red {
width: 100px;
height: 100px;
background: red;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id=grid><span></span><span></span><span></span><span></span></div>
<div id=red></div>

View file

@ -0,0 +1,33 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Box Alignment Test: used value of *-gap:normal on flexbox</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<link rel="help" href="https://www.w3.org/TR/css-align-3/#column-row-gap">
<meta assert="The used value row-gap:normal and column:normal normal is 0px in flexbox">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht" />
<style>
#flex {
colum-gap: normal;
row-gap: normal;
display: flex;
flex-flow: wrap;
max-width: 145px; /* more than 100, less than 150, to force wrapping and get 2 items per line*/
position: absolute;
}
#flex * {
width: 50px;
height: 50px;
background: green
}
#red {
width: 100px;
height: 100px;
background: red;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id=flex><span></span><span></span><span></span><span></span></div>
<div id=red></div>

View file

@ -0,0 +1,2 @@
@frivoal
@dbaron

View file

@ -0,0 +1,42 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Overflow Test: flow-relative versions of overflow-x and -y</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<link rel="help" href="https://drafts.csswg.org/css-overflow-3/#logical">
<link rel="help" href="https://drafts.csswg.org/css-logical/#box">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#d1, #d2 {
overflow-block: hidden;
overflow-inline: scroll
}
#d1 {
writing-mode: horizontal-tb;
}
#d2 {
writing-mode: vertical-rl;
}
</style>
<body>
<div id="log"></div>
<div id=d1></div>
<div id=d2></div>
<script>
test(
function(){
var target = document.getElementById("d1");
assert_equals(getComputedStyle(target).overflowX, "scroll");
assert_equals(getComputedStyle(target).overflowY, "hidden");
}, "overflow-x matches overflow-inline, and overflow-y matches overflow-block when the element has a horizontal writing mode");
test(
function(){
var target = document.getElementById("d2");
assert_equals(getComputedStyle(target).overflowX, "hidden");
assert_equals(getComputedStyle(target).overflowY, "scroll");
}, "overflow-y matches overflow-inline, and overflow-x matches overflow-block when the element has a vertical writing mode");
</script>
</body>

View file

@ -7,7 +7,7 @@
<style type='text/css'>
.test { word-break: break-all; }
/* the CSS below is not part of the test */
.test, .ref { border: 1px solid orange; margin: 20px; padding: 10px; width: 390px; font: 36px/1.5 sans-serif; }
.test, .ref { border: 1px solid orange; margin: 20px; padding: 10px; width: 390px; font: 36px/1.5 Arial; }
</style>
</head>
<body>
@ -15,4 +15,4 @@
<div class="ref" lang="bo"><span>ལྷ་སའི་སྐད་ད་<br/>ལྟ</span></div>
<div class="ref" lang="bo"><span>ལྷ་སའི་སྐད་ད་<br/>ལྟ</span></div>
</body>
</html>
</html>

View file

@ -10,7 +10,7 @@
<style type='text/css'>
.test { word-break: break-all; }
/* the CSS below is not part of the test */
.test, .ref { border: 1px solid orange; margin: 20px; padding: 10px; width: 390px; font: 36px/1.5 sans-serif; }
.test, .ref { border: 1px solid orange; margin: 20px; padding: 10px; width: 390px; font: 36px/1.5 Arial; }
</style>
</head>
<body>
@ -22,4 +22,4 @@ var sentenceWidth = document.getElementById('testspan').offsetWidth
document.getElementById('testdiv').style.width = String(sentenceWidth - 5)+'px'
</script>
</body>
</html>
</html>

View file

@ -0,0 +1,49 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Transitions Test: transition-property - background-position</title>
<link rel="author" title="Zhuoyu Qian" href="mailto:zhuoyu.qian@samsung.com">
<link rel="help" title="7.1. Properties from CSS" href="http://www.w3.org/TR/css3-transitions/#animatable-css">
<link rel="help" title="5.3.6 background-position" href="https://www.w3.org/TR/CSS1/#background-position">
<meta name="assert" content="Test checks that the 'background-position' property with edge offset is animatable.">
<script src="/resources/testharness.js" type="text/javascript"></script>
<script src="/resources/testharnessreport.js" type="text/javascript"></script>
<style>
#test {
border: 1px solid;
background-image: url("support/cat.png");
background-repeat: no-repeat;
height: 200px;
transition-duration: 100s;
transition-property: background-position;
transition-timing-function: step-end;
}
</style>
<body>
<div id="test"></div>
</body>
<script>
var startValue = "left 10px top 10px";
var endValue = "right 10px bottom 10px";
var div = document.getElementById("test");
// getComputedStyle helper
function gCS(aProperty) {
return document.defaultView
.getComputedStyle(div, "")
.getPropertyValue(aProperty);
}
(function() {
div.style.backgroundPosition = startValue;
// flush styles
gCS("background-position");
// set property to endValue
div.setAttribute("style", "background-position: " + endValue);
test(function() {
assert_true(gCS("background-position") != endValue);
}, "background-position not equals to end value");
})();
</script>

View file

@ -0,0 +1,27 @@
<!doctype html>
<meta charset="utf-8">
<title>'marker-*' properties</title>
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get">
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set">
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../../resources/testhelper.js"></script>
<script src="resources/testsuite.js"></script>
<body>
<div id="log"></div>
<script>
'use strict';
runUnsupportedPropertyTests('marker', [
'none', 'url(#m1)'
]);
for (const suffix of ['start', 'mid', 'end']) {
runPropertyTests(`marker-${suffix}`, [
{ syntax: 'none' },
{ syntax: '<url>' },
]);
}
</script>

View file

@ -152,6 +152,13 @@ const gTestSyntaxExamples = {
}
],
},
'<url>': {
description: 'a URL',
examples: [
// TODO(https://github.com/w3c/css-houdini-drafts/issues/716):
// We can't test this until CSSURLValue is spec'd.
],
},
'<transform>': {
description: 'a transform',
examples: [

View file

@ -19,6 +19,8 @@ function doTest(idl) {
DOMMatrixReadOnly: ["new DOMMatrixReadOnly()", "DOMMatrixReadOnly.fromMatrix({is2D: false})"],
DOMMatrix: ["new DOMMatrix()", "DOMMatrix.fromMatrix({is2D: false})"],
});
idlArray.prevent_multiple_testing("DOMMatrixReadOnly");
idlArray.prevent_multiple_testing("DOMMatrix");
idlArray.test();
done();
}