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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/select-event-on-input-and-textarea.html

Issue 2735633006: INPUT/TEXTAREA elements: Dispatch 'select' event only if text selection is changed. (Closed)
Patch Set: Remove throttling Created 3 years, 9 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/fast/events/select-event-on-input-and-textarea.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/select-event-on-input-and-textarea.html b/third_party/WebKit/LayoutTests/fast/events/select-event-on-input-and-textarea.html
deleted file mode 100644
index e0509176853abd4749f1f130d3d2c859f2184a83..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/events/select-event-on-input-and-textarea.html
+++ /dev/null
@@ -1,99 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../../resources/js-test.js"></script>
-</head>
-<body onload="startTests()">
-<input id="inputId" value="abcd"></input>
-<textarea id="textAreaId">abcd</textarea>
-<script>
-description("Test select event is triggered on input and textarea Elements.");
-var input = document.getElementById("inputId");
-var textarea = document.getElementById("textAreaId");
-var jsTestIsAsync = true;
-var currentCase;
-var lastCase;
-
-var tests = [
- function() {
- input.focus();
- return "input.focus()";
- },
- function() {
- input.select();
- return "input.select()";
- },
- function() {
- input.setSelectionRange(1, 2);
- return "input.setSelectionRange()";
- },
- function() {
- input.setRangeText("efgh");
- return "input.setRangeText()";
- },
- function() {
- input.selectionStart = 1;
- return "input.selectionStart";
- },
- function() {
- input.selectionEnd = 3;
- return "input.selectionEnd";
- },
- function() {
- input.selectionDirection = "forward";
- return "input.selectionDirection";
- },
- function() {
- textarea.focus();
- return "textarea.focus()";
- },
- function() {
- textarea.select();
- return "textarea.select()";
- },
- function() {
- textarea.setSelectionRange(1, 2);
- return "textarea.setSelectionRange()";
- },
- function() {
- textarea.setRangeText("efgh");
- return "textarea.setRangeText()";
- },
- function() {
- textarea.selectionStart = 1;
- return "textarea.selectionStart";
- },
- function() {
- textarea.selectionEnd = 3;
- return "textarea.selectionEnd";
- },
- function() {
- textarea.selectionDirection = "forward";
- return "textarea.selectionDirection";
- }
-];
-
-function runNext() {
- if (tests.length <= 0)
- finishJSTest();
- currentCase = tests.shift()();
-}
-
-function handleSelectEvent() {
- if (lastCase == currentCase) {
- testFailed("The above test dispatched mulitiple select events.");
- return;
- }
- testPassed(currentCase);
- lastCase = currentCase;
- setTimeout(runNext, 0);
-}
-
-function startTests() {
- input.addEventListener("select", handleSelectEvent);
- textarea.addEventListener("select", handleSelectEvent);
- runNext();
-}
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698