summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/video/video-with-invalid-source.html
blob: 82f44a378d222a49dd42a14412a56fc6aed90596 (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
<!DOCTYPE html>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<script>
if (window.testRunner) {
    testRunner.waitUntilDone();
    testRunner.dumpAsText();
}

function test() {
    var v = document.createElement("video");
    document.body.appendChild(v);
    var src = document.createElement("source");
    src.src = "notarealsource.txt";
    v.appendChild(src);
    src.addEventListener("error", function() {
       if (window.testRunner) {
            runAfterLayoutAndPaint(function() {
                // If we didn't crash here, yay!  Test is a success
                document.body.appendChild(document.createTextNode("PASS"));
                testRunner.notifyDone();
            });
        }
    }, false);
}
</script>
<body onload="test()">
</body>