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

Side by Side Diff: LayoutTests/media/gc-while-playing.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>GC while playing</title>
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <script src="media-file.js"></script>
6 <script>
7 async_test(function(t)
8 {
9 var a = document.createElement("audio");
10 a.foo = "bar";
11 a.src = findMediaFile("audio", "content/test");
12 a.onsuspend = t.step_func(function()
13 {
14 assert_equals(a.networkState, a.NETWORK_IDLE);
15 a.play();
16 // Continue after a timeout since the current event target is the media
17 // element, which means that it cannot be garbage collected now.
18 setTimeout(t.step_func(gcAndAwaitTimeupdate), 0);
19 });
20 function gcAndAwaitTimeupdate()
21 {
22 a.ontimeupdate = t.step_func(function(e)
23 {
24 assert_greater_than(e.target.currentTime, 0);
25 assert_equals(e.target.foo, "bar");
26 t.done();
27 });
28 a = null;
29 gc();
30 }
31 });
32 </script>
OLDNEW
« no previous file with comments | « LayoutTests/media/gc-while-delaying-the-load-event.html ('k') | LayoutTests/media/gc-while-seeking.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698