summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/media/event-queue-crash.html
blob: 5ee04da742e19d05ed2e8c014feebd876d5b26c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<html>
<script src="media-file.js"></script>
        
<script>
    if (window.testRunner) {
        testRunner.dumpAsText();
        testRunner.waitUntilDone();
    }

    function onLoad()
    {
        setSrcByTagName('video', findMediaFile('video', 'content/test-25fps'));
        // Removes the video element here.
        container.innerHTML = "PASS. WebKit didn't crash.";

        setTimeout(function() {
            if (window.testRunner)
                testRunner.notifyDone();
        }, 10);
    }
</script>

<body onload="onLoad()">
    <p>When an element containing video is removed, WebKit should not crash.</p>
    <div id="container">
        <div id="contents">
            <!-- This is required to reproduce. -->
            <video>
            <!-- Only if we cannot eval the content of oncanplaythrough (i.e. only if the content of oncanplaythough
                 has invalid syntax), this test causes a crash. -->
            <video oncanplaythrough='if'>
        </div>
    </div>
</body>
</html>