Make poster frame load blocker independent from media element's one

This commit is contained in:
Fernando Jiménez Moreno 2019-01-14 22:32:12 +01:00
parent 4e286ffa96
commit fde7d4589f
3 changed files with 22 additions and 8 deletions

View file

@ -32838,7 +32838,7 @@
"testharness"
],
"mozilla/video_poster_frame.html": [
"8b321ef5d82e0de6e16625ecd41190abc00bacb6",
"8e85bcd62303b70153f8d451a843cb2bdd96484d",
"reftest"
],
"mozilla/video_poster_frame_ref.html": [

View file

@ -6,15 +6,10 @@
<link rel="match" href="video_poster_frame_ref.html">
</head>
<body>
<video src="" poster="poster.png"></video>
<video poster="poster.png"></video>
<script>
let video = document.querySelector("video");
video.addEventListener("postershown", function() {
// Apart from removing the `reftest-wait` class we need to get
// the `load` event to signal that it's ok to take the reftest
// screenshot. Video loading delays the document `load` event,
// so we garantee that we get this event by setting an invalid
// src attribute to the video tag.
document.documentElement.classList.remove("reftest-wait");
});
</script>