summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/picture-in-picture/idlharness.window.js
blob: 89775884788d071f2b5ca6199a118fa429fee491 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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);
  }
);