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

Side by Side Diff: LayoutTests/accessibility/textarea-insertion-point-line-number.html

Issue 258063005: Blink does not respect input.selectionStart and input.selectionEnd for some cases (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressing changes asked in previous patch Created 6 years, 5 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
1 <html> 1 <html>
2 <script src="../resources/js-test.js"></script> 2 <script src="../resources/js-test.js"></script>
3 <script> 3 <script>
4 if (window.testRunner) 4 if (window.testRunner)
5 testRunner.dumpAsText(); 5 testRunner.dumpAsText();
6 </script> 6 </script>
7 <body> 7 <body>
8 <div id="console"></div> 8 <div id="console"></div>
9 <textarea name="area1" id="area1" rows="5" cols="40"> 9 <textarea name="area1" id="area1" rows="5" cols="40">
10 line 1 10 line 1
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 var contenteditableDiv = document.getElementById("contenteditable-di v"); 43 var contenteditableDiv = document.getElementById("contenteditable-di v");
44 contenteditableDiv.focus(); 44 contenteditableDiv.focus();
45 var contenteditableAXUIElement = accessibilityController.focusedElem ent; 45 var contenteditableAXUIElement = accessibilityController.focusedElem ent;
46 46
47 var contenteditableLine1 = document.getElementById("contenteditable- line1"); 47 var contenteditableLine1 = document.getElementById("contenteditable- line1");
48 shouldBe("window.getSelection().setBaseAndExtent(contenteditableLine 1, 1, contenteditableLine1, 1); " + 48 shouldBe("window.getSelection().setBaseAndExtent(contenteditableLine 1, 1, contenteditableLine1, 1); " +
49 "contenteditableAXUIElement.insertionPointLineNumber;", "0" ); 49 "contenteditableAXUIElement.insertionPointLineNumber;", "0" );
50 50
51 var contenteditableLine2 = document.getElementById("contenteditable- line2"); 51 var contenteditableLine2 = document.getElementById("contenteditable- line2");
52 shouldBe("contenteditableLine2.selectionStart = 1; contenteditableLi ne2.selectionEnd = 1;" + 52 shouldBe("contenteditableLine2.selectionStart = 1; contenteditableLi ne2.selectionEnd = 1;" +
53 "contenteditableAXUIElement.insertionPointLineNumber;", "-1 "); 53 "contenteditableAXUIElement.insertionPointLineNumber;", "0" );
54 54
55 var contenteditableLine3 = document.getElementById("contenteditable- line3"); 55 var contenteditableLine3 = document.getElementById("contenteditable- line3");
56 shouldBe("window.getSelection().setBaseAndExtent(contenteditableLine 3, 1, contenteditableLine3, 1); " + 56 shouldBe("window.getSelection().setBaseAndExtent(contenteditableLine 3, 1, contenteditableLine3, 1); " +
57 "contenteditableAXUIElement.insertionPointLineNumber;", "2" ); 57 "contenteditableAXUIElement.insertionPointLineNumber;", "2" );
58 58
59 contenteditableLine2.focus(); 59 contenteditableLine2.focus();
60 var textareaAXUIElement = accessibilityController.focusedElement; 60 var textareaAXUIElement = accessibilityController.focusedElement;
61 shouldBe("textareaAXUIElement.insertionPointLineNumber", "0"); 61 shouldBe("textareaAXUIElement.insertionPointLineNumber", "0");
62 } 62 }
63 </script> 63 </script>
64 </body> 64 </body>
65 </html> 65 </html>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/accessibility/textarea-insertion-point-line-number-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698