Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some shadow DOM tests use common "testcommon.js" file, which
contains "createTestMediaPlayer()" function which creates fake
media player with shadow roots for tests to use.
The media player assumed that
<input>
tag can contain some othertags like
<input type="range"><div>...</div></input>
, which is nottrue. Usually
<input>
doesn't require its closing tag, thusthe
<div>
inside<input>
becomes just a sibling of the<input>
.The tests which used
crateTestMediaPlayer()
depended on theDOM tree structure with the wrong assumption (given above),
so as a 1st step I replaced the
<input>
with<div tabindex="0">
sso that we keep the tree structure as is while the element is
clickable.
Now the tree structure looks like:
On the 2nd step, I fixed the test expectations. These tests
(events/event-dispatch/test-001.html and
events/event-retargeting/test-004.html) relied on the fact that
<input>
is implemented using user-agent shadow, thus e.g.a click event on
#volume-slider-thumb
, will be retargetedThis is no longer true as all elements inside the whole control
is implemented by plain
<div>
s, and#timeline
and#volume-slider
cannot be a shadow boundary. These expectations are adjusted.