https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 1e7d904d39eeb95877e4ae60011ca2ab874d5f7f authored by Anne van Kesteren on 11 May 2018, 06:10:04 UTC
add variants where .close() is called
Tip revision: 1e7d904
traversal-support.js
// |expected| should be an object indicating the expected type of node.
function assert_node(actual, expected)
{
    assert_true(actual instanceof expected.type,
                'Node type mismatch: actual = ' + actual.nodeType + ', expected = ' + expected.nodeType);
    if (typeof(expected.id) !== 'undefined')
        assert_equals(actual.id, expected.id);
    if (typeof(expected.nodeValue) !== 'undefined')
        assert_equals(actual.nodeValue, expected.nodeValue);
}
back to top