https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 5dfffa5f98c91f22ee3d4570dd8be8b457f3c3b4 authored by Takeshi Yoshino on 09 March 2017, 08:24:18 UTC
Update WritableStream tests
Tip revision: 5dfffa5
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