blob: c324bcd847d6f9c6f1a0f356989c85c955382d8c [file] [log] [blame]
This tests that if an in-page link is activated, focus control is transferred to the fragment if possible.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Verify that the focus is on the link.
PASS document.activeElement is link1
Click the link and verify that focus has moved to the fragment.
PASS document.activeElement is document.getElementById('fragment1')
Move focus back to the link and verify.
PASS document.activeElement is link1
Send an enter key event which should also trigger focus to move to the fragment.
PASS document.activeElement is document.getElementById('fragment1')
Activate a link that does not have a focusable fragment and verify that the currently focused element is unfocused.
PASS document.activeElement is link2
PASS document.activeElement is document.body
Activate a link that does not refer to an existing fragment and verify that the currently focused element remains focused.
PASS document.activeElement is link3
PASS document.activeElement is link3
Activate a link to #top and verify that the link remains focused
PASS document.activeElement is link4
PASS document.activeElement is link4
Activate a link to # and verify that the link remains focused
PASS document.activeElement is link5
PASS document.activeElement is link5
Activate a link to an INPUT elemnt, verify that the INPUT is editable
PASS document.activeElement is link6
PASS document.activeElement is input1
PASS input1.value is "abcXdef"
PASS successfullyParsed is true
TEST COMPLETE
link1 link2 link3 link4 link5 link6
fragment1
fragment2