OLD | NEW |
1 if (window.testRunner) { | 1 if (window.testRunner) { |
2 testRunner.waitUntilDone(); | 2 testRunner.waitUntilDone(); |
3 testRunner.dumpAsText(); | 3 testRunner.dumpAsText(); |
4 } | 4 } |
5 | 5 |
6 var consoleOutput = null; | 6 var consoleOutput = null; |
7 var stopTest = false; | 7 var stopTest = false; |
8 var focusCount = 0; | 8 var focusCount = 0; |
9 var blurCount = 0; | 9 var blurCount = 0; |
10 var focusedElem = null; | 10 var focusedElem = null; |
11 var failedTestCount = 0; | 11 var failedTestCount = 0; |
12 | 12 |
13 var tagNamesAlwaysFocused = ["A", | 13 var tagNamesAlwaysFocused = ["A", |
14 "AREA", | 14 "AREA", |
15 "BUTTON", | 15 "BUTTON", |
16 "IFRAME", | 16 "IFRAME", |
17 "INPUT", | 17 "INPUT", |
18 "ISINDEX", | |
19 "SELECT", | 18 "SELECT", |
20 "TEXTAREA", | 19 "TEXTAREA", |
21 "AUDIO", | 20 "AUDIO", |
22 "VIDEO"]; | 21 "VIDEO"]; |
23 | 22 |
24 var tagNamesTransferFocused = ["LABEL"]; // labels always transfer focus to the
labeled element | 23 var tagNamesTransferFocused = ["LABEL"]; // labels always transfer focus to the
labeled element |
25 | 24 |
26 var noDisplayTagNamesWithFocus = ["AREA"]; // AREA elements can get focus, but
are not displayed. | 25 var noDisplayTagNamesWithFocus = ["AREA"]; // AREA elements can get focus, but
are not displayed. |
27 | 26 |
28 function printToConsole(str) | 27 function printToConsole(str) |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 failedTestCount++; | 127 failedTestCount++; |
129 printToConsole(elem.id+" FAILED - was " + (focusedElem ? "" : " not ") +
" focused but focus " + (elemThatShouldFocus ? " was " : " wasn\'t") + " expect
ed"); | 128 printToConsole(elem.id+" FAILED - was " + (focusedElem ? "" : " not ") +
" focused but focus " + (elemThatShouldFocus ? " was " : " wasn\'t") + " expect
ed"); |
130 if (elemThatShouldFocus && focusedElem) | 129 if (elemThatShouldFocus && focusedElem) |
131 printToConsole("elemThatShouldFocus is <"+elemThatShouldFocus.tagNam
e+"> "+elemThatShouldFocus.id+", focusedElem is <"+focusedElem.tagName+"> "+focu
sedElem.id); | 130 printToConsole("elemThatShouldFocus is <"+elemThatShouldFocus.tagNam
e+"> "+elemThatShouldFocus.id+", focusedElem is <"+focusedElem.tagName+"> "+focu
sedElem.id); |
132 if (!elemThatShouldFocus) | 131 if (!elemThatShouldFocus) |
133 printToConsole("elemThatShouldFocus is null, focusedElem is <"+focus
edElem.tagName+"> "+focusedElem.id); | 132 printToConsole("elemThatShouldFocus is null, focusedElem is <"+focus
edElem.tagName+"> "+focusedElem.id); |
134 if (!focusedElem) | 133 if (!focusedElem) |
135 printToConsole("elemThatShouldFocus is <"+elemThatShouldFocus.tagNam
e+"> "+elemThatShouldFocus.id+", focusedElem is null"); | 134 printToConsole("elemThatShouldFocus is <"+elemThatShouldFocus.tagNam
e+"> "+elemThatShouldFocus.id+", focusedElem is null"); |
136 } | 135 } |
137 } | 136 } |
OLD | NEW |