aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-11-20 19:31:52 -0600
committerGitHub <noreply@github.com>2017-11-20 19:31:52 -0600
commit979793593269ed1197e15adeb0b029662ff9d460 (patch)
treecbaea6619f34e6cbf26b5dcfe3639070a6233369 /tests
parente2bc0f017cfd24734777f64d8607b23dbe9552d7 (diff)
parent6beda3c76103ee8391b961b457f3e3e364e5f8fe (diff)
downloadservo-979793593269ed1197e15adeb0b029662ff9d460.tar.gz
servo-979793593269ed1197e15adeb0b029662ff9d460.zip
Auto merge of #19272 - jonleighton:issue-19171-2, r=jdm
Further changes in relation to #19171 <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19272) <!-- Reviewable:end -->
Diffstat (limited to 'tests')
-rw-r--r--tests/wpt/metadata/MANIFEST.json2
-rw-r--r--tests/wpt/metadata/html/semantics/forms/textfieldselection/selection-start-end.html.ini28
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end.html18
3 files changed, 32 insertions, 16 deletions
diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json
index eaff0e74356..97237dbbde9 100644
--- a/tests/wpt/metadata/MANIFEST.json
+++ b/tests/wpt/metadata/MANIFEST.json
@@ -542600,7 +542600,7 @@
"testharness"
],
"html/semantics/forms/textfieldselection/selection-start-end.html": [
- "e38a79075e27780327f49e7ae9cadd2558165eac",
+ "3fd1c942f7ac3ed3097bbd1ec89db15fb0805476",
"testharness"
],
"html/semantics/forms/textfieldselection/selection-value-interactions.html": [
diff --git a/tests/wpt/metadata/html/semantics/forms/textfieldselection/selection-start-end.html.ini b/tests/wpt/metadata/html/semantics/forms/textfieldselection/selection-start-end.html.ini
index 9947ba411b7..cc755ee3c3a 100644
--- a/tests/wpt/metadata/html/semantics/forms/textfieldselection/selection-start-end.html.ini
+++ b/tests/wpt/metadata/html/semantics/forms/textfieldselection/selection-start-end.html.ini
@@ -1,17 +1,35 @@
[selection-start-end.html]
type: testharness
- [onselect should fire when selectionStart is changed]
+ [Setting selectionStart to a value larger than selectionEnd should increase selectionEnd]
expected: FAIL
- [onselect should fire when selectionEnd is changed]
+ [Setting selectionEnd to a value smaller than selectionStart should decrease selectionStart]
expected: FAIL
- [Setting selectionStart to a value larger than selectionEnd should increase selectionEnd]
+ [selectionStart edge-case values]
expected: FAIL
- [Setting selectionEnd to a value smaller than selectionStart should decrease selectionStart]
+ [Initial .value set on textarea-appended should set selectionStart to end of value]
expected: FAIL
- [selectionStart edge-case values]
+ [Initial .value set on textarea-not-appended should set selectionStart to end of value]
+ expected: FAIL
+
+ [Initial .value set on textarea-appended-prefocused should set selectionStart to end of value]
+ expected: FAIL
+
+ [Initial .value set on textarea-not-appended-prefocused should set selectionStart to end of value]
+ expected: FAIL
+
+ [Initial .value set on textarea-appended should set selectionEnd to end of value]
+ expected: FAIL
+
+ [Initial .value set on textarea-not-appended should set selectionEnd to end of value]
+ expected: FAIL
+
+ [Initial .value set on textarea-appended-prefocused should set selectionEnd to end of value]
+ expected: FAIL
+
+ [Initial .value set on textarea-not-appended-prefocused should set selectionEnd to end of value]
expected: FAIL
diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end.html b/tests/wpt/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end.html
index 0638380bf1d..17fd28c2ef6 100644
--- a/tests/wpt/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end.html
+++ b/tests/wpt/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end.html
@@ -59,10 +59,16 @@
assert_equals(testValue.length, 10);
}, "Sanity check for testValue length; if this fails, variou absolute offsets in the test below need to be adjusted to be less than testValue.length");
+ for (let prop of ["selectionStart", "selectionEnd"]) {
+ for (let el of createTestElements(testValue)) {
+ test(function() {
+ assert_equals(el.selectionStart, testValue.length);
+ }, `Initial .value set on ${el.id} should set ${prop} to end of value`);
+ }
+ }
+
test(function() {
for (let el of createTestElements(testValue)) {
- assert_equals(el.selectionStart, testValue.length,
- `Initial .value set on ${el.id} should set selectionStart to end of value`);
var t = async_test(`onselect should fire when selectionStart is changed on ${el.id}`);
el.onselect = t.step_func_done(function(e) {
assert_equals(e.type, "select");
@@ -74,8 +80,6 @@
test(function() {
for (let el of createTestElements(testValue)) {
- assert_equals(el.selectionEnd, testValue.length,
- `Initial .value set on ${el.id} should set selectionEnd to end of value`);
var t = async_test(`onselect should fire when selectionEnd is changed on ${el.id}`);
el.onselect = t.step_func_done(function(e) {
assert_equals(e.type, "select");
@@ -87,8 +91,6 @@
test(function() {
for (let el of createTestElements(testValue)) {
- assert_equals(el.selectionStart, testValue.length,
- `Initial .value set on ${el.id} should set selectionStart to end of value`);
el.selectionStart = 0;
el.selectionEnd = 5;
el.selectionStart = 8;
@@ -100,10 +102,6 @@
test(function() {
for (let el of createTestElements(testValue)) {
- assert_equals(el.selectionStart, testValue.length,
- `Initial .value set on ${el.id} should set selectionStart to end of value`);
- assert_equals(el.selectionEnd, testValue.length,
- `Initial .value set on ${el.id} should set selectionEnd to end of value`);
el.selectionStart = 8;
el.selectionEnd = 5;
assert_equals(el.selectionStart, 5, `selectionStart on ${el.id}`);