blob: c921cfc50e03358d878b02ff658cb84e3f385b66 [file] [log] [blame]
weinig@apple.com96a2cf92010-06-30 23:15:15 +00001This tests element.dataset for XHTML.
2
3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6PASS testGet('data-foo', 'foo') is true
7PASS testGet('data-foo-bar', 'fooBar') is true
8PASS testGet('data--', '-') is true
9PASS testGet('data--foo', 'Foo') is true
10PASS testGet('data---foo', '-Foo') is true
11PASS testGet('data-', '') is true
12PASS testGet('data-à', 'à') is true
13
14PASS matchesNothingInDataset('dataFoo') is true
15PASS matchesNothingInDataset('data-Foo') is true
16
17PASS testSet('foo', 'data-foo') is true
18PASS testSet('fooBar', 'data-foo-bar') is true
19PASS testSet('-', 'data--') is true
20PASS testSet('Foo', 'data--foo') is true
21PASS testSet('-Foo', 'data---foo') is true
22PASS testSet('', 'data-') is true
23PASS testSet('à', 'data-à') is true
24
cdumez@apple.com73c7cf92017-07-19 20:24:15 +000025PASS testSet('-foo', 'dummy') threw exception SyntaxError: The string did not match the expected pattern..
26PASS testSet('foo ', 'dummy') threw exception InvalidCharacterError: The string contains invalid characters..
27PASS testSet('foo豈', 'dummy') threw exception InvalidCharacterError: The string contains invalid characters..
weinig@apple.com96a2cf92010-06-30 23:15:15 +000028
29PASS testDelete('data-foo', 'foo') is true
30PASS testDelete('data-foo-bar', 'fooBar') is true
31PASS testDelete('data--', '-') is true
32PASS testDelete('data--foo', 'Foo') is true
33PASS testDelete('data---foo', '-Foo') is true
34PASS testDelete('data-', '') is true
35PASS testDelete('data-à', 'à') is true
36
tkent@chromium.orgf61635e2011-10-07 07:06:09 +000037PASS testDelete('dummy', '-foo') is false
weinig@apple.com96a2cf92010-06-30 23:15:15 +000038
39PASS testForIn(['data-foo', 'data-bar', 'data-baz']) is 3
40PASS testForIn(['data-foo', 'data-bar', 'dataFoo']) is 2
41PASS testForIn(['data-foo', 'data-bar', 'style']) is 2
42PASS testForIn(['data-foo', 'data-bar', 'data-']) is 3
43PASS successfullyParsed is true
44
45TEST COMPLETE
46