https://github.com/web-platform-tests/wpt
Raw File
Tip revision: e0169332c3bf5d25aafa38786026a0a86ae4a55a authored by Chris Harrelson on 24 December 2018, 21:55:55 UTC
Move visual overflow computation into the descendant-dependent tree walk.
Tip revision: e016933
idlharness.window.js
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js

// https://w3c.github.io/mediacapture-fromelement/

'use strict';

idl_test(
  ['mediacapture-fromelement'],
  ['mediacapture-streams', 'html', 'dom'],
  idl_array => {
    // Ignored errors will be surfaced when media/canvas undefined below.
    try {
      self.media = document.createElement('media');
      media.width = media.height = 10;
      document.body.appendChild(media);
    } catch (e) { }

    try {
      self.canvas = document.createElement('canvas');
      document.body.appendChild(canvas);
      canvas.width = canvas.height = 10;
      self.track = canvas.captureStream().getTracks()[0];
    } catch (e) { }

    idl_array.add_objects({
      HTMLMediaElement: ['media'],
      HTMLCanvasElement: ['canvas'],
      CanvasCaptureMediaStreamTrack: ['track'],
    });
  }
);
back to top