| OLD | NEW |
| (Empty) |
| 1 Tests the htmlFor attribute and its properties. | |
| 2 | |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | |
| 4 | |
| 5 | |
| 6 - Tests from http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/ | |
| 7 PASS element.htmlFor.value is "x" | |
| 8 PASS String(element.htmlFor) is "x" | |
| 9 PASS element.htmlFor.value is "y" | |
| 10 PASS String(element.htmlFor) is "y" | |
| 11 PASS element.htmlFor.length is 0 | |
| 12 PASS element.htmlFor.length is 1 | |
| 13 PASS element.htmlFor.length is 2 | |
| 14 PASS element.htmlFor.length is 2 | |
| 15 PASS element.htmlFor.toString() is "x" | |
| 16 PASS element.htmlFor.toString() is "x" | |
| 17 PASS element.htmlFor.toString() is "x x" | |
| 18 PASS element.htmlFor.toString() is "y x" | |
| 19 PASS element.htmlFor.toString() is "" | |
| 20 PASS element.htmlFor.toString() is "" | |
| 21 PASS element.htmlFor.toString() is "y y" | |
| 22 PASS element.htmlFor.toString() is "y" | |
| 23 - Ensure that we can handle empty form attribute correctly | |
| 24 PASS list.value is "x" | |
| 25 PASS list.value is "" | |
| 26 PASS element.htmlFor.contains('x') is false | |
| 27 PASS element.htmlFor[1] is undefined. | |
| 28 PASS element.htmlFor.contains('x') is true | |
| 29 PASS element.htmlFor[1] is undefined. | |
| 30 - Testing add in presence of trailing white spaces. | |
| 31 PASS element.htmlFor.toString() is "x y" | |
| 32 PASS element.htmlFor.toString() is "x\ty" | |
| 33 PASS element.htmlFor.toString() is " y" | |
| 34 - Test invalid tokens | |
| 35 PASS element.htmlFor.contains('') threw expected DOMException with code 12 | |
| 36 PASS element.htmlFor.contains('x y') threw expected DOMException with code 5 | |
| 37 PASS element.htmlFor.add('') threw expected DOMException with code 12 | |
| 38 PASS element.htmlFor.add('x y') threw expected DOMException with code 5 | |
| 39 PASS element.htmlFor.remove('') threw expected DOMException with code 12 | |
| 40 PASS element.htmlFor.remove('x y') threw expected DOMException with code 5 | |
| 41 PASS element.htmlFor.toggle('') threw expected DOMException with code 12 | |
| 42 PASS element.htmlFor.toggle('x y') threw expected DOMException with code 5 | |
| 43 - Indexing | |
| 44 PASS element.htmlFor[0] is "x" | |
| 45 PASS element.htmlFor.item(0) is "x" | |
| 46 PASS element.htmlFor[1] is "x" | |
| 47 PASS element.htmlFor.item(1) is "x" | |
| 48 PASS element.htmlFor[1] is "y" | |
| 49 PASS element.htmlFor.item(1) is "y" | |
| 50 PASS element.htmlFor[0] is undefined. | |
| 51 PASS element.htmlFor.item(0) is null | |
| 52 PASS element.htmlFor[4] is undefined. | |
| 53 PASS element.htmlFor.item(4) is null | |
| 54 PASS element.htmlFor[-1] is undefined. | |
| 55 PASS element.htmlFor.item(-1) is null | |
| 56 - Test case since DOMTokenList is case sensitive | |
| 57 PASS element.htmlFor.contains('x') is true | |
| 58 PASS element.htmlFor.contains('X') is false | |
| 59 PASS element.htmlFor[0] is "x" | |
| 60 PASS element.htmlFor.contains('X') is true | |
| 61 PASS element.htmlFor.contains('x') is false | |
| 62 PASS element.htmlFor[0] is "X" | |
| 63 - Testing whitespace | |
| 64 PASS element.htmlFor.length is 2 | |
| 65 PASS element.htmlFor.length is 2 | |
| 66 PASS element.htmlFor.length is 2 | |
| 67 PASS element.htmlFor.length is 2 | |
| 68 PASS element.htmlFor.length is 2 | |
| 69 - DOMSettableTokenList presence and type | |
| 70 PASS 'undefined' != typeof DOMSettableTokenList is true | |
| 71 PASS typeof DOMSettableTokenList.prototype is "object" | |
| 72 PASS typeof element.htmlFor is "object" | |
| 73 PASS element.htmlFor.constructor is DOMSettableTokenList | |
| 74 PASS element.htmlFor === element.htmlFor is true | |
| 75 PASS successfullyParsed is true | |
| 76 | |
| 77 TEST COMPLETE | |
| 78 | |
| OLD | NEW |