<!DOCTYPE html>
<div id="container" style="width:500px;">
<div id="stf" style="width:fit-content;"></div>
</div>
<script src="../resources/runner.js"></script>
<script>
var stf = document.getElementById("stf");
for (var i = 0; i < 10000; i++) {
var child = document.createElement("div");
child.style.width = "100px";
child.style.height = "1px";
stf.appendChild(child);
}
var container = document.getElementById("container");
var style = container.style;
function test() {
style.width = "400px";
PerfTestRunner.forceLayout();
style.width = "500px";
PerfTestRunner.forceLayout();
}
PerfTestRunner.measureRunsPerSecond({
description: "Measures performance of relayout of a container with many auto fit-content children.",
run: test
});
</script>
</html>