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

Unified Diff: third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-gc-no-crash.html

Issue 1671033002: Do not let go of MediaStreamTracks too early. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-gc-no-crash.html
diff --git a/third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-gc-no-crash.html b/third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-gc-no-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..cac71576ee663f1a369859fcd75cb67ff7689490
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-gc-no-crash.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+</head>
+<body>
+<script>
+description("Verify that MediaStreamTracks aren't prematurely garbage collected.");
+
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+var jsTestIsAsync = true;
+
+function finishUp() {
+ gc();
+ finishJSTest();
+}
+
+navigator.webkitGetUserMedia({audio: true,video: true},function (stream) {
+ var vidTrack = stream.getVideoTracks()[0];
+ vidTrack.onended = function () { };
+ }, function () {} );
+setTimeout(finishUp);
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698