mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Update web-platform-tests to revision cd44958a002b1ad494168e0290554644de84526e
This commit is contained in:
parent
2ed23ce4c9
commit
4443426308
103 changed files with 1740 additions and 1138 deletions
|
@ -1,7 +1,10 @@
|
|||
'use strict';
|
||||
|
||||
(function() {
|
||||
|
||||
function assert_initial(property, initial) {
|
||||
test(() => {
|
||||
const target = document.getElementById('target');
|
||||
if (!getComputedStyle(target)[property])
|
||||
return;
|
||||
target.style[property] = 'initial';
|
||||
|
@ -13,6 +16,8 @@ function assert_initial(property, initial) {
|
|||
/**
|
||||
* Create tests that a CSS property inherits and has the given initial value.
|
||||
*
|
||||
* The current document must have an element #target within element #container.
|
||||
*
|
||||
* @param {string} property The name of the CSS property being tested.
|
||||
* @param {string} initial The computed value for 'initial'.
|
||||
* @param {string} other An arbitrary value for the property that round
|
||||
|
@ -22,6 +27,8 @@ function assert_inherited(property, initial, other) {
|
|||
assert_initial(property, initial);
|
||||
|
||||
test(() => {
|
||||
const container = document.getElementById('container');
|
||||
const target = document.getElementById('target');
|
||||
if (!getComputedStyle(target)[property])
|
||||
return;
|
||||
container.style[property] = 'initial';
|
||||
|
@ -45,6 +52,8 @@ function assert_inherited(property, initial, other) {
|
|||
* Create tests that a CSS property does not inherit, and that it has the
|
||||
* given initial value.
|
||||
*
|
||||
* The current document must have an element #target within element #container.
|
||||
*
|
||||
* @param {string} property The name of the CSS property being tested.
|
||||
* @param {string} initial The computed value for 'initial'.
|
||||
* @param {string} other An arbitrary value for the property that round
|
||||
|
@ -54,6 +63,8 @@ function assert_not_inherited(property, initial, other) {
|
|||
assert_initial(property, initial);
|
||||
|
||||
test(() => {
|
||||
const container = document.getElementById('container');
|
||||
const target = document.getElementById('target');
|
||||
if (!getComputedStyle(target)[property])
|
||||
return;
|
||||
container.style[property] = 'initial';
|
||||
|
@ -69,3 +80,7 @@ function assert_not_inherited(property, initial, other) {
|
|||
target.style[property] = '';
|
||||
}, 'Property ' + property + ' does not inherit');
|
||||
}
|
||||
|
||||
window.assert_inherited = assert_inherited;
|
||||
window.assert_not_inherited = assert_not_inherited;
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue