summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-contain/crashtests
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/css/css-contain/crashtests
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/css/css-contain/crashtests')
-rw-r--r--testing/web-platform/tests/css/css-contain/crashtests/contain-nested-crash-001.html24
-rw-r--r--testing/web-platform/tests/css/css-contain/crashtests/contain-nested-crash-002.html15
-rw-r--r--testing/web-platform/tests/css/css-contain/crashtests/contain-nested-crash-003.html18
-rw-r--r--testing/web-platform/tests/css/css-contain/crashtests/contain-nested-crash-004.html12
-rw-r--r--testing/web-platform/tests/css/css-contain/crashtests/contain-nested-relayout-boundary.html11
5 files changed, 80 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-contain/crashtests/contain-nested-crash-001.html b/testing/web-platform/tests/css/css-contain/crashtests/contain-nested-crash-001.html
new file mode 100644
index 0000000000..063563c260
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/crashtests/contain-nested-crash-001.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property">
+<link rel="help" href="https://crbug.com/1214198">
+<link rel="author" title="Koji Ishii" href="mailto:kojii@chromium.org">
+<style>
+.contain {
+ contain: strict;
+ display: block;
+ width: 100px;
+ height: 100px;
+}
+</style>
+<body>
+ <div id="outer" class="contain">
+ <div>
+ <div id="inner" class="contain"></div>
+ </div>
+ </div>
+<script>
+ document.body.offsetTop;
+ inner.appendChild(document.createTextNode('inner-child'));
+ outer.appendChild(document.createTextNode('outer-child'));
+</script>
+</body>
diff --git a/testing/web-platform/tests/css/css-contain/crashtests/contain-nested-crash-002.html b/testing/web-platform/tests/css/css-contain/crashtests/contain-nested-crash-002.html
new file mode 100644
index 0000000000..42dc06b993
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/crashtests/contain-nested-crash-002.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1340168">
+<div style="contain:size layout;">
+ <div id="klabb" style="display:inline-block; contain:size layout;">t</div>
+ <br>
+ <div id="babb" style="display:inline-block; width:10px; height:10px;"></div>
+</div>
+<script>
+ document.body.offsetTop;
+ klabb.innerHTML = ":-)";
+ klabb.style.height = "100px";
+ document.body.offsetTop;
+ babb.style.width = "20px";
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/crashtests/contain-nested-crash-003.html b/testing/web-platform/tests/css/css-contain/crashtests/contain-nested-crash-003.html
new file mode 100644
index 0000000000..a7dbe7dcc3
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/crashtests/contain-nested-crash-003.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1386673">
+<div style="contain:layout size;">
+ <div style="display:inline-block;">
+ <div style="contain:layout size;">
+ <div id="firstVictim"></div>
+ </div>
+ </div>
+ <div style="position:absolute;">
+ <div id="secondVictim"></div>
+ </div>
+</div>
+<script>
+ document.body.offsetTop;
+ firstVictim.style.display = "none";
+ secondVictim.style.display = "none";
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/crashtests/contain-nested-crash-004.html b/testing/web-platform/tests/css/css-contain/crashtests/contain-nested-crash-004.html
new file mode 100644
index 0000000000..db29e1424d
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/crashtests/contain-nested-crash-004.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1439692">
+<style>
+body, fieldset { contain: strict; }
+</style>
+<script>
+function crash() {
+ document.body.offsetTop;
+ document.body.appendChild(document.createElement("fieldset"));
+}
+</script>
+<body onload="crash()">
diff --git a/testing/web-platform/tests/css/css-contain/crashtests/contain-nested-relayout-boundary.html b/testing/web-platform/tests/css/css-contain/crashtests/contain-nested-relayout-boundary.html
new file mode 100644
index 0000000000..ce915728f4
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/crashtests/contain-nested-relayout-boundary.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<div style="position: relative; width: 100px; height: 100px; overflow: hidden;">
+ <div id="target" style="contain: size layout;">
+ <canvas id="inner" width="0"></canvas>
+ </div>
+</div>
+<script>
+document.body.offsetTop;
+document.getElementById('inner').width = '100';
+document.getElementById('target').style.contain = 'initial';
+</script>