Tests the htmlFor attribute and its properties. On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - Tests from http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/ PASS String(element.htmlFor) is "y" PASS element.htmlFor.length is 0 PASS element.htmlFor.length is 1 PASS element.htmlFor.length is 2 PASS element.htmlFor.length is 2 PASS element.htmlFor.toString() is "x" PASS element.htmlFor.toString() is "x" PASS element.htmlFor.toString() is "x x" PASS element.htmlFor.toString() is "y x" PASS element.htmlFor.toString() is "" PASS element.htmlFor.toString() is "" PASS element.htmlFor.toString() is " y y " PASS element.htmlFor.toString() is "y" - Ensure that we can handle empty form attribute correctly PASS list.value is "x" PASS list.value is "" PASS element.htmlFor.contains('x') is false PASS element.htmlFor[1] is null PASS element.htmlFor.contains('x') is true PASS element.htmlFor[1] is null - Testing add in presence of trailing white spaces. PASS element.htmlFor.toString() is "x y" PASS element.htmlFor.toString() is "x\t y" PASS element.htmlFor.toString() is " y" - Test invalid tokens PASS element.htmlFor.contains('') threw expected DOMException with code 12 PASS element.htmlFor.contains('x y') threw expected DOMException with code 5 PASS element.htmlFor.add('') threw expected DOMException with code 12 PASS element.htmlFor.add('x y') threw expected DOMException with code 5 PASS element.htmlFor.remove('') threw expected DOMException with code 12 PASS element.htmlFor.remove('x y') threw expected DOMException with code 5 PASS element.htmlFor.toggle('') threw expected DOMException with code 12 PASS element.htmlFor.toggle('x y') threw expected DOMException with code 5 - Indexing PASS element.htmlFor[0] is "x" PASS element.htmlFor.item(0) is "x" PASS element.htmlFor[1] is "x" PASS element.htmlFor.item(1) is "x" PASS element.htmlFor[1] is "y" PASS element.htmlFor.item(1) is "y" PASS element.htmlFor[0] is null PASS element.htmlFor.item(0) is null PASS element.htmlFor[4] is null PASS element.htmlFor.item(4) is null PASS element.htmlFor[-1] is undefined. PASS element.htmlFor.item(-1) is null - Test case since DOMTokenList is case sensitive PASS element.htmlFor.contains('x') is true PASS element.htmlFor.contains('X') is false PASS element.htmlFor[0] is "x" PASS element.htmlFor.contains('X') is true PASS element.htmlFor.contains('x') is false PASS element.htmlFor[0] is "X" - Testing whitespace PASS element.htmlFor.length is 2 PASS element.htmlFor.length is 2 PASS element.htmlFor.length is 2 PASS element.htmlFor.length is 2 PASS element.htmlFor.length is 2 - DOMSettableTokenList presence and type PASS 'undefined' != typeof DOMSettableTokenList is true PASS typeof DOMSettableTokenList.prototype is "object" PASS typeof element.htmlFor is "object" PASS element.htmlFor.constructor is DOMSettableTokenList PASS element.htmlFor === element.htmlFor is true PASS successfullyParsed is true TEST COMPLETE