https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 7a3894d75f6a5ebb50287e0af52744d5dd0df10b authored by Luke Bjerring on 17 May 2018, 17:45:58 UTC
Include attribute types in dep list
Tip revision: 7a3894d
enter-picture-in-picture.html
<!DOCTYPE html>
<title>Test enterpictureinpicture event</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="resources/picture-in-picture-helpers.js"></script>
<body></body>
<script>
promise_test(async t => {
  const video = await loadVideo();

  video.addEventListener('enterpictureinpicture', t.step_func_done(event => {
    assert_equals(event.target, video);
    assert_equals(event.bubbles, true);
    assert_equals(event.cancelable, false);
    assert_equals(event.composed, false);
    assert_equals(document.pictureInPictureElement, video);
  }));

  return requestPictureInPictureWithTrustedClick(video);
});
</script>
back to top