Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/mediacapture-streams/MediaStreamTrack-end.html

Issue 2086283003: Update web-platform-tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into wpt_import Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <html>
3 <head>
4 <title>Test that mediastreamtrack are properly ended</title>
5 <link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
6 <link rel="help" href="http://w3c.github.io/mediacapture-main/getusermedia.html# mediastreamtrack">
7 </head>
8 <body>
9 <p class="instructions">When prompted, accept to share your video and audio
10 stream, and then revoke that permission.</p>
11 <h1 class="instructions">Description</h1>
12 <p class="instructions">This test checks that the video and audio tracks of
13 MediaStream object returned by the success callback in getUserMedia are
14 correctly set into inactive state when permission is revoked.</p>
15
16 <div id='log'></div>
17 <script src=/resources/testharness.js></script>
18 <script src=/resources/testharnessreport.js></script>
19 <script src="/common/vendor-prefix.js" data-prefixed-objects='[{"ancestors":["na vigator"], "name":"getUserMedia"}]'></script>
20 <script>
21 var t = async_test("Tests that the video MediaStreamTrack objects are properly e nded on permission revocation", {timeout: 20000}); // longer timeout since requi res user interaction
22 t.step(function () {
23 navigator.getUserMedia({audio: true,video: true}, t.step_func(function (stream ) {
24 var vidTrack = stream.getVideoTracks()[0];
25 assert_equals(vidTrack.readyState, "live", "The video track object is in liv e state");
26 var audTrack = stream.getAudioTracks()[0];
27 assert_equals(audTrack.readyState, "live", "The audio track object is in liv e state");
28 vidTrack.onended = t.step_func(function () {
29 assert_equals(vidTrack.readyState, "ended", "Video track has been ended as expected");
30 assert_equals(audTrack.readyState, "ended", "Audio track has been ended as expected");
31 assert_false(stream.active, "MediaStream has been inactive as expected") ;
32 t.done();
33 });
34 }), function (error) {}
35 );
36 });
37 </script>
38 </body>
39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698