https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 264dcf368bb4a18496dfe69fe8117e9645d03c91 authored by Kent Tamura on 19 March 2018, 07:03:33 UTC
custom-elements: Simplify builtin-coverage.html
Tip revision: 264dcf3
picture-in-picture-element.html
<!DOCTYPE html>
<title>Test Picture-in-Picture element</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(t => {
  assert_equals(document.pictureInPictureElement, null);
  const video = document.createElement('video');

  return requestPictureInPictureWithTrustedClick(video)
  .then(() => {
    assert_equals(document.pictureInPictureElement, video);
    return document.exitPictureInPicture();
  })
  .then(() => {
    assert_equals(document.pictureInPictureElement, null);
  })
});
</script>
back to top