<!DOCTYPE html>
<title>HTMLTrackElement 'src' attribute changed, load pending, 'error' handler mutates</title>
<link rel="help" href="https://html.spec.whatwg.org/multipage/media.html#start-the-track-processing-model">
<link rel="help" href="https://crbug.com/1374341">
<video></video>
<script>
const video = document.querySelector('video');
video.style.visibility = 'collapse';
video.setAttribute('crossorigin', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
const track = document.createElement('track');
track.src = 'x';
track.track.mode = 'hidden';
video.appendChild(track);
track.onerror = () => {
for (let i = 0; i < 10; ++i)
video.setAttribute('foo' + i, 'bar');
};
setTimeout(() => {
track.src = 'y';
}, 0);
</script>