<!DOCTYPE html>
<script src="../../resources/js-test-pre.js"></script>
<script>
    description("This tests SVGAnimatedListPropertyTearOff don't crash if modified after contextElement goes out of scope.");

    var text = document.createElementNS("http://www.w3.org/2000/svg","text");
    var baseVal = text.dx.baseVal;
    text = null;
    gc();

    var svgLength = document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGLength();
    baseVal.appendItem(svgLength);
    gc();

    debug("This test passes if we don't crash.");
</script>
<script src="../../resources/js-test-post.js"></script>
