summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/document-picture-in-picture/display-mode.https.html
blob: 4888535357683d637030712c53ef9050bbf8cd65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!DOCTYPE html>
<title>Test picture-in-picture display mode</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>
<body>
<script>
async_test((t) => {
  test_driver.bless('request PiP window').then(t.step_func(_ => {
    documentPictureInPicture.requestWindow().then(t.step_func_done(async (pipWindow) => {
      await new Promise(requestAnimationFrame);
      assert_true(pipWindow.matchMedia('(display-mode: picture-in-picture)'.matches));
    }));
  }));
});
</script>
</body>