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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html

Issue 2022203002: Import wpt@d510ec1abc30eee4c855c13842bc2f0dfa791f8b (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Message changed by testharness.js update 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/wpt/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html b/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html
index 06915a81a8b634be928a035537988518a36836ea..5f525736201fcbc7210561d913a954df231c50ed 100644
--- a/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html
+++ b/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html
@@ -116,6 +116,19 @@ test(function() {
},'input setSelectionRange(undefined,1)');
},"test of input.setSelectionRange");
+async_test(function() {
+ var q = false;
+ var input = document.getElementById("a");
+ input.addEventListener("select", this.step_func_done(function(e) {
+ assert_true(q, "event should be queued");
+ assert_true(e.isTrusted, "event is trusted");
+ assert_true(e.bubbles, "event bubbles");
+ assert_false(e.cancelable, "event is not cancelable");
+ }));
+ input.setSelectionRange(0, 1);
+ q = true;
+}, "input setSelectionRange fires a select event");
+
test(function() {
var textarea = document.getElementById("b");
test(function() {
@@ -221,4 +234,17 @@ test(function() {
assert_equals(textarea.selectionEnd, 1, "element.selectionStart should be 1");
},'textarea setSelectionRange(undefined,1)');
},"test of textarea.setSelectionRange");
+
+async_test(function() {
+ var q = false;
+ var textarea = document.getElementById("b");
+ textarea.addEventListener("select", this.step_func_done(function(e) {
+ assert_true(q, "event should be queued");
+ assert_true(e.isTrusted, "event is trusted");
+ assert_true(e.bubbles, "event bubbles");
+ assert_false(e.cancelable, "event is not cancelable");
+ }));
+ textarea.setSelectionRange(0, 1);
+ q = true;
+}, "textarea setSelectionRange fires a select event");
</script>

Powered by Google App Engine
This is Rietveld 408576698