Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / textarea-line-for-index.html
1 <html>
2 <script>
3     if (window.testRunner)
4         testRunner.dumpAsText();
5 </script>
6 <body>
7     
8     <div id="result"></div>
9     
10     <textarea name="area1" id="area1" rows="5" cols="40">
11 line 1
12 line 2
13 line 3
14     </textarea>
15
16     <script>
17         if (window.accessibilityController) {
18             var result = document.getElementById("result");
19
20             var area1 = document.getElementById("area1");
21             area1.focus();
22
23             for (var k = 0; k < 3; k++) {
24                 var index = (k*7);
25                 var lineNumber = accessibilityController.focusedElement.lineForIndex(index);
26                 if (lineNumber == k) {
27                     result.innerText += "Test:" + k + ") Line For Index: Pass [" + index + "->" + lineNumber + "]\n";       
28                 }
29                 else {
30                     result.innerText += "Test:" + k + ") Line For Index: Fail [" + index + "->" + lineNumber + "]\n";       
31                 }
32             }
33         }
34     </script>
35 </body>
36 </html>