Bug 1443192 [wpt PR 9315] - Add compat test for -webkit-appearance, a=testonly

Automatic update from web-platform-tests
This is an not-yet-spec'd feature, but is currently supported by Chrome,
Opera, Safari, and Edge, and Firefox has indicated that they plan to
support it (https://bugzilla.mozilla.org/show_bug.cgi?id=1368555).

<!-- Reviewable:start -->

<!-- Reviewable:end -->

wpt-commits: 141951354c4dc58a5dd7b6394c1b7e15dc8e3e30
wpt-pr: 9315
reapplied-commits: 370e267e160568862f1fd9ec246ab5bb840f586e, fe4514c84e7ad28e46bad5da93381deb99b177f3, 7806af854343c043a2645a4034fdc7812f65daad, 9ddfd21554293dec5a4bf2e5375ae4f3c9f2ded0, 75f63c4d1ebc949647184fd60972fc7b9fd4affb, 1f3a5b496acd2288cc8cf0c32af86cb35157ea4e, 88b42bd5847abac58a62c4d6b33c1509bfce5f3d, 15c2e4c690700c6c115f8afe5e44ded10d943538, c8d461ef1437641ae7d4ea1d21e1e60cd62910b0, a6088a5f48ee299386a84d2f771902267d7355b1, 0634cd8f08ebe0905a9188fb1398c7b5f889c5dc, c8ee4a012dae506ae06bb5b2ad50942b04c1aaaa, c2c352456a4cf62dcc12f851138b04397675a445, b93a8879555d2fa7e7d4e00a275513a3a6338b35, b86e1331cb36634fd33677043b61fc0c1d8485bc, 44ddf14fd3346658c3223f13652073fafbfa48fa, a1a5840a6bb53e305ba02bcbeb215659342d0edb, 7465cb110ae5ec2e2ca73182caf5293f0efc8fd5, aad5349b3458bc3414e274b33fa86a1123901ff2, eca0907980d2769c449894a6277c60c1a306792f, 38626987c0cfd6e715cfcc6f4f1a1209191a03c5, e4a67f7ddcde6cd99348e9104bd7ed07074da44a, bb3c9990840a0fae2afc840b5952d7874785b112, 042d7adef0bdb9dc80e825c3997ace7519477c42, 99f1ea44fc7915b8b7b33bce4732fa8765fd3ac2, b81999f30c1516a70c153de51a0331d14c8faead
This commit is contained in:
Mike Taylor 2018-03-06 18:16:55 +00:00 коммит произвёл moz-wptsync-bot
Родитель 3796a0da42
Коммит 94185e2c23
2 изменённых файлов: 75 добавлений и 0 удалений

Просмотреть файл

@ -304722,6 +304722,12 @@
{}
]
],
"compat/webkit-appearance.tentative.html": [
[
"/compat/webkit-appearance.tentative.html",
{}
]
],
"compat/webkit-text-fill-color-currentColor.html": [
[
"/compat/webkit-text-fill-color-currentColor.html",
@ -395889,6 +395895,10 @@
"2d71e7532fc32af61d2410927b6405a9e79279a4",
"testharness"
],
"compat/webkit-appearance.tentative.html": [
"19f5d49ab9383759357d9b7cd73f15fe7fff2939",
"testharness"
],
"compat/webkit-linear-gradient-line-bottom.html": [
"af59a0aa3b8a195ba7ef401b582be9384a23a388",
"reftest"

Просмотреть файл

@ -0,0 +1,65 @@
<!DOCTYPE html>
<title>-webkit-appearance support</title>
<!-- There is no spec for -webkit-appearance. It is supported in Opera, Safari,
Chrome, and Edge. Firefox has expressed intent to support it. -->
<link rel="help" href="https://github.com/whatwg/compat/issues/6">
<meta name="assert" content="This test checks for support of the -webkit-appearance CSS attribute." />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="tester"></div>
<script>
const WEBKIT_APPEARANCE_VALUES = [
'none',
'checkbox',
'radio',
'push-button',
'square-button',
'button',
'button-bevel',
'inner-spin-button',
'listbox',
'listitem',
'media-enter-fullscreen-button',
'media-exit-fullscreen-button',
'media-mute-button',
'media-play-button',
'media-overlay-play-button',
'media-toggle-closed-captions-button',
'media-slider',
'media-sliderthumb',
'media-volume-slider-container',
'media-volume-slider',
'media-volume-sliderthumb',
'media-controls-background',
'media-controls-fullscreen-background',
'media-current-time-display',
'media-time-remaining-display',
'menulist',
'menulist-button',
'menulist-text',
'menulist-textfield',
'meter',
'progress-bar',
'progress-bar-value',
'slider-horizontal',
'slider-vertical',
'sliderthumb-horizontal',
'sliderthumb-vertical',
'caret',
'searchfield',
'searchfield-cancel-button',
'textfield',
'textarea',
];
for (const appearance_value of WEBKIT_APPEARANCE_VALUES) {
test(() => {
const div = document.getElementById('tester');
div.style = `-webkit-appearance: ${appearance_value}`;
assert_equals(getComputedStyle(div).webkitAppearance, appearance_value);
});
}
</script>