-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand coverage on value-changing/selection-changing tests #5610
Conversation
This is a follow-up to #5147. It tests the clarification at whatwg/html#2560. While there, it also adds additional textarea test cases for line-ending normalization; previously the test only tested an in-document textarea.
Notifying @ayg. (Learn how reviewing works.) |
LintPassed |
Firefox (nightly channel)Testing web-platform-tests at revision f1edca9 All results1 test ran/html/semantics/forms/textfieldselection/selection-after-content-change.html
|
Chrome (unstable channel)Testing web-platform-tests at revision f1edca9 All results1 test ran/html/semantics/forms/textfieldselection/selection-after-content-change.html
|
Codecov Report
@@ Coverage Diff @@
## master #5610 +/- ##
=======================================
Coverage 87.22% 87.22%
=======================================
Files 24 24
Lines 2418 2418
Branches 406 406
=======================================
Hits 2109 2109
Misses 239 239
Partials 70 70 Continue to review full report at Codecov.
|
function runInputTest(descriptor, elementFactory) { | ||
runTest(descriptor, elementFactory); | ||
|
||
test(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test fails, because in the "input in document" case elementFactory just keeps returning the same node without doing anything to its value. runTest will set the value to "hello", then to "hello2". Then this test will run and set it to a value that sanitizes to "hello", which is not the same as "hello2", so the cursor will get moved.
Presumably the "input in document" case needs to reset value just like the "input in document, with focus" case does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed!
@bzbarsky ping |
Sorry, didn't realize you were waiting on me. Looks good to me. |
This is a follow-up to #5147. It tests the clarification at whatwg/html#2560. While there, it also adds additional textarea test cases for line-ending normalization; previously the test only tested an in-document textarea.
@bzbarsky to review
This change is