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

Unified Diff: LayoutTests/accessibility/textarea-selected-range.html

Issue 1050123003: Rewrote password layout test and removed obsolete tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Renamed some more tests for consistency. 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/accessibility/textarea-selected-range.html
diff --git a/LayoutTests/accessibility/textarea-selected-range.html b/LayoutTests/accessibility/textarea-selected-range.html
deleted file mode 100644
index 28fac54218c9ae4ecda3dfe8e3b5357d6030bfb0..0000000000000000000000000000000000000000
--- a/LayoutTests/accessibility/textarea-selected-range.html
+++ /dev/null
@@ -1,92 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <script src="../resources/js-test.js"></script>
- </head>
- <body>
-
- <textarea id="textarea" rows="3" cols="40">
-Line 1
-Line 2
-Line 3
- </textarea>
-
- <textarea id="textarea-empty" rows="5" cols="40"></textarea>
-
- <p id="description"></p>
- <div id="console"></div>
-
- <script>
- description("This tests that text selection is reported correctly for textarea elements.");
-
- if (window.accessibilityController) {
-
- var textarea = document.getElementById('textarea');
- textarea.focus();
- var textareaAccessible =
- accessibilityController.accessibleElementById('textarea');
-
- // Select the entire contents.
- textarea.select();
- shouldBeZero("textareaAccessible.selectionStart");
- shouldBeEqualToNumber("textareaAccessible.selectionEnd",
- textarea.textLength);
- shouldBeZero("textareaAccessible.selectionStartLineNumber");
- shouldBeEqualToNumber(
- "textareaAccessible.selectionEndLineNumber",
- 3);
-
- // Select entire lines.
- for (var lineNumber = 0; lineNumber < 3; ++lineNumber) {
- for (var directionIndex = 0; directionIndex < 2;
- ++directionIndex) {
- var selectionStart = lineNumber * 7;
- var selectionEnd = (lineNumber + 1) * 7;
- var direction = 'forward';
- if (directionIndex)
- direction = 'backward';
-
- textarea.setSelectionRange(selectionStart, selectionEnd,
- direction);
- shouldBeEqualToNumber("textareaAccessible.selectionStart",
- selectionStart);
- shouldBeEqualToNumber("textareaAccessible.selectionEnd",
- selectionEnd);
- shouldBeEqualToNumber(
- "textareaAccessible.selectionStartLineNumber",
- lineNumber);
- shouldBeEqualToNumber(
- "textareaAccessible.selectionEndLineNumber",
- lineNumber + 1);
- }
- }
-
- var emptyTextarea = document.getElementById('textarea-empty');
- emptyTextarea.focus();
- // Each textarea has its own independent selection.
- shouldBeEqualToNumber("textareaAccessible.selectionStart", 14);
- shouldBeEqualToNumber("textareaAccessible.selectionEnd", 21);
- shouldBeEqualToNumber(
- "textareaAccessible.selectionStartLineNumber", 2);
- shouldBeEqualToNumber(
- "textareaAccessible.selectionEndLineNumber", 3);
-
- var emptyTextareaAccessible =
- accessibilityController.accessibleElementById('textarea-empty');
- shouldBeZero("emptyTextareaAccessible.selectionStart");
- shouldBeZero("emptyTextareaAccessible.selectionEnd");
- shouldBeZero("emptyTextareaAccessible.selectionStartLineNumber");
- shouldBeZero("emptyTextareaAccessible.selectionEndLineNumber");
-
- // Setting an invalid selection should not be visible.
- emptyTextarea.setSelectionRange(1, 1);
- shouldBeZero("emptyTextareaAccessible.selectionStart");
- shouldBeZero("emptyTextareaAccessible.selectionEnd");
- shouldBeZero("emptyTextareaAccessible.selectionStartLineNumber");
- shouldBeZero("emptyTextareaAccessible.selectionEndLineNumber");
-
- }
- </script>
-
- </body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698