https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 9b6e516d529b526e06447d171dc2937f646bbe89 authored by Bear Travis on 11 July 2014, 21:52:43 UTC
Adding basic tests for the CSS.supports API as part of the CSS Conditional Rules Module L3.
Tip revision: 9b6e516
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