blob: bd82a33a8eec333a30a6a09069ae93a1fc0b1d7e [file] [log] [blame]
This tests that titleUIElement works correctly even when things change dynamically.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS axElement('control1').titleUIElement().isEqual(axElement('label1')) is true
PASS axElement('control2').titleUIElement().isEqual(axElement('label2')) is true
PASS hasTitleUIElement(axElement('control3')) is false
PASS document.getElementById('label3').setAttribute('for', 'control3'); axElement('control3').titleUIElement().isEqual(axElement('label3')) is true
PASS var label4Element = createLabelWithIdAndForAttribute('label4', 'control4'); hasTitleUIElement(axElement('control4')) is false
PASS document.getElementById('container').appendChild(label4Element); hasTitleUIElement(axElement('control4')) is true
PASS axElement('control4').titleUIElement().isEqual(axElement('label4')) is true
PASS label4Element.parentElement.removeChild(label4Element); hasTitleUIElement(axElement('control4')) is false
PASS hasTitleUIElement(axElement('control5')) is false
PASS reparentNodeIntoContainer(document.getElementById('control5'), document.getElementById('label5')); axElement('control5').titleUIElement() != null is true
PASS axElement('control5').titleUIElement().isEqual(axElement('label5')) is true
PASS axElement('control6').titleUIElement().isEqual(axElement('label6b')) is true
PASS newLabel6Element = createLabelWithIdAndForAttribute('label6a', 'control6'); document.body.insertBefore(newLabel6Element, document.body.firstChild); axElement('control6').titleUIElement().isEqual(axElement('label6a')) is true
PASS document.body.removeChild(newLabel6Element); axElement('control6').titleUIElement().isEqual(axElement('label6b')) is true
PASS successfullyParsed is true
TEST COMPLETE