wpt / css / geometry / DOMMatrix-attributes.html

Status: FAIL | Duration: 64ms | Subtests: 0/22 | 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
DOMMatrix.aFAILDOMMatrix is not defined
DOMMatrix.bFAILDOMMatrix is not defined
DOMMatrix.cFAILDOMMatrix is not defined
DOMMatrix.dFAILDOMMatrix is not defined
DOMMatrix.eFAILDOMMatrix is not defined
DOMMatrix.fFAILDOMMatrix is not defined
DOMMatrix.m11FAILDOMMatrix is not defined
DOMMatrix.m12FAILDOMMatrix is not defined
DOMMatrix.m21FAILDOMMatrix is not defined
DOMMatrix.m22FAILDOMMatrix is not defined
DOMMatrix.m41FAILDOMMatrix is not defined
DOMMatrix.m42FAILDOMMatrix is not defined
DOMMatrix.m13FAILDOMMatrix is not defined
DOMMatrix.m14FAILDOMMatrix is not defined
DOMMatrix.m23FAILDOMMatrix is not defined
DOMMatrix.m24FAILDOMMatrix is not defined
DOMMatrix.m31FAILDOMMatrix is not defined
DOMMatrix.m32FAILDOMMatrix is not defined
DOMMatrix.m34FAILDOMMatrix is not defined
DOMMatrix.m43FAILDOMMatrix is not defined
DOMMatrix.m33FAILDOMMatrix is not defined
DOMMatrix.m44FAILDOMMatrix is not defined

/css/geometry/DOMMatrix-attributes.html

<!DOCTYPE html>
<title>Geometry Interfaces: DOMMatrix attributes</title>
<link rel="help" href="https://drafts.fxtf.org/geometry/#dommatrix-attributes">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
const initial = {
    a: 1, b: 0, c: 0, d: 1, e: 0, f: 0,
    m11: 1, m12: 0, m13: 0, m14: 0,
    m21: 0, m22: 1, m23: 0, m24: 0,
    m31: 0, m32: 0, m33: 1, m34: 0,
    m41: 0, m42: 0, m43: 0, m44: 1,
};

// Attributes that always preserve is2D.
["a", "b", "c", "d", "e", "f",
 "m11", "m12", "m21", "m22", "m41", "m42" ].forEach(attribute => {
    test(() => {
        let m = new DOMMatrix();
        assert_true(m.is2D);
        assert_equals(m[attribute], initial[attribute]);
        m[attribute] = 42;
        assert_true(m.is2D);
        assert_equals(m[attribute], 42);
    }, `DOMMatrix.${attribute}`);
});

// Attributes that clear is2D for values other than 0 or -0.
["m13", "m14", "m23", "m24", "m31", "m32", "m34", "m43" ].forEach(attribute => {
    test(() => {
        let m = new DOMMatrix();
        assert_true(m.is2D);
        assert_equals(m[attribute], initial[attribute]);
        m[attribute] = 0;
        assert_true(m.is2D, "0 preserves is2D");
        assert_equals(m[attribute], 0);
        m[attribute] = -0;
        assert_true(m.is2D, "-0 preserves is2D");
        assert_equals(m[attribute], -0);
        m[attribute] = 42;
        assert_false(m.is2D, "a value other than 0 or -0 clears is2D");
        assert_equals(m[attribute], 42);
        m[attribute] = 0;
        assert_false(m.is2D, "is2D can never be set to true after having been set to false");
        assert_equals(m[attribute], 0);
    }, `DOMMatrix.${attribute}`);
});

// Attributes that clear is2D for values other than 1.
["m33", "m44" ].forEach(attribute => {
    test(() => {
        let m = new DOMMatrix();
        assert_true(m.is2D);
        assert_equals(m[attribute], initial[attribute]);
        m[attribute] = 1;
        assert_true(m.is2D, "1 preserves is2D");
        assert_equals(m[attribute], 1);
        m[attribute] = 42;
        assert_false(m.is2D, "a value other than 1 clears is2D");
        assert_equals(m[attribute], 42);
        m[attribute] = 1;
        assert_false(m.is2D, "is2D can never be set to true after having been set to false");
        assert_equals(m[attribute], 1);
    }, `DOMMatrix.${attribute}`);
});
</script>