mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +01:00
Update web-platform-tests to revision 2e7a549d07c54cbdb9002634bf5a4cc6ce8f9acb
This commit is contained in:
parent
e5da0ebd1d
commit
0371218e22
33 changed files with 694 additions and 146 deletions
|
@ -0,0 +1,22 @@
|
|||
'use strict';
|
||||
|
||||
/**
|
||||
* Create test that a CSS property computes to the expected value.
|
||||
* The document element #target is used to perform the test.
|
||||
*
|
||||
* @param {string} property The name of the CSS property being tested.
|
||||
* @param {string} specified A specified value for the property.
|
||||
* @param {string} computed The expected computed value. If omitted,
|
||||
defaults to specified.
|
||||
*/
|
||||
function test_computed_value(property, specified, computed) {
|
||||
if (!computed)
|
||||
computed = specified;
|
||||
test(() => {
|
||||
if (!getComputedStyle(target)[property])
|
||||
return;
|
||||
target.style[property] = '';
|
||||
target.style[property] = specified;
|
||||
assert_equals(getComputedStyle(target)[property], computed);
|
||||
}, "Property " + property + " value '" + specified + "' computes to '" + computed + "'");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue