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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-observer-iterate-no-crash.html

Issue 1885053002: Safely iterate over MediaStreamSource observers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add test Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-observer-iterate-no-crash-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>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <script>
8 description("Verify that MediaStreamTracks created while dispatching MediaStream Source events do not crash.");
9
10 if (window.testRunner) {
11 testRunner.dumpAsText();
12 testRunner.waitUntilDone();
13 }
14
15 var jsTestIsAsync = true;
16
17 function getUserMedia(constraints, callback) {
18 try {
19 navigator.webkitGetUserMedia(constraints, callback, function () { });
20 } catch (e) {
21 testFailed("Unexpected exception: " + e.toString());
22 finishJSTest();
23 }
24 }
25
26 getUserMedia({audio: true,video: true}, function (stream) {
27 var track = stream.getTracks()[0];
28 track.onmute = function () {
29 track.clone();
30 track.stop();
31 };
32 track.onended = function () {
33 track.clone(undefined);
34 testPassed("Test did not crash.");
35 finishJSTest();
36 };
37 track.enabled = false;
38 });
39 </script>
40 </body>
41 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-observer-iterate-no-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698