fune/dom/media/test/marionette/yttest/until_end_test.js
Tarek Ziadé 63c5bb98b4 Bug 1541189 - Fix intermittents on stream test - r=whimboo
Tweak the Streaming test to fix intermittents.

Differential Revision: https://phabricator.services.mozilla.com/D26288

--HG--
extra : moz-landing-system : lando
2019-04-08 13:04:20 +00:00

20 lines
474 B
JavaScript

%(force_hd)s
const resolve = arguments[arguments.length - 1];
// this script is injected by marionette to collect metrics
var video = document.getElementsByTagName("video")[0];
if (!video) {
return "Can't find the video tag";
}
video.addEventListener("ended", () => {
%(video_playback_quality)s
%(debug_info)s
// Pausing after we get the debug info so
// we can also look at in/out data in buffers
video.pause();
}, {once: true}
);
video.play();