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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/mediastream/MediaStream-onended.html

Issue 2140133005: Remove MediaStream ended event from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/mediastream/MediaStream-onended-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <p id="description"></p>
8 <div id="console"></div>
9 <script>
10 description("Tests MediaStream::onended callback.");
11
12 function error() {
13 testFailed('Stream generation failed.');
14 finishJSTest();
15 }
16
17 function getUserMedia(dictionary, callback) {
18 try {
19 navigator.webkitGetUserMedia(dictionary, callback, error);
20 } catch (e) {
21 testFailed('webkitGetUserMedia threw exception :' + e);
22 finishJSTest();
23 }
24 }
25
26 var stream;
27
28 function streamEnded2() {
29 testPassed('streamEnded was called.');
30 finishJSTest();
31 }
32
33 function gotStream2(s) {
34 stream = new webkitMediaStream(s);
35 try {
36 stream.onended = streamEnded2;
37 s.getAudioTracks()[0].stop();
38 s.getVideoTracks()[0].stop();
39 } catch (e) {
40 testFailed('MediaStream threw exception :' + e);
41 finishJSTest();
42 }
43 }
44
45 function streamEnded() {
46 testPassed('streamEnded was called.');
47 getUserMedia({audio:true, video:true}, gotStream2);
48 }
49
50 function gotStream(s) {
51 stream = s;
52 try {
53 stream.onended = streamEnded;
54 s.getAudioTracks()[0].stop();
55 s.getVideoTracks()[0].stop();
56 } catch (e) {
57 testFailed('MediaStream threw exception :' + e);
58 finishJSTest();
59 }
60 }
61
62 getUserMedia({audio:true, video:true}, gotStream);
63
64 window.jsTestIsAsync = true;
65 window.successfullyParsed = true;
66 </script>
67 </body>
68 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/mediastream/MediaStream-onended-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698