x);
        parent.appendChild(y);
        child.after(y, x);
        var expected = innerHTML + '<y></y><x></x>';
        assert_equals(parent.innerHTML, expected);
    }, nodeName + '.after() when pre-insert behaves like append.');

    test(function() {
        var parent = document.createElement('div');
        var x = document.createElement('x');
        var y = document.createElement('y');
        parent.appendChild(child);
        parent.appendChild(x);
        parent.appendChild(document.createTextN