Skip to content

Truly independent web browser

Tests/LibWeb: Remove three redundant layout tests

Aliaksandr Kalenik0f4bec1900c4
diff --git a/Tests/LibWeb/Text/expected/abspos-relayout-arena-slot-churn.txt b/Tests/LibWeb/Text/expected/abspos-relayout-arena-slot-churn.txt
deleted file mode 100644
index 466bc6877c6..00000000000
--- a/Tests/LibWeb/Text/expected/abspos-relayout-arena-slot-churn.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-all-passes-partial=true
-no-full-passes=true
-boundary=40,30,200,40
-PASS
diff --git a/Tests/LibWeb/Text/expected/css/style-element-text-content-skips-layout-tree-rebuild.txt b/Tests/LibWeb/Text/expected/css/style-element-text-content-skips-layout-tree-rebuild.txt
deleted file mode 100644
index aeebcf52658..00000000000
--- a/Tests/LibWeb/Text/expected/css/style-element-text-content-skips-layout-tree-rebuild.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-color: rgb(0, 0, 255)
-layout tree rebuilds: 0
diff --git a/Tests/LibWeb/Text/expected/layout-tree-update/layout-node-identity.txt b/Tests/LibWeb/Text/expected/layout-tree-update/layout-node-identity.txt
deleted file mode 100644
index 654906dabf1..00000000000
--- a/Tests/LibWeb/Text/expected/layout-tree-update/layout-node-identity.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-unaffected parent preserved: true
-unaffected sibling preserved: true
-incremental tree matches full rebuild: true
diff --git a/Tests/LibWeb/Text/input/abspos-relayout-arena-slot-churn.html b/Tests/LibWeb/Text/input/abspos-relayout-arena-slot-churn.html
deleted file mode 100644
index bfd33dbed6b..00000000000
--- a/Tests/LibWeb/Text/input/abspos-relayout-arena-slot-churn.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<script src="include.js"></script>
-<style>
- body { margin: 0; }
- #stage { position: relative; width: 400px; height: 300px; }
- #boundary {
- position: absolute;
- left: 40px;
- top: 30px;
- width: 200px;
- }
- #inner div { height: 5px; }
-</style>
-<div id="stage">
- <div id="boundary">
- <div id="inner"></div>
- </div>
-</div>
-<script>
- // Structural partial relayout frees the replaced layout nodes before allocating their
- // replacements. The arena reuses those slots, keeping the per-pass used values store
- // bounded without periodic full passes to compact a separate index space.
- promiseTest(async () => {
- document.body.offsetHeight;
-
- const iterations = 400;
- const partialBefore = internals.partialLayoutCount();
- const fullBefore = internals.fullLayoutCount();
- const inner = document.getElementById("inner");
- for (let i = 0; i < iterations; ++i) {
- const children = [];
- for (let j = 0; j < 8; ++j)
- children.push(document.createElement("div"));
- inner.replaceChildren(...children);
- document.body.offsetHeight;
- }
- const partialDelta = internals.partialLayoutCount() - partialBefore;
- const fullDelta = internals.fullLayoutCount() - fullBefore;
-
- const boundaryRect = document.getElementById("boundary").getBoundingClientRect();
- println(`all-passes-partial=${partialDelta === iterations}`);
- println(`no-full-passes=${fullDelta === 0}`);
- println(`boundary=${boundaryRect.left},${boundaryRect.top},${boundaryRect.width},${boundaryRect.height}`);
- println(partialDelta === iterations
- && fullDelta === 0
- && boundaryRect.height === 40 ? "PASS" : "FAIL");
- });
-</script>
diff --git a/Tests/LibWeb/Text/input/css/style-element-text-content-skips-layout-tree-rebuild.html b/Tests/LibWeb/Text/input/css/style-element-text-content-skips-layout-tree-rebuild.html
deleted file mode 100644
index 8f2be382594..00000000000
--- a/Tests/LibWeb/Text/input/css/style-element-text-content-skips-layout-tree-rebuild.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE html>
-<script src="../include.js"></script>
-<style id="style">#target { color: red; }</style>
-<div id="target"></div>
-<script>
- test(() => {
- const style = document.getElementById("style");
- const target = document.getElementById("target");
- getComputedStyle(target).color;
- const buildsBefore = internals.layoutTreeBuildStats().builds;
-
- style.textContent = "#target { color: blue; }";
- println(`color: ${getComputedStyle(target).color}`);
- println(`layout tree rebuilds: ${internals.layoutTreeBuildStats().builds - buildsBefore}`);
- });
-</script>
diff --git a/Tests/LibWeb/Text/input/layout-tree-update/layout-node-identity.html b/Tests/LibWeb/Text/input/layout-tree-update/layout-node-identity.html
deleted file mode 100644
index faf68dc2e88..00000000000
--- a/Tests/LibWeb/Text/input/layout-tree-update/layout-node-identity.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<script src="../include.js"></script>
-<div id="container">
- <div id="target">target</div>
- <div id="sibling">sibling</div>
-</div>
-<script>
- test(() => {
- document.body.offsetHeight;
- const containerIdentity = internals.layoutNodeIdentity(container);
- const siblingIdentity = internals.layoutNodeIdentity(sibling);
-
- target.appendChild(document.createElement("span")).textContent = "inserted";
- document.body.offsetHeight;
-
- println(`unaffected parent preserved: ${internals.layoutNodeIdentity(container) === containerIdentity}`);
- println(`unaffected sibling preserved: ${internals.layoutNodeIdentity(sibling) === siblingIdentity}`);
- println(`incremental tree matches full rebuild: ${internals.compareLayoutTreeWithFullRebuild().matches}`);
- });
-</script>