summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/picture-in-picture/idlharness.window.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/picture-in-picture/idlharness.window.js')
-rw-r--r--testing/web-platform/tests/picture-in-picture/idlharness.window.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/testing/web-platform/tests/picture-in-picture/idlharness.window.js b/testing/web-platform/tests/picture-in-picture/idlharness.window.js
new file mode 100644
index 0000000000..8977588478
--- /dev/null
+++ b/testing/web-platform/tests/picture-in-picture/idlharness.window.js
@@ -0,0 +1,28 @@
+// META: script=/common/media.js
+// META: script=/resources/WebIDLParser.js
+// META: script=/resources/idlharness.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=resources/picture-in-picture-helpers.js
+// META: timeout=long
+
+'use strict';
+
+// https://wicg.github.io/picture-in-picture/
+
+idl_test(
+ ['picture-in-picture'],
+ ['html', 'dom'],
+ async idl_array => {
+ idl_array.add_objects({
+ Document: ['document'],
+ DocumentOrShadowRoot: ['document'],
+ HTMLVideoElement: ['video'],
+ PictureInPictureWindow: ['pipw'],
+ PictureInPictureEvent: ['new PictureInPictureEvent("type", { pictureInPictureWindow: pipw })'],
+ });
+
+ self.video = await loadVideo();
+ self.pipw = await requestPictureInPictureWithTrustedClick(video);
+ }
+);