| Index: LayoutTests/media/gc-while-seeking.html
|
| diff --git a/LayoutTests/media/gc-while-seeking.html b/LayoutTests/media/gc-while-seeking.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b57f1c775f9e4074ca6e4a83c66393f523e6b083
|
| --- /dev/null
|
| +++ b/LayoutTests/media/gc-while-seeking.html
|
| @@ -0,0 +1,32 @@
|
| +<!DOCTYPE html>
|
| +<title>GC while seeking</title>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<script src="media-file.js"></script>
|
| +<script>
|
| +async_test(function(t)
|
| +{
|
| + var a = document.createElement("audio");
|
| + a.foo = "bar";
|
| + a.src = findMediaFile("audio", "content/test");
|
| + a.onsuspend = t.step_func(function()
|
| + {
|
| + assert_equals(a.networkState, a.NETWORK_IDLE);
|
| + a.currentTime = a.duration / 2;
|
| + // Continue after a timeout since the current event target is the media
|
| + // element, which means that it cannot be garbage collected now.
|
| + setTimeout(t.step_func(gcAndAwaitSeeked), 0);
|
| + });
|
| + function gcAndAwaitSeeked()
|
| + {
|
| + a.onseeked = t.step_func(function(e)
|
| + {
|
| + assert_greater_than(e.target.currentTime, 0);
|
| + assert_equals(e.target.foo, "bar");
|
| + t.done();
|
| + });
|
| + a = null;
|
| + gc();
|
| + }
|
| +});
|
| +</script>
|
|
|