summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/editing/crashtests/insertimage-with-replacing-selection-in-picture-element.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/editing/crashtests/insertimage-with-replacing-selection-in-picture-element.html
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/editing/crashtests/insertimage-with-replacing-selection-in-picture-element.html')
-rw-r--r--testing/web-platform/tests/editing/crashtests/insertimage-with-replacing-selection-in-picture-element.html47
1 files changed, 47 insertions, 0 deletions
diff --git a/testing/web-platform/tests/editing/crashtests/insertimage-with-replacing-selection-in-picture-element.html b/testing/web-platform/tests/editing/crashtests/insertimage-with-replacing-selection-in-picture-element.html
new file mode 100644
index 0000000000..aaae4c7c9f
--- /dev/null
+++ b/testing/web-platform/tests/editing/crashtests/insertimage-with-replacing-selection-in-picture-element.html
@@ -0,0 +1,47 @@
+<!doctype html>
+<html class="test-wait">
+<head>
+<meta charset="utf-8">
+<style>
+@keyframes keyframes0 {}
+picture {
+ animation: keyframes0 300ms alternate,alternate paused;
+}
+ruby {
+ animation: keyframes0 step-start -1.5s normal backwards paused;
+}
+</style>
+<script>
+document.addEventListener("DOMContentLoaded", () => {
+ find("AAA")
+ const header = document.querySelector("header");
+ addEventListener("animationend", () => {
+ const imgsrc =
+ "data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABh0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjIyt5EXfQAAAU5JREFUeF7t07ENACAMxMDA/jsDBTtcY6TUlmx+zcx510MGNuKG/QYKgL9CAQqADWB8CygANoDxLaAA2ADGt4ACYAMY3wIKgA1gfAsoADaA8S2gANgAxreAAmADGN8CCoANYHwLKAA2gPEtoADYAMa3gAJgAxjfAgqADWB8CygANoDxLaAA2ADGt4ACYAMY3wIKgA1gfAsoADaA8S2gANgAxreAAmADGN8CCoANYHwLKAA2gPEtoADYAMa3gAJgAxjfAgqADWB8CygANoDxLaAA2ADGt4ACYAMY3wIKgA1gfAsoADaA8S2gANgAxreAAmADGN8CCoANYHwLKAA2gPEtoADYAMa3gAJgAxjfAgqADWB8CygANoDxLaAA2ADGt4ACYAMY3wIKgA1gfAsoADaA8S2gANgAxreAAmADGN8CCoANYHwLKAA2gPEtAAe4i54BvwLfXFAAAAAASUVORK5CYII=";
+ function doIt() {
+ getSelection().extend(header, 0);
+ document.querySelector("figure").insertAdjacentElement("beforeend", header);
+ document.execCommand("insertImage", false, imgsrc);
+ }
+ doIt();
+ doIt();
+ doIt();
+ document.documentElement.removeAttribute("class");
+ }, {once: true});
+ document.designMode = "on";
+}, {once:true});
+</script>
+</head>
+<body>
+<picture autocapitalize="sentences">
+<figure>
+<figcaption>
+</figure>
+<ruby contenteditable="true">
+AAA
+<header>
+</header>
+</ruby>
+</picture>
+</body>
+</html>