summaryrefslogtreecommitdiff
path: root/test/web_harness.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'test/web_harness.mjs')
-rw-r--r--test/web_harness.mjs16
1 files changed, 2 insertions, 14 deletions
diff --git a/test/web_harness.mjs b/test/web_harness.mjs
index 90dd9a19..402e41f4 100644
--- a/test/web_harness.mjs
+++ b/test/web_harness.mjs
@@ -17,7 +17,7 @@ async function main() {
const webDir = path.resolve(process.argv[2]);
const wasmBytes = await fs.readFile(path.join(webDir, "pardes.wasm"));
const module = await WebAssembly.compile(wasmBytes);
- const { DomRenderer, animationTicks, browserHost } = await import(pathToFileURL(path.join(webDir, "app.mjs")));
+ const { DomRenderer, browserHost } = await import(pathToFileURL(path.join(webDir, "app.mjs")));
assert.deepEqual(
[...new Set(WebAssembly.Module.imports(module).map((entry) => entry.module))],
["pardes"],
@@ -40,7 +40,7 @@ async function main() {
for (const name of [
"memory", "pardes_init", "pardes_frame", "pardes_frame_ptr", "pardes_key",
"pardes_mouse", "pardes_pointer_leave", "pardes_pointer_shape", "pardes_gui_tagline_font_percent",
- "pardes_paste", "pardes_tick", "pardes_animation_tick", "pardes_animating",
+ "pardes_paste", "pardes_tick",
"pardes_should_quit", "pardes_deinit",
]) assert.ok(wasm[name], `missing wasm export ${name}`);
@@ -85,18 +85,6 @@ async function main() {
"DOM did not use the build-time tagline percentage",
);
- for (const hz of [60, 120, 144]) {
- const clock = { last: null, lag: 0 };
- let ticks = 0;
- for (let frame = 0; frame <= hz; frame += 1) {
- ticks += animationTicks(clock, frame * 1000 / hz);
- }
- assert.equal(ticks, 60, `${hz} Hz rAF did not produce 60 core ticks per second`);
- }
- const stalled = { last: null, lag: 0 };
- assert.equal(animationTicks(stalled, 0), 0);
- assert.equal(animationTicks(stalled, 60_000), 4, "suspended tab catch-up was not bounded");
-
const firstCell = renderer.cells[0];
const second = draw();
assert.equal(renderer.cells[0], firstCell, "stable frames should reuse DOM nodes");