mirror of
https://github.com/Tencent/BrowserSkill.git
synced 2026-09-10 13:01:23 +08:00
fix(vom): add fixtures, remove fixed canvas numbers under budget, improve efficiency
This commit is contained in:
@@ -95,6 +95,11 @@ Use the normal DOM buttons and re-observe after each action:
|
||||
- After **Restore size**: present with a fresh ref.
|
||||
- After **Remove canvas**: absent.
|
||||
|
||||
### `sparklines.html`
|
||||
|
||||
Expected Surface labels `fixture-sparkline-01` through `fixture-sparkline-20` must all be present.
|
||||
The adjacent, non-overlapping canvases remain twenty independent screenshot-only Surface refs.
|
||||
|
||||
## Invariants
|
||||
|
||||
- `snapshot` must not emit any of these Surface markers.
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Rendered Surface sparkline matrix</title>
|
||||
<style>
|
||||
html, body { margin: 0; font: 14px system-ui, sans-serif; }
|
||||
body { padding: 16px; }
|
||||
main { display: grid; grid-template-columns: repeat(5, 120px); gap: 12px; }
|
||||
canvas { display: block; width: 100px; height: 30px; background: #eaf2f8; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Twenty independent sparklines</h1>
|
||||
<main id="sparklines"></main>
|
||||
<script>
|
||||
const host = document.querySelector("#sparklines");
|
||||
for (let index = 1; index <= 20; index += 1) {
|
||||
const canvas = document.createElement("canvas");
|
||||
canvas.width = 100;
|
||||
canvas.height = 30;
|
||||
canvas.setAttribute("aria-label", `fixture-sparkline-${String(index).padStart(2, "0")}`);
|
||||
host.append(canvas);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user