diff options
Diffstat (limited to 'testing/web-platform/tests/webvtt/api/VTTCue/common.js')
-rw-r--r-- | testing/web-platform/tests/webvtt/api/VTTCue/common.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webvtt/api/VTTCue/common.js b/testing/web-platform/tests/webvtt/api/VTTCue/common.js new file mode 100644 index 0000000000..2c39352a84 --- /dev/null +++ b/testing/web-platform/tests/webvtt/api/VTTCue/common.js @@ -0,0 +1,8 @@ +function make_vtt_track(contents, test) { + var track_blob = new Blob([contents], { type: 'text/vtt' }); + var track_url = URL.createObjectURL(track_blob); + test.add_cleanup(function() { + URL.revokeObjectURL(track_url); + }); + return track_url; +} |