top1.appendChild(animate);

rootSVGElement.appendChild(rect);

// Setup animation test
function sample1() {
    assert_approx_equals(stop1.offset.animVal, 0, epsilon);
    assert_equals(stop1.offset.baseVal, 0);
}

function sample2() {
    assert_approx_equals(stop1.offset.animVal, 0.5, epsilon);
    assert_equals(stop1.offset.baseVal, 0);
}

function sample3() {
    assert_approx_equals(stop1.offset.animVal, 1, epsilon);
    assert_equals(stop1.offset.baseVal, 0);
}

smil_async_test((t) => {
    const expe