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

Unified Diff: LayoutTests/http/tests/media/media-source/mediasource-closed-on-htmlmediaelement-destruction.html

Issue 552303006: Prevent more script-observable cases of HTMLMediaElement GC (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: make gc-while-seeking.html non-flaky Created 6 years, 3 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: LayoutTests/http/tests/media/media-source/mediasource-closed-on-htmlmediaelement-destruction.html
diff --git a/LayoutTests/http/tests/media/media-source/mediasource-closed-on-htmlmediaelement-destruction.html b/LayoutTests/http/tests/media/media-source/mediasource-closed-on-htmlmediaelement-destruction.html
deleted file mode 100644
index 15c027d546347040a9d44be1c468374ca5583be1..0000000000000000000000000000000000000000
--- a/LayoutTests/http/tests/media/media-source/mediasource-closed-on-htmlmediaelement-destruction.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <script src="/js-test-resources/js-test.js"></script>
- <script src="/media-resources/video-test.js"></script>
- <script src="/w3c/resources/testharness.js"></script>
- <script src="/w3c/resources/testharnessreport.js"></script>
- <script src="mediasource-util.js"></script>
- </head>
- <body>
- <div id="log"></div>
- <video id="vid"></video>
- <script>
- window.jsTestIsAsync = true;
-
- async_test(function(test)
- {
- var ms = new MediaSource();
-
- function sourceOpened()
- {
- consoleWrite("sourceOpened called.");
- var vid = document.getElementById('vid');
- var buffer = ms.addSourceBuffer('video/webm; codecs="vorbis,vp8"');
-
- consoleWrite("Removing video element from DOM.");
- vid.parentNode.removeChild(vid);
- vid = null;
-
- consoleWrite("Running the garbage collector.");
- asyncGC(test.step_func(function()
- {
- assert_equals(ms.readyState, "closed", "MediaSource object is closed.");
-
- assert_throws( { name: "InvalidStateError"} ,
- function() { buffer.timestampOffset = 42; },
- "buffer.timestampOffset threw an exception as expected in the 'closed' state.");
-
- test.done();
- }));
- }
-
- function sourceClosed()
- {
- consoleWrite("sourceClosed called.");
- }
-
- ms.addEventListener('sourceopen', test.step_func(sourceOpened));
- ms.addEventListener('sourceclose', test.step_func(sourceClosed));
- document.getElementById('vid').src = window.URL.createObjectURL(ms);
- }, "Tests that the MediaSource is closed when the HTMLMediaElement is destroyed.");
- </script>
- </body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698