diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/embedded-content/the-video-element/video_crash_empty_src.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/embedded-content/the-video-element/video_crash_empty_src.html | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/embedded-content/the-video-element/video_crash_empty_src.html b/testing/web-platform/tests/html/semantics/embedded-content/the-video-element/video_crash_empty_src.html new file mode 100644 index 0000000000..3aecb4e1eb --- /dev/null +++ b/testing/web-platform/tests/html/semantics/embedded-content/the-video-element/video_crash_empty_src.html @@ -0,0 +1,29 @@ +<!DOCTYPE HTML> +<html> +<head> + <title>HTML5 Media Elements: An empty src should not crash the player.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"> + <link rel="author" title="Alicia Boya GarcĂa" href="mailto:aboya@igalia.com"/> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> +<script> + function makeCrashTest(src) { + async_test((test) => { + const video = document.createElement("video"); + video.src = src; + video.controls = true; + video.addEventListener("error", () => { + document.body.removeChild(video); + test.done(); + }); + document.body.appendChild(video); + }, `src="${src}" does not crash.`); + } + + makeCrashTest("about:blank"); + makeCrashTest(""); +</script> +</body> +</html> |