chromium/third_party/blink/web_tests/fast/css-grid-layout/resources/grid-tracks-length.js

function testElement(element, property, length) {
    var propertyValue = getComputedStyle(document.getElementById(element), '').getPropertyValue(property);

    if (propertyValue == "") {
        assert_equals(length, 0);
        return [];
    }

    var tracks = propertyValue.split(' ');
    assert_equals(tracks.length, length);
    return tracks;
}