OLD | NEW |
1 This tests element.dataset. | 1 This tests element.dataset. |
2 | 2 |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
4 | 4 |
5 | 5 |
6 PASS testGet('data-foo', 'foo') is true | 6 PASS testGet('data-foo', 'foo') is true |
7 PASS testGet('data-foo-bar', 'fooBar') is true | 7 PASS testGet('data-foo-bar', 'fooBar') is true |
8 PASS testGet('data--', '-') is true | 8 PASS testGet('data--', '-') is true |
9 PASS testGet('data--foo', 'Foo') is true | 9 PASS testGet('data--foo', 'Foo') is true |
10 PASS testGet('data---foo', '-Foo') is true | 10 PASS testGet('data---foo', '-Foo') is true |
11 PASS testGet('data---foo--bar', '-Foo-Bar') is true | 11 PASS testGet('data---foo--bar', '-Foo-Bar') is true |
12 PASS testGet('data---foo---bar', '-Foo--Bar') is true | 12 PASS testGet('data---foo---bar', '-Foo--Bar') is true |
13 PASS testGet('data-foo-', 'foo-') is true | 13 PASS testGet('data-foo-', 'foo-') is true |
14 PASS testGet('data-foo--', 'foo--') is true | 14 PASS testGet('data-foo--', 'foo--') is true |
15 PASS testGet('data-Foo', 'foo') is true | 15 PASS testGet('data-Foo', 'foo') is true |
16 PASS testGet('data-', '') is true | 16 PASS testGet('data-', '') is true |
17 PASS testGet('data-à', 'à') is true | 17 PASS testGet('data-à', 'à') is true |
18 PASS document.body.dataset.nonExisting is undefined. | 18 PASS document.body.dataset.nonExisting is undefined. |
19 | 19 |
20 PASS matchesNothingInDataset('dataFoo') is true | 20 PASS matchesNothingInDataset('dataFoo') is true |
21 | 21 |
22 PASS testSet('foo', 'data-foo') is true | 22 PASS testSet('foo', 'data-foo') is true |
23 PASS testSet('fooBar', 'data-foo-bar') is true | 23 PASS testSet('fooBar', 'data-foo-bar') is true |
24 PASS testSet('-', 'data--') is true | 24 PASS testSet('-', 'data--') is true |
25 PASS testSet('Foo', 'data--foo') is true | 25 PASS testSet('Foo', 'data--foo') is true |
26 PASS testSet('-Foo', 'data---foo') is true | 26 PASS testSet('-Foo', 'data---foo') is true |
27 PASS testSet('', 'data-') is true | 27 PASS testSet('', 'data-') is true |
28 PASS testSet('à', 'data-à') is true | 28 PASS testSet('à', 'data-à') is true |
29 | 29 |
30 PASS testSet('-foo', 'dummy') threw exception Error: SyntaxError: DOM Exception
12. | 30 PASS testSet('-foo', 'dummy') threw exception SyntaxError: An invalid or illegal
string was specified.. |
31 PASS testSet('foo ', 'dummy') threw exception Error: InvalidCharacterError: DOM
Exception 5. | 31 PASS testSet('foo ', 'dummy') threw exception InvalidCharacterError: An invalid
or illegal character was specified, such as in an XML name.. |
32 PASS testSet('foo豈', 'dummy') threw exception Error: InvalidCharacterError: DOM
Exception 5. | 32 PASS testSet('foo豈', 'dummy') threw exception InvalidCharacterError: An invalid
or illegal character was specified, such as in an XML name.. |
33 | 33 |
34 PASS testDelete('data-foo', 'foo') is true | 34 PASS testDelete('data-foo', 'foo') is true |
35 PASS testDelete('data-foo-bar', 'fooBar') is true | 35 PASS testDelete('data-foo-bar', 'fooBar') is true |
36 PASS testDelete('data--', '-') is true | 36 PASS testDelete('data--', '-') is true |
37 PASS testDelete('data--foo', 'Foo') is true | 37 PASS testDelete('data--foo', 'Foo') is true |
38 PASS testDelete('data---foo', '-Foo') is true | 38 PASS testDelete('data---foo', '-Foo') is true |
39 PASS testDelete('data-', '') is true | 39 PASS testDelete('data-', '') is true |
40 PASS testDelete('data-à', 'à') is true | 40 PASS testDelete('data-à', 'à') is true |
41 | 41 |
42 PASS testDelete('dummy', '-foo') is false | 42 PASS testDelete('dummy', '-foo') is false |
(...skipping 23 matching lines...) Expand all Loading... |
66 PASS div.hasAttribute('foo') is false | 66 PASS div.hasAttribute('foo') is false |
67 PASS delete div.dataset.Bar; div.dataset.Bar is undefined. | 67 PASS delete div.dataset.Bar; div.dataset.Bar is undefined. |
68 | 68 |
69 Set null: | 69 Set null: |
70 PASS d.dataset.foo is 'null' | 70 PASS d.dataset.foo is 'null' |
71 | 71 |
72 PASS successfullyParsed is true | 72 PASS successfullyParsed is true |
73 | 73 |
74 TEST COMPLETE | 74 TEST COMPLETE |
75 | 75 |
OLD | NEW |