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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/textfieldselection/selection.html

Issue 1984023002: Move web-platform-tests to wpt (part 1 of 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/textfieldselection/selection.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/textfieldselection/selection.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/textfieldselection/selection.html
deleted file mode 100644
index ca74b6a7217704b8ca3544e02e5e9f6a28ae8b89..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/textfieldselection/selection.html
+++ /dev/null
@@ -1,145 +0,0 @@
-<!DOCTYPE HTML>
-<title>test if select() API returns correct attributes</title>
-<meta charset="UTF-8">
-<meta name="timeout" content="long">
-<link rel="author" title="Koji Tashiro" href="mailto:koji.tashiro@gmail.com">
-<link rel="help" href="https://html.spec.whatwg.org/multipage/multipage/association-of-controls-and-forms.html#textFieldSelection">
-<script src="../../../../../../resources/testharness.js"></script>
-<script src="../../../../../../resources/testharnessreport.js"></script>
-
-<div id="log"></div>
-
-<script>
- var body = document.getElementsByTagName("body").item(0);
- var dirs = ['forward', 'backward', 'none'];
- var sampleText = "0123456789";
-
- var createInputElement = function(value) {
- var el = document.createElement("input");
- el.type = "text";
- el.value = value;
- body.appendChild(el);
- return el;
- };
-
- var createTextareaElement = function(value) {
- var el = document.createElement("textarea");
- el.value = value;
- body.appendChild(el);
- return el;
- };
-
-
- test(function() {
- var text = 'a';
- for (var i=0; i<255; i++) {
- var el = createInputElement(text);
- el.select();
- var selectionText = el.value.substring(el.selectionStart, el.selectionEnd);
- assert_equals(selectionText, text, "Selection text mismatched");
- el.parentNode.removeChild(el);
- text += 'a';
- }
- }, "test if selection text is correct for input");
-
-
- test(function() {
- var text = 'a';
- for (var i=0; i<255; i++) {
- var el = createTextareaElement(text);
- el.select();
- var selectionText = el.value.substring(el.selectionStart, el.selectionEnd);
- assert_equals(selectionText, text, "Selection text mismatched");
- el.parentNode.removeChild(el);
- text += 'a';
- }
- }, "test if selection text is correct for textarea");
-
-
- test(function() {
- var text = 'あ';
- for (var i=0; i<255; i++) {
- var el = createInputElement(text);
- el.select();
- var selectionText = el.value.substring(el.selectionStart, el.selectionEnd);
- assert_equals(selectionText, text, "Selection text mismatched");
- el.parentNode.removeChild(el);
- text += 'あ';
- }
- }, "test if non-ascii selection text is correct for input");
-
-
- test(function() {
- var text = 'あ';
- for (var i=0; i<255; i++) {
- var el = createTextareaElement(text);
- el.select();
- var selectionText = el.value.substring(el.selectionStart, el.selectionEnd);
- assert_equals(selectionText, text, "Selection text mismatched");
- el.parentNode.removeChild(el);
- text += 'あ';
- }
- }, "test if non-ascii selection text is correct for textarea");
-
-
- test(function() {
- var el = createInputElement(sampleText);
- // If there is no selection, then it must return the offset(in logical order)
- // to the character that immediately follows the text entry cursor.
- assert_equals(el.selectionStart, el.value.length, "SelectionStart offset without selection");
- el.select();
- assert_equals(el.selectionStart, 0, "SelectionStart offset");
- el.parentNode.removeChild(el);
- }, "test SelectionStart offset for input");
-
-
- test(function() {
- var el = createTextareaElement(sampleText);
- // If there is no selection, then it must return the offset(in logical order)
- // to the character that immediately follows the text entry cursor.
- assert_equals(el.selectionStart, el.value.length, "SelectionStart offset without selection");
- el.select();
- assert_equals(el.selectionStart, 0, "SelectionStart offset");
- el.parentNode.removeChild(el);
- }, "test SelectionStart offset for textarea");
-
-
- test(function() {
- var el = createInputElement(sampleText);
- // If there is no selection, then it must return the offset(in logical order)
- // to the character that immediately follows the text entry cursor.
- assert_equals(el.selectionEnd, el.value.length, "SelectionEnd offset without selection");
- el.select();
- assert_equals(el.selectionEnd, el.value.length, "SelectionEnd offset");
- el.parentNode.removeChild(el);
- }, "test SelectionEnd offset for input");
-
-
- test(function() {
- var el = createTextareaElement(sampleText);
- // If there is no selection, then it must return the offset(in logical order)
- // to the character that immediately follows the text entry cursor.
- assert_equals(el.selectionEnd, el.value.length, "SelectionEnd offset without selection");
- el.select();
- assert_equals(el.selectionEnd, el.value.length, "SelectionEnd offset");
- el.parentNode.removeChild(el);
- }, "test SelectionEnd offset for textarea");
-
-
- test(function() {
- var el = createInputElement(sampleText);
- assert_in_array(el.selectionDirection, dirs, "SelectionDirection");
- el.select();
- assert_in_array(el.selectionDirection, dirs, "SelectionDirection");
- el.parentNode.removeChild(el);
- }, "test SelectionDirection for input");
-
-
- test(function() {
- var el = createInputElement(sampleText);
- assert_in_array(el.selectionDirection, dirs, "SelectionDirection");
- el.select();
- assert_in_array(el.selectionDirection, dirs, "SelectionDirection");
- el.parentNode.removeChild(el);
- }, "test SelectionDirection for textarea");
-</script>

Powered by Google App Engine
This is Rietveld 408576698