mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update web-platform-tests to revision 04cd5eb8e5c47e4fe341f2fb541d39fa2346f464
This commit is contained in:
parent
0ab2c3f8a3
commit
1d0624b343
226 changed files with 4495 additions and 903 deletions
|
@ -21,27 +21,7 @@ export function runTests(property, values) {
|
|||
style.cssText = "";
|
||||
style.setProperty(property, value);
|
||||
testCSSValues("logical values in inline style", style, [[property, value]]);
|
||||
testComputedValues("logical values in computed style", style, [[property, value]]);
|
||||
}, `Test that '${property}: ${value}' is supported.`);
|
||||
|
||||
const camelCase = value.replace(/-(.)/g, (match, $1) => $1.toUpperCase());
|
||||
for (const writingMode of writingModes) {
|
||||
for (const style of writingMode.styles) {
|
||||
const writingModeDecl = makeDeclaration(style);
|
||||
test(function() {
|
||||
const physicalSide = writingMode[camelCase];
|
||||
let expected;
|
||||
if (physicalSide === writingMode.lineLeft) {
|
||||
expected = "left";
|
||||
} else if (physicalSide === writingMode.lineRight) {
|
||||
expected = "right";
|
||||
} else {
|
||||
expected = physicalSide;
|
||||
}
|
||||
testComputedValues(`computed value`,
|
||||
`.test { ${writingModeDecl} }`,
|
||||
[[property, expected]]);
|
||||
}, `Test '${property}: ${value}' with '${writingModeDecl}'.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue