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

Side by Side Diff: LayoutTests/fast/mediastream/LocalMediaStream-onended.html

Issue 14188039: MediaStream API: Remove LocalMediaStream (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed tests Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/mediastream/LocalMediaStream-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 <link rel="stylesheet" href="../js/resources/js-test-style.css">
5 <script src="../js/resources/js-test-pre.js"></script>
6 </head>
7 <body>
8 <p id="description"></p>
9 <div id="console"></div>
10 <script>
11 description("Tests LocalMediaStream::onended callback.");
12
13 function error() {
14 testFailed('Stream generation failed.');
15 finishJSTest();
16 }
17
18 function getUserMedia(dictionary, callback) {
19 try {
20 navigator.webkitGetUserMedia(dictionary, callback, error);
21 } catch (e) {
22 testFailed('webkitGetUserMedia threw exception :' + e);
23 finishJSTest();
24 }
25 }
26
27 var stream;
28
29 function streamEnded() {
30 testPassed('streamEnded was called.');
31 shouldBeTrue('stream.ended');
32 finishJSTest();
33 }
34
35 function gotStream(s) {
36 stream = s;
37 shouldBeFalse('stream.ended');
38 try {
39 stream.onended = streamEnded;
40 stream.stop();
41 } catch (e) {
42 testFailed('LocalMediaStream threw exception :' + e);
43 finishJSTest();
44 }
45 }
46
47 getUserMedia({audio:true, video:true}, gotStream);
48
49 window.jsTestIsAsync = true;
50 window.successfullyParsed = true;
51 </script>
52 <script src="../js/resources/js-test-post.js"></script>
53 </body>
54 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/mediastream/LocalMediaStream-onended-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698