Add first batch of tests for content change selection update #9799
This is a first batch of tests for selection updates triggered by content changes. It doesn't cover all cases mentioned in whatwg/html#2424, but covers some of the most common.
domenic left a comment
These look amazing to me. Some specific feedback, which we can do in a followup:
I'll go ahead and merge these since they're a great start.
Mar 6, 2018
1 check passed
Ah, I didn't think of selectionDirection. Thanks for the pointer, somehow I assumed every test was automated.
Re: the dirty flag, I meant because of your comment whatwg/html#2424 (comment) ("depending on the dirty value flag"). If it doesn't always behave the same way, it would be nice to test both cases, no?
Ah, right. No, I think since we're only testing changing the control's "relevant value", we can just use one mechanism of entangling relevant value and defaultValue/textContent. In other words, we can assume the UA implements the dirty value flag correctly, and just test its consequences that are relevant to this sphere.