weinig@apple.com | 96a2cf9 | 2010-06-30 23:15:15 +0000 | [diff] [blame] | 1 | This tests element.dataset for XHTML. |
| 2 | |
| 3 | On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| 4 | |
| 5 | |
| 6 | PASS testGet('data-foo', 'foo') is true |
| 7 | PASS testGet('data-foo-bar', 'fooBar') is true |
| 8 | PASS testGet('data--', '-') is true |
| 9 | PASS testGet('data--foo', 'Foo') is true |
| 10 | PASS testGet('data---foo', '-Foo') is true |
| 11 | PASS testGet('data-', '') is true |
| 12 | PASS testGet('data-à', 'à') is true |
| 13 | |
| 14 | PASS matchesNothingInDataset('dataFoo') is true |
| 15 | PASS matchesNothingInDataset('data-Foo') is true |
| 16 | |
| 17 | PASS testSet('foo', 'data-foo') is true |
| 18 | PASS testSet('fooBar', 'data-foo-bar') is true |
| 19 | PASS testSet('-', 'data--') is true |
| 20 | PASS testSet('Foo', 'data--foo') is true |
| 21 | PASS testSet('-Foo', 'data---foo') is true |
| 22 | PASS testSet('', 'data-') is true |
| 23 | PASS testSet('à', 'data-à') is true |
| 24 | |
cdumez@apple.com | 73c7cf9 | 2017-07-19 20:24:15 +0000 | [diff] [blame] | 25 | PASS testSet('-foo', 'dummy') threw exception SyntaxError: The string did not match the expected pattern.. |
| 26 | PASS testSet('foo ', 'dummy') threw exception InvalidCharacterError: The string contains invalid characters.. |
| 27 | PASS testSet('foo豈', 'dummy') threw exception InvalidCharacterError: The string contains invalid characters.. |
weinig@apple.com | 96a2cf9 | 2010-06-30 23:15:15 +0000 | [diff] [blame] | 28 | |
| 29 | PASS testDelete('data-foo', 'foo') is true |
| 30 | PASS testDelete('data-foo-bar', 'fooBar') is true |
| 31 | PASS testDelete('data--', '-') is true |
| 32 | PASS testDelete('data--foo', 'Foo') is true |
| 33 | PASS testDelete('data---foo', '-Foo') is true |
| 34 | PASS testDelete('data-', '') is true |
| 35 | PASS testDelete('data-à', 'à') is true |
| 36 | |
tkent@chromium.org | f61635e | 2011-10-07 07:06:09 +0000 | [diff] [blame] | 37 | PASS testDelete('dummy', '-foo') is false |
weinig@apple.com | 96a2cf9 | 2010-06-30 23:15:15 +0000 | [diff] [blame] | 38 | |
| 39 | PASS testForIn(['data-foo', 'data-bar', 'data-baz']) is 3 |
| 40 | PASS testForIn(['data-foo', 'data-bar', 'dataFoo']) is 2 |
| 41 | PASS testForIn(['data-foo', 'data-bar', 'style']) is 2 |
| 42 | PASS testForIn(['data-foo', 'data-bar', 'data-']) is 3 |
| 43 | PASS successfullyParsed is true |
| 44 | |
| 45 | TEST COMPLETE |
| 46 | |