chromium/third_party/blink/web_tests/media/track/text-track-is-reachable.html

<!DOCTYPE html>
<title>Ensure that a TextTrack won't be collected if it has a custom property.</title>
<script src="../../resources/gc.js"></script>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
async_test(function(t) {
    var video = document.createElement('video');
    var trackElement = document.createElement('track');

    trackElement.onload = t.step_func(function() {
        assert_equals(video.textTracks.length, 1);
        assert_equals(video.textTracks[0].kind, 'captions');

        video.textTracks[0].myProperty = 'egg salad!?';
        assert_equals(video.textTracks[0].myProperty, 'egg salad!?');

        gc();
        setTimeout(t.step_func_done(function() {
            assert_equals(video.textTracks[0].cues.length, 4);
            assert_equals(video.textTracks[0].myProperty, 'egg salad!?');
        }), 0);
    });

    trackElement.src = 'captions-webvtt/tc013-settings.vtt';
    trackElement.kind = 'captions';
    trackElement.default = true;
    video.appendChild(trackElement);
});
</script>