blob: 394f5d30c9abb4a143576c5d5108e8a3bbba948a [file] [log] [blame]
This tests element.dataset for XHTML.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS testGet('data-foo', 'foo') is true
PASS testGet('data-foo-bar', 'fooBar') is true
PASS testGet('data--', '-') is true
PASS testGet('data--foo', 'Foo') is true
PASS testGet('data---foo', '-Foo') is true
PASS testGet('data-', '') is true
PASS testGet('data-à', 'à') is true
PASS matchesNothingInDataset('dataFoo') is true
PASS matchesNothingInDataset('data-Foo') is true
PASS testSet('foo', 'data-foo') is true
PASS testSet('fooBar', 'data-foo-bar') is true
PASS testSet('-', 'data--') is true
PASS testSet('Foo', 'data--foo') is true
PASS testSet('-Foo', 'data---foo') is true
PASS testSet('', 'data-') is true
PASS testSet('à', 'data-à') is true
PASS testSet('-foo', 'dummy') threw exception SyntaxError: An invalid or illegal string was specified..
PASS testSet('foo ', 'dummy') threw exception InvalidCharacterError: An invalid or illegal character was specified, such as in an XML name..
PASS testSet('foo豈', 'dummy') threw exception InvalidCharacterError: An invalid or illegal character was specified, such as in an XML name..
PASS testDelete('data-foo', 'foo') is true
PASS testDelete('data-foo-bar', 'fooBar') is true
PASS testDelete('data--', '-') is true
PASS testDelete('data--foo', 'Foo') is true
PASS testDelete('data---foo', '-Foo') is true
PASS testDelete('data-', '') is true
PASS testDelete('data-à', 'à') is true
PASS testDelete('dummy', '-foo') is false
PASS testForIn(['data-foo', 'data-bar', 'data-baz']) is 3
PASS testForIn(['data-foo', 'data-bar', 'dataFoo']) is 2
PASS testForIn(['data-foo', 'data-bar', 'style']) is 2
PASS testForIn(['data-foo', 'data-bar', 'data-']) is 3
PASS successfullyParsed is true
TEST COMPLETE