| 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 "y" | 7 PASS String(element.classList) is "y" |
| 8 PASS String(element.className) is "y" | 8 PASS String(element.className) is "y" |
| 9 PASS element.classList.length is 0 | 9 PASS element.classList.length is 0 |
| 10 PASS element.classList.length is 1 | 10 PASS element.classList.length is 1 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 PASS element.className is "" | 34 PASS element.className is "" |
| 35 PASS element.classList.toggle('x', false) is false | 35 PASS element.classList.toggle('x', false) is false |
| 36 PASS element.className is "" | 36 PASS element.className is "" |
| 37 PASS element.classList.toggle('', true) threw expected DOMException with code 12 | 37 PASS element.classList.toggle('', true) threw expected DOMException with code 12 |
| 38 PASS element.classList.toggle('x y', false) threw expected DOMException with cod
e 5 | 38 PASS element.classList.toggle('x y', false) threw expected DOMException with cod
e 5 |
| 39 Testing add in presence of trailing white spaces. | 39 Testing add in presence of trailing white spaces. |
| 40 PASS element.className is "x y" | 40 PASS element.className is "x y" |
| 41 PASS element.className is "x\ty" | 41 PASS element.className is "x\ty" |
| 42 PASS element.className is " y" | 42 PASS element.className is " y" |
| 43 Test invalid tokens | 43 Test invalid tokens |
| 44 PASS element.classList.contains('') threw expected DOMException with code 12 | 44 PASS element.classList.contains("") did not throw exception. |
| 45 PASS element.classList.contains('x y') threw expected DOMException with code 5 | 45 PASS element.classList.contains("x y") did not throw exception. |
| 46 PASS element.classList.add('') threw expected DOMException with code 12 | 46 PASS element.classList.add('') threw expected DOMException with code 12 |
| 47 PASS element.classList.add('x y') threw expected DOMException with code 5 | 47 PASS element.classList.add('x y') threw expected DOMException with code 5 |
| 48 PASS element.classList.remove('') threw expected DOMException with code 12 | 48 PASS element.classList.remove('') threw expected DOMException with code 12 |
| 49 PASS element.classList.remove('x y') threw expected DOMException with code 5 | 49 PASS element.classList.remove('x y') threw expected DOMException with code 5 |
| 50 PASS element.classList.toggle('') threw expected DOMException with code 12 | 50 PASS element.classList.toggle('') threw expected DOMException with code 12 |
| 51 PASS element.classList.toggle('x y') threw expected DOMException with code 5 | 51 PASS element.classList.toggle('x y') threw expected DOMException with code 5 |
| 52 PASS element.classList.toggle() threw exception TypeError: Failed to execute 'to
ggle' on 'DOMTokenList': 1 argument required, but only 0 present.. | 52 PASS element.classList.toggle() threw exception TypeError: Failed to execute 'to
ggle' on 'DOMTokenList': 1 argument required, but only 0 present.. |
| 53 Indexing | 53 Indexing |
| 54 PASS element.classList[0] is "x" | 54 PASS element.classList[0] is "x" |
| 55 PASS element.classList.item(0) is "x" | 55 PASS element.classList.item(0) is "x" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 PASS element.className is "a b" | 111 PASS element.className is "a b" |
| 112 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. |
| 113 PASS element.className is "a b" | 113 PASS element.className is "a b" |
| 114 PASS element.classList.remove() did not throw exception. | 114 PASS element.classList.remove() did not throw exception. |
| 115 PASS observer.takeRecords().length is 1 | 115 PASS observer.takeRecords().length is 1 |
| 116 PASS areArraysEqual(seen, ['a', 'b', 'c']) is true | 116 PASS areArraysEqual(seen, ['a', 'b', 'c']) is true |
| 117 PASS successfullyParsed is true | 117 PASS successfullyParsed is true |
| 118 | 118 |
| 119 TEST COMPLETE | 119 TEST COMPLETE |
| 120 | 120 |
| OLD | NEW |