summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/document-picture-in-picture/display-mode.https.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/document-picture-in-picture/display-mode.https.html')
-rw-r--r--testing/web-platform/tests/document-picture-in-picture/display-mode.https.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/testing/web-platform/tests/document-picture-in-picture/display-mode.https.html b/testing/web-platform/tests/document-picture-in-picture/display-mode.https.html
new file mode 100644
index 0000000000..4888535357
--- /dev/null
+++ b/testing/web-platform/tests/document-picture-in-picture/display-mode.https.html
@@ -0,0 +1,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>