Update web-platform-tests to revision 4333a1d2f109795547fc5e22ebfc8481fa649de7

This commit is contained in:
WPT Sync Bot 2018-06-22 21:05:34 -04:00
parent 728ebcc932
commit 8c46b67f8e
456 changed files with 10561 additions and 5108 deletions

View file

@ -0,0 +1,39 @@
<!doctype html>
<meta charset="utf-8">
<title>CSS Test: font shorthand serialization with font-stretch values</title>
<link rel="help" href="https://drafts.csswg.org/css-fonts-4/#propdef-font">
<link rel="help" href="https://drafts.csswg.org/cssom-1/#serializing-css-values">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="test" style="font: medium serif"></div>
<script>
test(function() {
const div = document.getElementById("test");
div.style.fontStretch = "50%";
assert_equals(div.style.font, "ultra-condensed medium serif");
div.style.fontStretch = "62.5%";
assert_equals(div.style.font, "extra-condensed medium serif");
div.style.fontStretch = "75%";
assert_equals(div.style.font, "condensed medium serif");
div.style.fontStretch = "87.5%";
assert_equals(div.style.font, "semi-condensed medium serif");
div.style.fontStretch = "100%";
assert_equals(div.style.font, "medium serif", "The keyword normal should be omitted");
div.style.fontStretch = "112.5%";
assert_equals(div.style.font, "semi-expanded medium serif");
div.style.fontStretch = "125%";
assert_equals(div.style.font, "expanded medium serif");
div.style.fontStretch = "150%";
assert_equals(div.style.font, "extra-expanded medium serif");
div.style.fontStretch = "200%";
assert_equals(div.style.font, "ultra-expanded medium serif");
}, "Percentages which can be transformed into keywords should be for serialization");
test(function() {
const div = document.getElementById("test");
div.style.fontStretch = "25%";
assert_equals(div.style.font, "");
div.style.fontStretch = "101%";
assert_equals(div.style.font, "");
}, "Percentages which cannot be transformed into keywords should prevent the font shorthand from serializing");
</script>

View file

@ -4,7 +4,7 @@
<meta charset=utf-8>
<title>@font-feature-values rule parsing tests</title>
<link rel="author" title="John Daggett" href="mailto:jdaggett@mozilla.com">
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-feature-values" />
<link rel="help" href="http://www.w3.org/TR/css-fonts-4/#font-feature-values" />
<meta name="assert" content="tests that valid @font-feature-values rules parse and invalid ones don't" />
<!-- https://bugzilla.mozilla.org/show_bug.cgi?id=549861 -->
<script type="text/javascript" src="/resources/testharness.js"></script>