Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1615)

Side by Side Diff: LayoutTests/accessibility/textarea-line-for-index.html

Issue 1073953002: Renamed layout tests in preparation for adding code to test contenteditable and role="textbox" in a… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.lineForI ndex(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698