mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
Update web-platform-tests to revision 3f9178031eec5374c9a7d5709a7e11ba4a1955ed
This commit is contained in:
parent
4997ec26c2
commit
a5af9a106a
192 changed files with 3943 additions and 1927 deletions
|
@ -0,0 +1,27 @@
|
|||
// META: script=/resources/WebIDLParser.js
|
||||
// META: script=/resources/idlharness.js
|
||||
|
||||
// https://w3c.github.io/mediacapture-image/
|
||||
|
||||
'use strict';
|
||||
|
||||
idl_test(
|
||||
['image-capture'],
|
||||
['mediacapture-streams', 'html', 'dom'],
|
||||
async idl_array => {
|
||||
idl_array.add_objects({
|
||||
ImageCapture : ['capture'],
|
||||
PhotoCapabilities: ['capabilities'],
|
||||
});
|
||||
|
||||
const canvas = document.createElement('canvas');
|
||||
document.body.appendChild(canvas);
|
||||
const context = canvas.getContext("2d");
|
||||
context.fillStyle = "red";
|
||||
context.fillRect(0, 0, 10, 10);
|
||||
const track = canvas.captureStream().getVideoTracks()[0];
|
||||
self.capture = new ImageCapture(track);
|
||||
self.capabilities = await capture.getPhotoCapabilities();
|
||||
},
|
||||
'Test mediacapture-image IDL interfaces'
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue