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

Unified Diff: LayoutTests/fast/forms/setrangetext-within-events.html

Issue 548413002: Revert of Fix to keep the selection of the text field in input element after setSelectionRange... (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | LayoutTests/fast/forms/setrangetext-within-events-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/setrangetext-within-events.html
diff --git a/LayoutTests/fast/forms/setrangetext-within-events.html b/LayoutTests/fast/forms/setrangetext-within-events.html
deleted file mode 100644
index f5ea6b577874da468a87d91dd731a9e821f4729f..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/forms/setrangetext-within-events.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE html>
-<script src="../../resources/js-test.js"></script>
-<script>
- description("This tests the selection of the text field after setSelectionRange is called");
- window.onload = function() {
- if (window.eventSender) {
- doSetSelectionRange('focus');
- doSetSelectionRange('mousedown');
- doSetSelectionRange('mouseup');
- doSetSelectionRange('click');
- }
- }
-
- function doSetSelectionRange(event) {
- debug(event + ' test :');
- var textfield = document.getElementById('textfield');
- textfield.setSelectionRange(0, 1);
- var tx = textfield.offsetLeft + 4;
- var ty = textfield.offsetTop + 4;
-
- textfield.addEventListener(event, setSelectionRange);
- eventSender.mouseMoveTo(tx, ty);
- eventSender.mouseDown();
- eventSender.mouseUp();
- if (event == 'mousedown') {
- shouldBe('textfield.selectionStart', '0');
- shouldBe('textfield.selectionEnd', '0');
- } else {
- shouldBe('textfield.selectionStart', '0');
- shouldBe('textfield.selectionEnd', '5');
- }
- eventSender.mouseMoveTo(tx, ty + 30);
- eventSender.mouseDown();
- eventSender.mouseUp();
- debug('the selection should be cleared');
- shouldBe('textfield.selectionStart', '0');
- shouldBe('textfield.selectionEnd', '0');
- textfield.removeEventListener(event, setSelectionRange);
- }
-
- function setSelectionRange(e) {
- var textfield = document.getElementById('textfield');
- textfield.setSelectionRange(0, textfield.value.length);
- }
-</script>
-<input type="text" value="value" id="textfield"></input>
« no previous file with comments | « no previous file | LayoutTests/fast/forms/setrangetext-within-events-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698