https://github.com/web-platform-tests/wpt
Raw File
Tip revision: a1b9c9f70005a294db1938a8280f3b784e7c99a0 authored by Anne van Kesteren on 29 November 2016, 17:33:31 UTC
clear cookies
Tip revision: a1b9c9f
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