<!DOCTYPE html>
<title>Ensure that a TextTrackCue 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[0].cues.length, 4);
assert_equals(video.textTracks[0].cues[1].startTime, 31);
video.textTracks[0].cues[1].myProperty = 'tuna salad?';
assert_equals(video.textTracks[0].cues[1].myProperty, 'tuna salad?');
gc();
setTimeout(t.step_func_done(function() {
assert_equals(video.textTracks[0].cues.length, 4);
assert_equals(video.textTracks[0].cues[1].myProperty, 'tuna salad?');
}), 0);
});
trackElement.src = 'captions-webvtt/tc013-settings.vtt';
trackElement.kind = 'captions';
trackElement.default = true;
video.appendChild(trackElement);
});
</script>