wpt / css / css-logical / getComputedStyle-listing.html

Status: FAIL | Duration: 68ms | Subtests: 0/30 | Open test on wpt.live | wpt.fyi

Data from commit:
a50cb89 wpt: run reference-named files which are themselves tests (#836) (2026-09-03)

SubtestStatusMessage
border-block-end-colorFAILassert_true: The computed style has a property descriptor for border-block-end-color or borderBlockEndColor. expected true got false
border-block-end-styleFAILassert_true: The computed style has a property descriptor for border-block-end-style or borderBlockEndStyle. expected true got false
border-block-end-widthFAILassert_true: The computed style has a property descriptor for border-block-end-width or borderBlockEndWidth. expected true got false
border-block-start-colorFAILassert_true: The computed style has a property descriptor for border-block-start-color or borderBlockStartColor. expected true got false
border-block-start-styleFAILassert_true: The computed style has a property descriptor for border-block-start-style or borderBlockStartStyle. expected true got false
border-block-start-widthFAILassert_true: The computed style has a property descriptor for border-block-start-width or borderBlockStartWidth. expected true got false
border-inline-end-colorFAILassert_true: The computed style has a property descriptor for border-inline-end-color or borderInlineEndColor. expected true got false
border-inline-end-styleFAILassert_true: The computed style has a property descriptor for border-inline-end-style or borderInlineEndStyle. expected true got false
border-inline-end-widthFAILassert_true: The computed style has a property descriptor for border-inline-end-width or borderInlineEndWidth. expected true got false
border-inline-start-colorFAILassert_true: The computed style has a property descriptor for border-inline-start-color or borderInlineStartColor. expected true got false
border-inline-start-styleFAILassert_true: The computed style has a property descriptor for border-inline-start-style or borderInlineStartStyle. expected true got false
border-inline-start-widthFAILassert_true: The computed style has a property descriptor for border-inline-start-width or borderInlineStartWidth. expected true got false
inset-block-startFAILassert_true: The computed style has a property descriptor for inset-block-start or insetBlockStart. expected true got false
inset-block-endFAILassert_true: The computed style has a property descriptor for inset-block-end or insetBlockEnd. expected true got false
inset-inline-startFAILassert_true: The computed style has a property descriptor for inset-inline-start or insetInlineStart. expected true got false
inset-inline-endFAILassert_true: The computed style has a property descriptor for inset-inline-end or insetInlineEnd. expected true got false
margin-block-startFAILassert_true: The computed style has a property descriptor for margin-block-start or marginBlockStart. expected true got false
margin-block-endFAILassert_true: The computed style has a property descriptor for margin-block-end or marginBlockEnd. expected true got false
margin-inline-startFAILassert_true: The computed style has a property descriptor for margin-inline-start or marginInlineStart. expected true got false
margin-inline-endFAILassert_true: The computed style has a property descriptor for margin-inline-end or marginInlineEnd. expected true got false
padding-block-startFAILassert_true: The computed style has a property descriptor for padding-block-start or paddingBlockStart. expected true got false
padding-block-endFAILassert_true: The computed style has a property descriptor for padding-block-end or paddingBlockEnd. expected true got false
padding-inline-startFAILassert_true: The computed style has a property descriptor for padding-inline-start or paddingInlineStart. expected true got false
padding-inline-endFAILassert_true: The computed style has a property descriptor for padding-inline-end or paddingInlineEnd. expected true got false
block-sizeFAILassert_true: The computed style has a property descriptor for block-size or blockSize. expected true got false
inline-sizeFAILassert_true: The computed style has a property descriptor for inline-size or inlineSize. expected true got false
max-block-sizeFAILassert_true: The computed style has a property descriptor for max-block-size or maxBlockSize. expected true got false
max-inline-sizeFAILassert_true: The computed style has a property descriptor for max-inline-size or maxInlineSize. expected true got false
min-block-sizeFAILassert_true: The computed style has a property descriptor for min-block-size or minBlockSize. expected true got false
min-inline-sizeFAILassert_true: The computed style has a property descriptor for min-inline-size or minInlineSize. expected true got false

/css/css-logical/getComputedStyle-listing.html

<!DOCTYPE html>
<meta charset="utf-8" />
<title>CSS Logical Properties: computed style listing</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com" />
<link rel="help" href="https://drafts.csswg.org/css-logical/#margin-properties">
<meta name="assert" content="This test checks that the logical properties are properly exposed in a computed CSSStyleDeclaration." />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<div id="log"></div>

<script>
function hasProperty(object, property) {
  // This checks the [[HasProperty]] internal method.
  return property in object;
}

function hasPropertyValue(object, property) {
  // This checks the [[Get]] internal method.
  return object[property] !== undefined;
}

function hasPropertyDescriptor(object, property) {
  // This checks [[GetOwnProperty]], iterating the prototype chain.
  while (object) {
    if (Reflect.getOwnPropertyDescriptor(object, property)) {
      return true;
    }
    object = Reflect.getPrototypeOf(object);
  }
  return false;
}

function hasPropertyKey(object, property) {
  // This checks [[OwnPropertyKeys]], iterating the prototype chain.
  while (object) {
    if (Reflect.ownKeys(object).includes(property)) {
      return true;
    }
    object = Reflect.getPrototypeOf(object);
  }
  return false;
}

function hasItem(object, item) {
  // This checks the CSSStyleDeclaration::item WebIDL getter.
  for (let i = 0; i < object.length; ++i) {
    if (object.item(i) === item) {
      return true;
    }
  }
  return false;
}

function check(property) {
  const cs = getComputedStyle(document.body);
  const camelCase = property.replace(/-(.)/g, (_, b) => b.toUpperCase());
  test(function() {
    assert_true(hasProperty(cs, property) || hasProperty(cs, camelCase),
      `The computed style has the property ${property} or ${camelCase}.`);
    assert_true(hasPropertyValue(cs, property) || hasPropertyValue(cs, camelCase),
      `The computed style has a value for for the property ${property} or ${camelCase}.`);
    assert_true(hasPropertyDescriptor(cs, property) || hasPropertyDescriptor(cs, camelCase),
      `The computed style has a property descriptor for ${property} or ${camelCase}.`);
    assert_true(hasPropertyKey(cs, property) || hasPropertyKey(cs, camelCase),
      `The computed style contains ${property} or ${camelCase} in the property list.`);
    assert_true(hasItem(cs, property) || hasItem(cs, camelCase),
      `The computed style contains the item ${property} or ${camelCase}.`);
  }, property);
}

check("border-block-end-color");
check("border-block-end-style");
check("border-block-end-width");
check("border-block-start-color");
check("border-block-start-style");
check("border-block-start-width");
check("border-inline-end-color");
check("border-inline-end-style");
check("border-inline-end-width");
check("border-inline-start-color");
check("border-inline-start-style");
check("border-inline-start-width");

check("inset-block-start");
check("inset-block-end");
check("inset-inline-start");
check("inset-inline-end");

check("margin-block-start");
check("margin-block-end");
check("margin-inline-start");
check("margin-inline-end");

check("padding-block-start");
check("padding-block-end");
check("padding-inline-start");
check("padding-inline-end");

check("block-size");
check("inline-size");
check("max-block-size");
check("max-inline-size");
check("min-block-size");
check("min-inline-size");
</script>