Update web-platform-tests to revision 58b72393db0bd273bb93268c33666cf893feb985

This commit is contained in:
Josh Matthews 2017-10-31 08:58:31 -04:00
parent 43a4f01647
commit 64e0a52537
12717 changed files with 59835 additions and 59820 deletions

View file

@ -0,0 +1,52 @@
<!DOCTYPE html>
<html>
<head>
<title>box-shadow + variable substitution on same element</title>
<meta rel="author" title="Kevin Babbitt">
<meta rel="author" title="Greg Whitworth">
<link rel="author" title="Microsoft Corporation" href="http://microsoft.com" />
<!-- This is testing filters functions with var() function -->
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="target" style="box-shadow: 1px 1px 1px green; color: var(--alpha); --alpha: green;">This div should have green text and a green shadow.</div>
<script type="text/javascript">
"use strict";
let target = document.getElementById('target');
let computedStyle = window.getComputedStyle(target);
let templates = [
{
testName:"box-shadow",
value: computedStyle.boxShadow,
potentialValues: ["1px 1px 1px green", "rgb(0, 128, 0) 1px 1px 1px 0px"],
description: "Expected value should be 1px 1px 1px green or rgb(0, 128, 0) 1px 1px 1px 0px"
},
{
testName:"--alpha",
value: computedStyle.getPropertyValue("--alpha").trim(),
potentialValues: ["green"],
description: "Expected value is green"
},
{
testName:"color",
value: computedStyle.color,
potentialValues: ["rgb(0, 128, 0)", "rgba(0, 128, 0, 1)"],
description: "Expected value to be rgb(0, 128, 0) or rgba(0, 128, 0, 1)"
}
];
templates.forEach(function (template) {
test( function () {
assert_in_array(template.value, template.potentialValues, template.description);
}, template.testName);
});
</script>
</body>
</html>