blob: f2a072ae7faf7ac93bd8304a74b4c8b80ecfd95f [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 Error: SyntaxError: DOM Exception 12.
PASS testSet('foo ', 'dummy') threw exception Error: InvalidCharacterError: DOM Exception 5.
PASS testSet('foo豈', 'dummy') threw exception Error: InvalidCharacterError: DOM Exception 5.
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