OLD | NEW |
1 Tests the classList attribute and its properties. | 1 Tests the classList attribute and its properties. |
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 Tests from http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/ | 6 Tests from http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/ |
7 PASS String(element.classList) is "x" | 7 PASS String(element.classList) is "y" |
| 8 PASS String(element.className) is "y" |
8 PASS element.classList.length is 0 | 9 PASS element.classList.length is 0 |
9 PASS element.classList.length is 1 | 10 PASS element.classList.length is 1 |
10 PASS element.classList.length is 2 | 11 PASS element.classList.length is 2 |
11 PASS element.classList.length is 2 | 12 PASS element.classList.length is 2 |
12 PASS element.className is "x" | 13 PASS element.className is "x" |
13 PASS element.className is "x" | 14 PASS element.className is "x" |
14 PASS element.className is "x x" | 15 PASS element.className is "x x" |
15 PASS element.className is "y x" | 16 PASS element.className is "y x" |
16 PASS element.className is "" | 17 PASS element.className is "" |
17 PASS element.className is "" | 18 PASS element.className is "" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 PASS element.className is "a b" | 111 PASS element.className is "a b" |
111 PASS element.classList.remove("a", {toString: function() { throw new Error("user
error"); }}, "b") threw exception Error: user error. | 112 PASS element.classList.remove("a", {toString: function() { throw new Error("user
error"); }}, "b") threw exception Error: user error. |
112 PASS element.className is "a b" | 113 PASS element.className is "a b" |
113 PASS element.classList.remove() did not throw exception. | 114 PASS element.classList.remove() did not throw exception. |
114 PASS observer.takeRecords().length is 1 | 115 PASS observer.takeRecords().length is 1 |
115 PASS areArraysEqual(seen, ['a', 'b', 'c']) is true | 116 PASS areArraysEqual(seen, ['a', 'b', 'c']) is true |
116 PASS successfullyParsed is true | 117 PASS successfullyParsed is true |
117 | 118 |
118 TEST COMPLETE | 119 TEST COMPLETE |
119 | 120 |
OLD | NEW |