blob: 214f5d8aeeaa11849a5ec82b24a0858f95aedad9 [file] [log] [blame]
<!DOCTYPE html>
<title>Tests default DOM layout structure for a VTTRegion.</title>
<script src="../../media-controls.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 = '../../content/test.ogv';
video.autoplay = true;
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>