Revision 859e67ce666775ccd471e4693d85d4e90989e270 authored by Bernie Thompson on 29 March 2018, 17:39:39 UTC, committed by Chromium WPT Sync on 29 March 2018, 17:39:39 UTC
BUG=chromium:825100 TEST=None This reverts commit f2d2fe87028de36a489f7db3f5fb28da2e9d9b2b. Change-Id: I01e5962e0b52ad63feca36513db19253a5ade530
1 parent a149250
supports.html
<!--quirks-->
<title>Syntax quirks in @supports/CSS.supports</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel=help href=https://drafts.csswg.org/css-conditional/#at-supports>
<link rel=help href=https://drafts.csswg.org/css-conditional/#the-css-interface>
<link rel=help href=https://quirks.spec.whatwg.org/#the-hashless-hex-color-quirk>
<link rel=help href=https://quirks.spec.whatwg.org/#the-unitless-length-quirk>
<style>
/* sanity check */
@supports (background-color: lime) { #a { background-color: lime } }
@supports (background-position: 1px 1px) { #a { background-position: 1px 1px } }
/* test */
@supports (background-color: 00ff00) { #b { background-color: 00ff00 } }
@supports (background-position: 1 1) { #b { background-position: 1 1 } }
</style>
<div id=a></div>
<div id=b></div>
<div id=c></div> <!-- c unstyled -->
<script>
var a = document.getElementById('a');
var b = document.getElementById('b');
var c = document.getElementById('c');
test(function() {
assert_not_equals(getComputedStyle(a).backgroundColor, getComputedStyle(c).backgroundColor);
}, 'Sanity check @supports color');
test(function() {
assert_equals(getComputedStyle(b).backgroundColor, getComputedStyle(a).backgroundColor);
}, '@supports quirky color');
test(function() {
assert_false(CSS.supports('background-color', '00ff00'));
}, 'CSS.supports() quirky color');
test(function() {
assert_not_equals(getComputedStyle(a).backgroundPosition, getComputedStyle(c).backgroundPosition);
}, 'Sanity check @supports length');
test(function() {
assert_equals(getComputedStyle(b).backgroundPosition, getComputedStyle(a).backgroundPosition);
}, '@supports quirky length');
test(function() {
assert_false(CSS.supports('background-position', '1 1'));
}, 'CSS.supports() quirky length');
</script>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...