AX: <svg> elements with labels and no accessible contents are exposed as empty AXGroups
[WebKit-https.git] / LayoutTests / webrtc / video-unmute.html
1 <!doctype html>
2 <html>
3     <head>
4         <meta charset="utf-8">
5         <title>Testing basic video exchange from offerer to receiver</title>
6         <script src="../resources/testharness.js"></script>
7         <script src="../resources/testharnessreport.js"></script>
8     </head>
9     <body>
10         <video id="localVideo" autoplay playsInline width="320" height="240"></video>
11         <video id="video" autoplay playsInline width="320" height="240"></video>
12         <canvas id="canvas1" width="320" height="240"></canvas>
13         <canvas id="canvas2" width="320" height="240"></canvas>
14         <script src ="routines.js"></script>
15         <script>
16 var track;
17 var remoteTrack;
18 promise_test((test) => {
19     if (window.testRunner)
20         testRunner.setUserMediaPermission(true);
21
22     return navigator.mediaDevices.getUserMedia({video: {width: 320, height: 240, facingMode: "environment"}}).then((localStream) => {
23         track = localStream.getVideoTracks()[0];
24         track.enabled = false;
25         localVideo.srcObject = localStream;
26         return new Promise((resolve, reject) => {
27             createConnections((firstConnection) => {
28                 firstConnection.addTrack(track, localStream);
29             }, (secondConnection) => {
30                 secondConnection.ontrack = (trackEvent) => {
31                     remoteTrack = trackEvent.track;
32                     resolve(trackEvent.streams[0]); 
33                 };
34             });
35             setTimeout(() => reject("Test timed out"), 5000);
36         });
37     }).then((remoteStream) => {
38         video.srcObject = remoteStream;
39         return video.play();
40     });
41 }, "Setting video exchange");
42
43 promise_test((test) => {
44     return checkVideoBlack(true, canvas1, video);
45 }, "Track is disabled, video should be black");
46
47 promise_test((test) => {
48     track.enabled = true;
49     return checkVideoBlack(false, canvas2, video);
50 }, "Track is enabled, video should not be black");
51
52         </script>
53     </body>
54 </html>