blob: f37ecd6492aaa39d310b98c1a539f512955c048a [file] [log] [blame]
<!DOCTYPE html>
<title>Tests default DOM layout structure for a VTTRegion.</title>
<script src="../../media-controls.js"></script>
<script src="../../media-file.js"></script>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script>
async_test(function() {
var video = document.createElement('video');
video.src = findMediaFile('video', '../../content/test');
var testTrack = document.createElement('track');
testTrack.onload = this.step_func(function() {
video.oncanplaythrough = this.step_func_done(function() {
var region = textTrackRegionElement(video);
var container = textTrackRegionContainerElement(video);
assert_equals(region.children.length, 1);
assert_equals(region.children[0], container);
assert_equals(internals.shadowPseudoId(region), '-webkit-media-text-track-region');
assert_equals(internals.shadowPseudoId(container), '-webkit-media-text-track-region-container');
});
});
testTrack.src = '../captions-webvtt/captions-regions.vtt';
testTrack.kind = 'captions';
testTrack.default = true;
video.appendChild(testTrack);
});
</script>