mirror of
https://github.com/servo/servo.git
synced 2025-09-10 15:08:21 +01:00
Vendors the [blink perf tests](https://chromium.googlesource.com/chromium/src/+/HEAD/third_party/blink/perf_tests/). These perf tests are useful to evaluate the performance of servo. The license that governs the perf tests is included in the folder. Running benchmark cases automatically is left to future work. The update.py script is taken from mozjs and slightly adapted, so we can easily filter (and patch if this should be necessary in the future. Testing: This PR just adds the perf_tests, but does not use or modify them in any way. --------- Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
41 lines
1.2 KiB
HTML
Vendored
41 lines
1.2 KiB
HTML
Vendored
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script src="../resources/runner.js"></script>
|
|
</head>
|
|
<body style="overflow-y: scroll">
|
|
|
|
<div id="flexbox-outer" style="display: flex; width: 512px; height: 256px">
|
|
<div id="neighbor" style="width: 256px">
|
|
</div>
|
|
<div id="flexbox-inner" style="flex-direction: column; overflow: auto">
|
|
<div id="contents" style="height: 100%; overflow: hidden">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
<script>
|
|
|
|
// Add wrapping text to make the relayout from scrollbar positioning more expensive.
|
|
const contents = document.querySelector('#contents');
|
|
for (let i = 0; i < 1000; i++) {
|
|
contents.innerHTML += '<div>this text should wrap so a change in its container width triggers a relayout</div>';
|
|
}
|
|
|
|
const neighbor = document.querySelector("#neighbor");
|
|
|
|
function runTest()
|
|
{
|
|
neighbor.innerHTML = "changing this element's contents should not relayout the right flexbox";
|
|
PerfTestRunner.forceLayout();
|
|
neighbor.innerHTML = "";
|
|
PerfTestRunner.forceLayout();
|
|
}
|
|
|
|
PerfTestRunner.measureRunsPerSecond({
|
|
description: "Measures performance of definite-height flexbox that stretches its children's height (row).",
|
|
run: runTest,
|
|
});
|
|
</script>
|
|
</html>
|